DataContractSerializerOperationBehavior Class
Represents the run-time behavior of the DataContractSerializer.
Assembly: System.ServiceModel (in System.ServiceModel.dll)
The DataContractSerializerOperationBehavior type exposes the following members.
| Name | Description | |
|---|---|---|
![]() | DataContractSerializerOperationBehavior(OperationDescription) | Initializes a new instance of the DataContractSerializerOperationBehavior class with the specified operation description. |
![]() | DataContractSerializerOperationBehavior(OperationDescription, DataContractFormatAttribute) | Initializes a new instance of the DataContractSerializerOperationBehavior class with the specified operation description and data contract format. |
| Name | Description | |
|---|---|---|
![]() | DataContractFormatAttribute | Gets the DataContractFormatAttribute associated with the operation. |
![]() | DataContractResolver | Gets or sets an implementation of the DataContractResolver that is used to dynamically map types during serialization and deserialization processes. |
![]() | DataContractSurrogate | Gets or sets a surrogate to be used during the serialization and deserialization processes. |
![]() | IgnoreExtensionDataObject | Gets or sets a value that specifies whether the data provided by an extension of a type (and therefore not in the data contract) is ignored or not. |
![]() | MaxItemsInObjectGraph | Gets or sets the maximum number of items in the object graph to serialize or deserialize. |
| Name | Description | |
|---|---|---|
![]() | CreateSerializer(Type, String, String, IList<Type>) | Creates an instance of a class that inherits from XmlObjectSerializer for serialization and deserialization processes. |
![]() | CreateSerializer(Type, XmlDictionaryString, XmlDictionaryString, IList<Type>) | Creates an instance of a class that inherits from XmlObjectSerializer for serialization and deserialization processes with an XmlDictionaryString that contains the namespace. |
![]() | Equals(Object) | Determines whether the specified Object is equal to the current Object. (Inherited from Object.) |
![]() | Finalize | Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection. (Inherited from Object.) |
![]() | GetHashCode | Serves as a hash function for a particular type. (Inherited from Object.) |
![]() | GetType | Gets the Type of the current instance. (Inherited from Object.) |
![]() | MemberwiseClone | Creates a shallow copy of the current Object. (Inherited from Object.) |
![]() | ToString | Returns a string that represents the current object. (Inherited from Object.) |
| Name | Description | |
|---|---|---|
![]() ![]() | IOperationBehavior::AddBindingParameters | Adds a collection of parameters to the behavior. |
![]() ![]() | IOperationBehavior::ApplyClientBehavior | Attaches a client behavior to the operation. |
![]() ![]() | IOperationBehavior::ApplyDispatchBehavior | Applies the behavior to the operation. |
![]() ![]() | IOperationBehavior::Validate | Validates the operation. |
![]() ![]() | IWsdlExportExtension::ExportContract | Exports the WSDL representation of the operation. |
![]() ![]() | IWsdlExportExtension::ExportEndpoint | Exports the endpoint description as a WSDL document. |
The DataContractSerializerOperationBehavior enables the control of DataContractSerializer options, such as the MaxItemsInObjectGraph and IgnoreExtensionDataObject properties. Some of these properties can be set only using the constructor of the class. In that case, the DataContractSerializer can be replaced using the CreateSerializer method. For more information about data contracts, see Using Data Contracts.
For more information about using the DataContractSerializerOperationBehavior to replace the IDataContractSurrogate returned by the DataContractSurrogate property, see Data Contract Surrogates.
The following example finds the DataContractSerializerOperationBehavior in the collection of behaviors for an operation and resets the MaxItemsInObjectGraph and IgnoreExtensionDataObject properties.
Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2
The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.
