public void ApplyClientBehavior(ServiceEndpoint endpoint, ClientRuntime clientRuntime) { foreach (var operation in endpoint.Contract.Operations) { if (clientRuntime.Operations.Contains(operation.Name)) { IOperationBehavior innerBehavior = new ReferencePreservingDataContractSerializerOperationBehavior(operation); innerBehavior.ApplyClientBehavior(operation, clientRuntime.Operations[operation.Name]); } } }
public void ApplyDispatchBehavior(ServiceEndpoint endpoint, EndpointDispatcher endpointDispatcher) { foreach (var operation in endpoint.Contract.Operations) { if (endpointDispatcher.DispatchRuntime.Operations.Contains(operation.Name)) { IOperationBehavior innerBehavior = new ReferencePreservingDataContractSerializerOperationBehavior(operation); innerBehavior.ApplyDispatchBehavior(operation, endpointDispatcher.DispatchRuntime.Operations[operation.Name]); } } }