public void ApplyClientBehavior(ServiceEndpoint endpoint, System.ServiceModel.Dispatcher.ClientRuntime clientRuntime) { var inspector = new MessageInspector(this.userName, this.userPassword, this.customerId); clientRuntime.MessageInspectors.Add(inspector); ModifyDataContractSerializerBehavior(endpoint); }
public void ApplyClientBehavior(ServiceEndpoint endpoint, System.ServiceModel.Dispatcher.ClientRuntime clientRuntime) { if (clientRuntime != null) { clientRuntime.MessageInspectors.Add(new ClientTokenMessageInspector()); } }
public void ApplyClientBehavior(ServiceEndpoint endpoint, System.ServiceModel.Dispatcher.ClientRuntime clientRuntime) { var inspector = new StepInspector(); inspector.ResponseReceived += inspector_ResponseReceived; inspector.RequestReady += inspector_RequestReady; clientRuntime.MessageInspectors.Add(inspector); }
public void ApplyClientBehavior(ServiceEndpoint endpoint, System.ServiceModel.Dispatcher.ClientRuntime clientRuntime) { HRXMLMessageInspector inspector = new HRXMLMessageInspector(); clientRuntime.MessageInspectors.Add(inspector); }
/// <summary> /// Implements a modification or extension of the client across an endpoint. /// </summary> /// <param name="endpoint">The endpoint that is to be customized.</param> /// <param name="clientRuntime">The client runtime to be customized.</param> public void ApplyClientBehavior(ServiceEndpoint endpoint, System.ServiceModel.Dispatcher.ClientRuntime clientRuntime) { CRMMessageInspector msginsp = new CRMMessageInspector(this.UserName, this.Password, this.CRMUrl, this.AppliesTo); if (clientRuntime != null) { clientRuntime.ClientMessageInspectors.Add(msginsp); } }
public void ApplyClientBehavior(ServiceEndpoint endpoint, System.ServiceModel.Dispatcher.ClientRuntime clientRuntime) { foreach (var operation in endpoint.Contract.Operations) { DataContractSerializerOperationBehavior dataContractSerializerOperationBehavior = operation.Behaviors.Find <DataContractSerializerOperationBehavior>(); dataContractSerializerOperationBehavior.DataContractSurrogate = new DataContractSurrogate(); } }
void IEndpointBehavior.ApplyClientBehavior(ServiceEndpoint endpoint, System.ServiceModel.Dispatcher.ClientRuntime clientRuntime) { if (clientRuntime == null) { throw new ArgumentNullException("clientRuntime"); } clientRuntime.MessageInspectors.Add(new CorrelationIdHeaderInjector()); }
public void ApplyClientBehavior(System.ServiceModel.Description.ContractDescription contractDescription, System.ServiceModel.Description.ServiceEndpoint endpoint, System.ServiceModel.Dispatcher.ClientRuntime clientRuntime) { foreach (System.ServiceModel.Description.OperationDescription opDesc in contractDescription.Operations) { ApplyDataContractSurrogate(opDesc); } }
public void ApplyClientBehavior(ServiceEndpoint endpoint, System.ServiceModel.Dispatcher.ClientRuntime clientRuntime) { var inspector = new TraceInspector(); if (_listener != null) { inspector.AttachListener(_listener); } clientRuntime.MessageInspectors.Add(inspector); }
public void ApplyClientBehavior(ServiceEndpoint endpoint, System.ServiceModel.Dispatcher.ClientRuntime clientRuntime) { if (endpoint != null) { foreach (var operation in endpoint.Contract.Operations) { operation.Behaviors.Add(new LoggingOperationBehavior()); } } }
public ClientRuntimeChannel(System.ServiceModel.Dispatcher.ClientRuntime runtime, ContractDescription contract, TimeSpan openTimeout, TimeSpan closeTimeout, IChannel contextChannel, IChannelFactory factory, MessageVersion messageVersion, System.ServiceModel.EndpointAddress remoteAddress, Uri via) { if (runtime == null) { throw new ArgumentNullException("runtime"); } if (messageVersion == null) { throw new ArgumentNullException("messageVersion"); } this.runtime = runtime; this.remote_address = remoteAddress; if (runtime.Via == null) { runtime.Via = via ?? (remote_address != null ? remote_address.Uri : null); } this.contract = contract; this.message_version = messageVersion; default_open_timeout = openTimeout; default_close_timeout = closeTimeout; _processDelegate = new ProcessDelegate(Process); requestDelegate = new RequestDelegate(Request); sendDelegate = new SendDelegate(Send); AllowInitializationUI = true; if (contextChannel != null) { channel = contextChannel; } else { var method = factory.GetType().GetMethod("CreateChannel", new Type[] { typeof(System.ServiceModel.EndpointAddress), typeof(Uri) }); try { channel = (IChannel)method.Invoke(factory, new object[] { remote_address, Via }); this.factory = factory; } catch (System.Reflection.TargetInvocationException ex) { if (ex.InnerException != null) { throw ex.InnerException; } else { throw; } } } }
internal DispatchRuntime(System.ServiceModel.Dispatcher.ClientRuntime proxyRuntime, SharedRuntimeState shared) : this(shared) { if (proxyRuntime == null) { throw DiagnosticUtility.ExceptionUtility.ThrowHelperArgumentNull("proxyRuntime"); } this.proxyRuntime = proxyRuntime; this.instanceProvider = new CallbackInstanceProvider(); this.channelDispatcher = new System.ServiceModel.Dispatcher.ChannelDispatcher(shared); this.instanceContextProvider = InstanceContextProviderBase.GetProviderForMode(InstanceContextMode.PerSession, this); }
private static void ApplyClientBehavior(System.ServiceModel.Dispatcher.ClientRuntime clientRuntime) { foreach (IClientMessageInspector messageInspector in clientRuntime.MessageInspectors) { if (messageInspector is PassthroughExceptionHandlingBehavior) { return; } } clientRuntime.MessageInspectors.Add(new PassthroughExceptionHandlingBehavior()); }
public void ApplyClientBehavior(ServiceEndpoint endpoint, System.ServiceModel.Dispatcher.ClientRuntime clientRuntime) { clientRuntime.MessageInspectors.Add(new AuthMessageInspector(Username, Password, TimeOffset, AuthMode) { realm = realm, nonce = nonce, qop = qop, opaque = opaque, cnonce = cnonce, uri = Uri }); }
/// <summary> /// ApplyClientBehavior /// </summary> /// <param name="endpoint"></param> /// <param name="clientRuntime"></param> public void ApplyClientBehavior(ServiceEndpoint endpoint, System.ServiceModel.Dispatcher.ClientRuntime clientRuntime) { if (WcfClientChannelFactory.ClientMessageInspectors != null) { foreach (var inspector in WcfClientChannelFactory.ClientMessageInspectors) { clientRuntime.MessageInspectors.Add(inspector); } } if (WcfServiceInvokeScope.Current != null) { foreach (var inspector in WcfServiceInvokeScope.Current.ClientMessageInspector) { clientRuntime.MessageInspectors.Add(inspector); } } }
void IContractBehavior.ApplyClientBehavior(ContractDescription contractDescription, ServiceEndpoint endpoint, System.ServiceModel.Dispatcher.ClientRuntime clientRuntime) { CyclicReferencesAwareContractBehavior.ReplaceDataContractSerializerOperationBehaviors(contractDescription, On); }
void IContractBehavior.ApplyClientBehavior(ContractDescription contractDescription, ServiceEndpoint endpoint, System.ServiceModel.Dispatcher.ClientRuntime clientRuntime) { }
public void ApplyClientBehavior(ServiceEndpoint serviceEndpoint, System.ServiceModel.Dispatcher.ClientRuntime behavior) { }
public void ApplyClientBehavior(ServiceEndpoint endpoint, System.ServiceModel.Dispatcher.ClientRuntime clientRuntime) { AdministrationMessageInspector <T> inspector = new AdministrationMessageInspector <T>(_client); clientRuntime.MessageInspectors.Add(inspector); }
void IEndpointBehavior.ApplyClientBehavior(ServiceEndpoint endpoint, System.ServiceModel.Dispatcher.ClientRuntime clientRuntime) { ReplaceDataContractSerializerOperationBehavior(endpoint); }
public void ApplyClientBehavior(ServiceEndpoint endpoint, System.ServiceModel.Dispatcher.ClientRuntime clientRuntime) { //clientRuntime.ClientMessageInspectors. clientRuntime.ClientMessageInspectors.Add(new BasicAuthMessageInspector(Username, Password)); // clientRuntime.MessageInspectors.Add(new BasicAuthMessageInspector(Username, Password)); }
public void ApplyClientBehavior(ServiceEndpoint endpoint, System.ServiceModel.Dispatcher.ClientRuntime clientRuntime) { //clientRuntime.MessageInspectors.Add(new PasswordDigestMessageInspector(this.Username, this.Password)); clientRuntime.MessageInspectors.Add(new PasswordDigestMessageInspector(this.Username, this.Password)); }
public void ApplyClientBehavior(ServiceEndpoint endpoint, System.ServiceModel.Dispatcher.ClientRuntime clientRuntime) { // 植入“偷听器”客户端 clientRuntime.ClientMessageInspectors.Add(new MyMessageInspector()); }
public void ApplyClientBehavior(ServiceEndpoint endpoint, System.ServiceModel.Dispatcher.ClientRuntime clientRuntime) { //AuthenticationMessageInspector inspector = new AuthenticationMessageInspector(); //clientRuntime.MessageInspectors.Add(inspector); }
public void ApplyClientBehavior(ServiceEndpoint endpoint, System.ServiceModel.Dispatcher.ClientRuntime clientRuntime) { SchemaValidationMessageInspector inspector = new SchemaValidationMessageInspector(schemaSet, validateRequest, validateReply, true); clientRuntime.MessageInspectors.Add(inspector); }
public void ApplyClientBehavior(System.ServiceModel.Description.ServiceEndpoint endpoint, System.ServiceModel.Dispatcher.ClientRuntime clientRuntime) { }
public void ApplyClientBehavior(ServiceEndpoint endpoint, System.ServiceModel.Dispatcher.ClientRuntime clientRuntime) { ClientCredentials credentials = endpoint.Behaviors.Find <ClientCredentials>(); clientRuntime.MessageInspectors.Add(new CustomMessageInspector(credentials)); }
public void ApplyClientBehavior(ServiceEndpoint endpoint, System.ServiceModel.Dispatcher.ClientRuntime clientRuntime) { clientRuntime.ClientMessageInspectors.Add(new SoapClientMessageInspectorWindows(_traceSoapMessages, _traceSoapMessageHeaders)); }
void System.ServiceModel.Description.IEndpointBehavior.ApplyClientBehavior(ServiceEndpoint serviceEndpoint, System.ServiceModel.Dispatcher.ClientRuntime behavior) { }
protected virtual void AddClientErrorInspector(System.ServiceModel.Description.ServiceEndpoint endpoint, System.ServiceModel.Dispatcher.ClientRuntime clientRuntime) { }