GetCardDetailsRequest.cs source code in C# .NET

Source code for the .NET framework in C#

                        

Code:

/ WCF / WCF / 3.5.30729.1 / untmp / Orcas / SP / ndp / cdf / src / WCF / infocard / Service / managed / Microsoft / InfoCards / GetCardDetailsRequest.cs / 1 / GetCardDetailsRequest.cs

                            //------------------------------------------------------------------------------ 
// Copyright (c) Microsoft Corporation.  All rights reserved.
//-----------------------------------------------------------------------------
namespace Microsoft.InfoCards
{ 
    using System;
    using System.Collections; 
    using System.IO; 
    using System.Runtime.InteropServices;
    using System.Collections.Generic; 

    class GetCardDetailsRequest : UIAgentRequest
    {
        InfoCard m_card; 
        bool m_cardMatchesPolicyRequirements = false;
 
        public GetCardDetailsRequest( IntPtr rpcHandle, Stream inArgs, Stream outArgs, ClientUIRequest parent ) 
            : base( rpcHandle, inArgs, outArgs, parent )
        { 
        }

        protected override void OnInitializeAsSystem()
        { 
            base.OnInitializeAsSystem();
        } 
 
        protected override void OnMarshalInArgs()
        { 
            Stream stream = InArgs;

            m_card = new InfoCard( stream );
            m_card.GetExtendedInformation().Deserialize( stream ); 
            m_card.GetRPIdentityRequirement().Deserialize( stream );
            m_card.GetClaims().Deserialize( stream ); 
        } 

        protected override void OnProcess() 
        {
            m_cardMatchesPolicyRequirements = m_card.DoesCardMatchPolicySet( GetPolicy() );
        }
 
        protected override void OnMarshalOutArgs()
        { 
            Stream stream = OutArgs; 
            BinaryWriter writer = new BinaryWriter( stream, System.Text.Encoding.Unicode );
            writer.Write( m_cardMatchesPolicyRequirements ); 
        }
    }
}

// File provided for Reference Use Only by Microsoft Corporation (c) 2007.
// Copyright (c) Microsoft Corporation. All rights reserved.
                        

Link Menu

Network programming in C#, Network Programming in VB.NET, Network Programming in .NET
This book is available now!
Buy at Amazon US or
Buy at Amazon UK