public void ApplyClientBehavior(ServiceEndpoint endpoint, ClientRuntime clientRuntime) { if (!string.IsNullOrEmpty(m_userAgent)) { var inspector = new HttpUserAgentMessageInspector(m_userAgent); clientRuntime.MessageInspectors.Add(inspector); } }
public void ApplyDispatchBehavior(ServiceEndpoint endpoint, EndpointDispatcher endpointDispatcher) { var inspector = new HttpUserAgentMessageInspector(null); endpointDispatcher.DispatchRuntime.MessageInspectors.Add(inspector); }