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
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
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类。

适用于