XmlSerializer.FromMappings XmlSerializer.FromMappings XmlSerializer.FromMappings XmlSerializer.FromMappings Method

定義

傳回指定對應的 XmlSerializer 類別執行個體。Returns an instance of the XmlSerializer class from the specified mappings.

多載

FromMappings(XmlMapping[], Type) FromMappings(XmlMapping[], Type) FromMappings(XmlMapping[], Type)

傳回指定對應的 XmlSerializer 類別執行個體。Returns an instance of the XmlSerializer class from the specified mappings.

FromMappings(XmlMapping[]) FromMappings(XmlMapping[]) FromMappings(XmlMapping[]) FromMappings(XmlMapping[])

傳回建立自 XmlSerializer 物件陣列的 XmlTypeMapping 物件陣列。Returns an array of XmlSerializer objects created from an array of XmlTypeMapping objects.

FromMappings(XmlMapping[], Evidence) FromMappings(XmlMapping[], Evidence) FromMappings(XmlMapping[], Evidence)

傳回 XmlSerializer 類別的執行個體,該執行個體建立自一個 XML 型別至另一個 XML 型別的對應。Returns an instance of the XmlSerializer class created from mappings of one XML type to another.

FromMappings(XmlMapping[], Type) FromMappings(XmlMapping[], Type) FromMappings(XmlMapping[], Type)

傳回指定對應的 XmlSerializer 類別執行個體。Returns an instance of the XmlSerializer class from the specified mappings.

public:
 static cli::array <System::Xml::Serialization::XmlSerializer ^> ^ FromMappings(cli::array <System::Xml::Serialization::XmlMapping ^> ^ mappings, Type ^ type);
public static System.Xml.Serialization.XmlSerializer[] FromMappings (System.Xml.Serialization.XmlMapping[] mappings, Type type);
static member FromMappings : System.Xml.Serialization.XmlMapping[] * Type -> System.Xml.Serialization.XmlSerializer[]

參數

mappings
XmlMapping[]

XmlMapping 物件的陣列。An array of XmlMapping objects.

type
Type Type Type Type

還原序列化物件的 TypeThe Type of the deserialized object.

傳回

XmlSerializer 類別的執行個體。An instance of the XmlSerializer class.

FromMappings(XmlMapping[]) FromMappings(XmlMapping[]) FromMappings(XmlMapping[]) FromMappings(XmlMapping[])

傳回建立自 XmlSerializer 物件陣列的 XmlTypeMapping 物件陣列。Returns an array of XmlSerializer objects created from an array of XmlTypeMapping objects.

public:
 static cli::array <System::Xml::Serialization::XmlSerializer ^> ^ FromMappings(cli::array <System::Xml::Serialization::XmlMapping ^> ^ mappings);
public static System.Xml.Serialization.XmlSerializer[] FromMappings (System.Xml.Serialization.XmlMapping[] mappings);
static member FromMappings : System.Xml.Serialization.XmlMapping[] -> System.Xml.Serialization.XmlSerializer[]
Public Shared Function FromMappings (mappings As XmlMapping()) As XmlSerializer()

參數

mappings
XmlMapping[]

XmlTypeMapping 陣列,將一個型別對應至另一個型別。An array of XmlTypeMapping that maps one type to another.

傳回

XmlSerializer 物件的陣列。An array of XmlSerializer objects.

備註

建議您快取傳回的序列化程式,重複的呼叫這個方法時的呼叫端。It is recommended for callers to cache the returned serializer when there are repeated calls to this method.

FromMappings(XmlMapping[], Evidence) FromMappings(XmlMapping[], Evidence) FromMappings(XmlMapping[], Evidence)

警告

此 API 現已淘汰。

傳回 XmlSerializer 類別的執行個體,該執行個體建立自一個 XML 型別至另一個 XML 型別的對應。Returns an instance of the XmlSerializer class created from mappings of one XML type to another.

public:
 static cli::array <System::Xml::Serialization::XmlSerializer ^> ^ FromMappings(cli::array <System::Xml::Serialization::XmlMapping ^> ^ mappings, System::Security::Policy::Evidence ^ evidence);
[System.Obsolete("This method is obsolete and will be removed in a future release of the .NET Framework. Please use an overload of FromMappings which does not take an Evidence parameter. See http://go2.microsoft.com/fwlink/?LinkId=131738 for more information.")]
public static System.Xml.Serialization.XmlSerializer[] FromMappings (System.Xml.Serialization.XmlMapping[] mappings, System.Security.Policy.Evidence evidence);
static member FromMappings : System.Xml.Serialization.XmlMapping[] * System.Security.Policy.Evidence -> System.Xml.Serialization.XmlSerializer[]

參數

mappings
XmlMapping[]

XmlMapping 物件的陣列,用於將一個型別對應至另一個型別。An array of XmlMapping objects used to map one type to another.

evidence
Evidence Evidence Evidence Evidence

Evidence 類別的執行個體,包含顯示到 Common Language Runtime 原則系統的裝載和組件資料。An instance of the Evidence class that contains host and assembly data presented to the common language runtime policy system.

傳回

XmlSerializer 類別的執行個體。An instance of the XmlSerializer class.

適用於