DataContractSerializerOperationBehavior.CreateSerializer Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Creates an instance of a class that inherits from XmlObjectSerializer for serialization and deserialization processes.
Overloads
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. |
CreateSerializer(Type, String, String, IList<Type>)
Creates an instance of a class that inherits from XmlObjectSerializer for serialization and deserialization processes.
public:
virtual System::Runtime::Serialization::XmlObjectSerializer ^ CreateSerializer(Type ^ type, System::String ^ name, System::String ^ ns, System::Collections::Generic::IList<Type ^> ^ knownTypes);
public virtual System.Runtime.Serialization.XmlObjectSerializer CreateSerializer (Type type, string name, string ns, System.Collections.Generic.IList<Type> knownTypes);
abstract member CreateSerializer : Type * string * string * System.Collections.Generic.IList<Type> -> System.Runtime.Serialization.XmlObjectSerializer
override this.CreateSerializer : Type * string * string * System.Collections.Generic.IList<Type> -> System.Runtime.Serialization.XmlObjectSerializer
Public Overridable Function CreateSerializer (type As Type, name As String, ns As String, knownTypes As IList(Of Type)) As XmlObjectSerializer
Parameters
- name
- String
The name of the generated type.
- ns
- String
The namespace of the generated type.
Returns
An instance of a class that inherits from the XmlObjectSerializer class.
Remarks
Both the NetDataContractSerializer and the DataContractSerializer inherit from the XmlObjectSerializer class.
Applies to
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.
public:
virtual System::Runtime::Serialization::XmlObjectSerializer ^ CreateSerializer(Type ^ type, System::Xml::XmlDictionaryString ^ name, System::Xml::XmlDictionaryString ^ ns, System::Collections::Generic::IList<Type ^> ^ knownTypes);
public virtual System.Runtime.Serialization.XmlObjectSerializer CreateSerializer (Type type, System.Xml.XmlDictionaryString name, System.Xml.XmlDictionaryString ns, System.Collections.Generic.IList<Type> knownTypes);
abstract member CreateSerializer : Type * System.Xml.XmlDictionaryString * System.Xml.XmlDictionaryString * System.Collections.Generic.IList<Type> -> System.Runtime.Serialization.XmlObjectSerializer
override this.CreateSerializer : Type * System.Xml.XmlDictionaryString * System.Xml.XmlDictionaryString * System.Collections.Generic.IList<Type> -> System.Runtime.Serialization.XmlObjectSerializer
Public Overridable Function CreateSerializer (type As Type, name As XmlDictionaryString, ns As XmlDictionaryString, knownTypes As IList(Of Type)) As XmlObjectSerializer
Parameters
- type
- Type
The type to serialize or deserialize.
- name
- XmlDictionaryString
The name of the serialized type.
An XmlDictionaryString that contains the namespace of the serialized type.
Returns
An instance of a class that inherits from the XmlObjectSerializer class.
Remarks
Both the DataContractSerializer and the NetDataContractSerializer inherit from the XmlObjectSerializer class.