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); } } }
public void ApplyClientBehavior(ServiceEndpoint endpoint, ClientRuntime clientRuntime) { CurrentLoginInspector inspector = new CurrentLoginInspector(); clientRuntime.MessageInspectors.Add(inspector); }
public void ApplyDispatchBehavior(ServiceEndpoint endpoint, EndpointDispatcher endpointDispatcher) { CurrentLoginInspector inspector = new CurrentLoginInspector(); endpointDispatcher.DispatchRuntime.MessageInspectors.Add(inspector); }