DataContractSerializerOperationBehavior.CreateSerializer 方法

定义

创建类的一个实例,该类从序列化和反序列化过程的 XmlObjectSerializer 中继承。

重载

CreateSerializer(Type, String, String, IList<Type>)

创建类的一个实例,该类从序列化和反序列化过程的 XmlObjectSerializer 中继承。

CreateSerializer(Type, XmlDictionaryString, XmlDictionaryString, IList<Type>)

创建类的一个实例,该类从序列化和反序列化过程(其 XmlObjectSerializer 包含命名空间)的 XmlDictionaryString 中继承。

CreateSerializer(Type, String, String, IList<Type>)

Source:
DataContractSerializerOperationBehavior.cs
Source:
DataContractSerializerOperationBehavior.cs

创建类的一个实例,该类从序列化和反序列化过程的 XmlObjectSerializer 中继承。

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

参数

type
Type

要为其创建序列化程序的 Type

name
String

生成类型的名称。

ns
String

生成类型的命名空间。

knownTypes
IList<Type>

包含已知类型的 IList<T>Type

返回

继承自 XmlObjectSerializer 类的一个类的实例。

注解

NetDataContractSerializerDataContractSerializer 都继承自 XmlObjectSerializer 类。

适用于

CreateSerializer(Type, XmlDictionaryString, XmlDictionaryString, IList<Type>)

Source:
DataContractSerializerOperationBehavior.cs
Source:
DataContractSerializerOperationBehavior.cs

创建类的一个实例,该类从序列化和反序列化过程(其 XmlObjectSerializer 包含命名空间)的 XmlDictionaryString 中继承。

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

参数

type
Type

要序列化或反序列化的类型。

name
XmlDictionaryString

序列化类型的名称。

ns
XmlDictionaryString

包含序列化类型的命名空间的 XmlDictionaryString

knownTypes
IList<Type>

包含已知类型的 IList<T>Type

返回

继承自 XmlObjectSerializer 类的一个类的实例。

注解

DataContractSerializerNetDataContractSerializer 都继承自 XmlObjectSerializer 类。

适用于