EndGetFileNameFromUserRequest.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 / EndGetFileNameFromUserRequest.cs / 1 / EndGetFileNameFromUserRequest.cs

                            //------------------------------------------------------------------------------ 
// Copyright (c) Microsoft Corporation.  All rights reserved.
//-----------------------------------------------------------------------------
namespace Microsoft.InfoCards
{ 
    using System;
    using System.IO; 
    using IDT = Microsoft.InfoCards.Diagnostics.InfoCardTrace; 

    // 
    // Summary
    // Processes end of asynchronous get file name from user request.
    //
    internal class EndGetFileNameFromUserRequest : UIAgentAsyncEndRequest 
    {
        // 
        // Summary 
        // Constructs the request.
        // 
        // Arguments
        // rpcHandle - Specifies the RPC context handle.
        // inArgs    - Specifies the stream to hold the input arguments.
        // outArgs   - Specifies the stream to hold the output arguments. 
        // parent    - Specifies the parent UI request.
        // 
        public EndGetFileNameFromUserRequest( IntPtr rpcHandle, Stream inArgs, Stream outArgs, ClientUIRequest parent ) 
            : base( rpcHandle, inArgs, outArgs, parent )
        { 
        }

        //
        // Summary 
        // Serializes output arguments to stream.
        // 
        // Arguments 
        // writer - Specifies binary writer.
        // 
        protected override void OnMarshalAsyncOutArgs( BinaryWriter writer )
        {
            //
            // Get result. 
            //
            GetFileNameResult result = (GetFileNameResult)Result; 
 
            IDT.Assert( null != result, "The get file result cannot be null." );
 
            //
            // Write file name and contents to stream.
            //
            Utility.SerializeString( writer, result.FileName ); 
            Utility.SerializeBytes( writer, result.FileContent );
 
            writer.Flush(); 
        }
    } 
}

// 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