語言

DataContractSerializerOperationBehavior.CreateSerializer 方法

定義

建立一個類別實例,繼承序列 XmlObjectSerializer 化與反序列化程序。

多載

名稱 Description
CreateSerializer(Type, String, String, IList<Type>)

建立一個類別實例,繼承序列 XmlObjectSerializer 化與反序列化程序。

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

建立一個類別實例,繼 XmlObjectSerializer 承序列化與反序列化程序,且包含 XmlDictionaryString 命名空間。

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

來源:
DataContractSerializerOperationBehavior.cs
來源:
DataContractSerializerOperationBehavior.cs
來源:
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 類別的類別實例。

備註

無論是NetDataContractSerializer從職業繼承還是DataContractSerializerXmlObjectSerializer。

適用於

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

來源:
DataContractSerializerOperationBehavior.cs
來源:
DataContractSerializerOperationBehavior.cs
來源:
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 類別的類別實例。

備註

無論是DataContractSerializer從職業繼承還是NetDataContractSerializerXmlObjectSerializer。

適用於