Пример #1
0
        void IEndpointBehavior.ApplyDispatchBehavior(ServiceEndpoint endpoint, EndpointDispatcher endpointDispatcher)
        {
            var channelDispatcher = endpointDispatcher.ChannelDispatcher;

            if (channelDispatcher == null)
            {
                return;
            }
            foreach (var ed in channelDispatcher.Endpoints)
            {
                var inspector = new CustomInspectorBehavior();
                ed.DispatchRuntime.MessageInspectors.Add(inspector);
            }
        }
Пример #2
0
        void IEndpointBehavior.ApplyClientBehavior(ServiceEndpoint endpoint, ClientRuntime clientRuntime)
        {
            var inspector = new CustomInspectorBehavior();

            clientRuntime.MessageInspectors.Add(inspector);
        }