1#if !NETFX_CORE && !NETSTANDARD2_0 && !NET5_0
10using System.ServiceModel.Channels;
11using System.ServiceModel.Description;
23#region IOperationBehavior Members
40 public void ApplyClientBehavior(OperationDescription description, System.ServiceModel.Dispatcher.ClientOperation proxy)
42 ReplaceDataContractSerializerOperationBehavior(description);
51 public void ApplyDispatchBehavior(OperationDescription description, System.ServiceModel.Dispatcher.DispatchOperation dispatch)
53 ReplaceDataContractSerializerOperationBehavior(description);
60 public void Validate(OperationDescription description)
66 private static void ReplaceDataContractSerializerOperationBehavior(OperationDescription description)
68 DataContractSerializerOperationBehavior dcsOperationBehavior = description.Behaviors.Find<DataContractSerializerOperationBehavior>();
70 if (dcsOperationBehavior !=
null)
72 description.Behaviors.Remove(dcsOperationBehavior);
Override the DataContract serialization behavior to use the NetDataContractSerializer.
Specify that WCF should serialize objects in a .NET specific manner to as to preserve complex object ...
void Validate(OperationDescription description)
Not implemented.
void ApplyDispatchBehavior(OperationDescription description, System.ServiceModel.Dispatcher.DispatchOperation dispatch)
Apply the dispatch behavior by requiring the use of the NetDataContractSerializer.
void AddBindingParameters(OperationDescription description, BindingParameterCollection parameters)
Not implemented.
void ApplyClientBehavior(OperationDescription description, System.ServiceModel.Dispatcher.ClientOperation proxy)
Apply the client behavior by requiring the use of the NetDataContractSerializer.