DataContractSerializerOperationBehavior.CreateSerializer 方法
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
建立一個類別實例,繼承序列 XmlObjectSerializer 化與反序列化程序。
多載
| 名稱 | Description |
|---|---|
| CreateSerializer(Type, String, String, IList<Type>) |
建立一個類別實例,繼承序列 XmlObjectSerializer 化與反序列化程序。 |
| CreateSerializer(Type, XmlDictionaryString, XmlDictionaryString, IList<Type>) |
建立一個類別實例,繼 XmlObjectSerializer 承序列化與反序列化程序,且包含 XmlDictionaryString 命名空間。 |
CreateSerializer(Type, String, String, IList<Type>)
建立一個類別實例,繼承序列 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
參數
- name
- String
產生的類型名稱。
- ns
- String
產生型態的命名空間。
傳回
一個繼承自該 XmlObjectSerializer 類別的類別實例。
備註
無論是NetDataContractSerializer從職業繼承還是DataContractSerializerXmlObjectSerializer。
適用於
CreateSerializer(Type, XmlDictionaryString, XmlDictionaryString, IList<Type>)
建立一個類別實例,繼 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
序號型號的名稱。
一個 XmlDictionaryString 包含序列化型態命名空間的 。
傳回
一個繼承自該 XmlObjectSerializer 類別的類別實例。
備註
無論是DataContractSerializer從職業繼承還是NetDataContractSerializerXmlObjectSerializer。