コード例 #1
0
 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]);
         }
     }
 }
コード例 #2
0
 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]);
         }
     }
 }