コード例 #1
0
 public void ApplyDispatchBehavior(ServiceDescription serviceDescription, ServiceHostBase serviceHostBase)
 {
     foreach (ChannelDispatcher channelDispatcher in serviceHostBase.ChannelDispatchers)
     {
         foreach (EndpointDispatcher endpointDispatcher in channelDispatcher.Endpoints)
         {
             CurrentLoginInspector currentLoginInspector = new CurrentLoginInspector();
             endpointDispatcher.DispatchRuntime.MessageInspectors.Add(currentLoginInspector);
         }
     }
 }
コード例 #2
0
 public void ApplyClientBehavior(ServiceEndpoint endpoint, ClientRuntime clientRuntime)
 {
     CurrentLoginInspector inspector = new CurrentLoginInspector();
     clientRuntime.MessageInspectors.Add(inspector);
 }
コード例 #3
0
 public void ApplyDispatchBehavior(ServiceEndpoint endpoint, EndpointDispatcher endpointDispatcher)
 {
     CurrentLoginInspector inspector = new CurrentLoginInspector();
     endpointDispatcher.DispatchRuntime.MessageInspectors.Add(inspector);
 }