OperationInvokerBehavior.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 / ServiceModel / System / ServiceModel / Dispatcher / OperationInvokerBehavior.cs / 1 / OperationInvokerBehavior.cs

                            //------------------------------------------------------------------------------ 
// Copyright (c) Microsoft Corporation.  All rights reserved.
//-----------------------------------------------------------------------------

namespace System.ServiceModel.Dispatcher 
{
    using System.Collections.Generic; 
    using System.ServiceModel.Channels; 
    using System.ServiceModel.Description;
 
    class OperationInvokerBehavior : IOperationBehavior
    {
        public OperationInvokerBehavior()
        {		 
        }
 
        void IOperationBehavior.Validate(OperationDescription description) 
        {
        } 

        void IOperationBehavior.AddBindingParameters(OperationDescription description, BindingParameterCollection parameters)
        {
        } 

        void IOperationBehavior.ApplyDispatchBehavior(OperationDescription description, DispatchOperation dispatch) 
        { 
            if (dispatch == null)
               throw DiagnosticUtility.ExceptionUtility.ThrowHelperArgumentNull("dispatch"); 

            //Always favor the synchronous implementation
            if (description.SyncMethod != null)
                dispatch.Invoker = new SyncMethodInvoker(description.SyncMethod); 
            else if (description.BeginMethod != null)
                dispatch.Invoker = new AsyncMethodInvoker(description.BeginMethod, description.EndMethod); 
        } 

        void IOperationBehavior.ApplyClientBehavior(OperationDescription description, ClientOperation proxy) 
        {
        }
    }
} 

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