/// <summary> /// Injects the user agent into the service request. /// </summary> /// <param name="endpoint">The enpoint of the service for which to set the user-agent.</param> /// <param name="clientRuntime">The client runtime.</param> public override void ApplyClientBehavior(ServiceEndpoint endpoint, ClientRuntime clientRuntime) { base.ApplyClientBehavior(endpoint, clientRuntime); HttpUserAgentMessageInspector amiInspector = new HttpUserAgentMessageInspector(this.m_userAgent); clientRuntime.MessageInspectors.Add(amiInspector); }
/// <summary> /// Injects the user agent into the service request. /// </summary> /// <param name="endpoint">The enpoint of the service for which to set the user-agent.</param> /// <param name="clientRuntime">The client runtime.</param> public override void ApplyClientBehavior(ServiceEndpoint endpoint, ClientRuntime clientRuntime) { base.ApplyClientBehavior(endpoint, clientRuntime); HttpUserAgentMessageInspector amiInspector = new HttpUserAgentMessageInspector(this.m_userAgent); clientRuntime.MessageInspectors.Add(amiInspector); }