private static void AttachMessageInspectorToHost(ServiceHost pHost)
        {
            ServiceMessageInspector lInspector = new ServiceMessageInspector();

            foreach (ServiceEndpoint lEndPoint in pHost.Description.Endpoints)
            {
                lEndPoint.Behaviors.Add(lInspector);
            }
        }
示例#2
0
        private static void AttachMessageInspectorToHost(ServiceHost pHost)
        {
            ServiceMessageInspector lInspector = new ServiceMessageInspector();

            foreach (ServiceEndpoint lEndPoint in pHost.Description.Endpoints)
            {
                //System.Diagnostics.Debug.WriteLine(lEndPoint.Address);
                lEndPoint.Behaviors.Add(lInspector);
            }
        }