XmlSerializer.FromMappings 方法

定义

从指定的映射返回 XmlSerializer 类的实例。Returns an instance of the XmlSerializer class from the specified mappings.

重载

FromMappings(XmlMapping[], Type)

从指定的映射返回 XmlSerializer 类的实例。Returns an instance of the XmlSerializer class from the specified mappings.

FromMappings(XmlMapping[])

返回从 XmlSerializer 对象的数组创建的 XmlTypeMapping 对象的数组。Returns an array of XmlSerializer objects created from an array of XmlTypeMapping objects.

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)

从指定的映射返回 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[]
Public Shared Function FromMappings (mappings As XmlMapping(), type As Type) As XmlSerializer()

参数

mappings
XmlMapping[]

一个 XmlMapping 对象数组。An array of XmlMapping objects.

type
Type

反序列化的对象的 TypeThe Type of the deserialized object.

返回

XmlSerializer 类的实例。An instance of the XmlSerializer class.

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)

警告

此 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);
public static System.Xml.Serialization.XmlSerializer[] FromMappings (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[]
Public Shared Function FromMappings (mappings As XmlMapping(), evidence As Evidence) As XmlSerializer()

参数

mappings
XmlMapping[]

一个 XmlMapping 对象的数组,这些对象用于将一个类型映射到另一个类型。An array of XmlMapping objects used to map one type to another.

evidence
Evidence

Evidence 类的实例,包含为公共语言运行时策略系统提供的主机数据和程序集数据。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.

属性

适用于