-
-
Save anand374/1873213a615547d417460f31a8033ef3 to your computer and use it in GitHub Desktop.
To set the invoker as our custom invoker
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.Collections.Generic; | |
using System.Linq; | |
using System.ServiceModel.Description; | |
using System.ServiceModel.Dispatcher; | |
using System.Text; | |
using System.Threading.Tasks; | |
namespace TokenValidator | |
{ | |
public class MyOperationBehavior : IOperationBehavior | |
{ | |
public void AddBindingParameters(OperationDescription operationDescription, System.ServiceModel.Channels.BindingParameterCollection bindingParameters) | |
{ } | |
public void ApplyClientBehavior(OperationDescription operationDescription, System.ServiceModel.Dispatcher.ClientOperation clientOperation) | |
{ } | |
public void ApplyDispatchBehavior(OperationDescription operationDescription, System.ServiceModel.Dispatcher.DispatchOperation dispatchOperation) | |
{ | |
IOperationInvoker defaultInvoker = dispatchOperation.Invoker; | |
dispatchOperation.Invoker = new CustomInvoker(defaultInvoker); | |
} | |
public void Validate(OperationDescription operationDescription) | |
{ } | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment