XmlSerializer.FromMappings 方法

定义

从指定的映射返回 XmlSerializer 类的实例。

重载

FromMappings(XmlMapping[], Type)

从指定的映射返回 XmlSerializer 类的实例。

FromMappings(XmlMapping[])

返回从 XmlSerializer 对象的数组创建的 XmlTypeMapping 对象的数组。

FromMappings(XmlMapping[], Evidence)
已过时。

返回 XmlSerializer 类的实例,该类通过一个 XML 类型到另一个 XML 类型的映射来创建。

FromMappings(XmlMapping[], Type)

从指定的映射返回 XmlSerializer 类的实例。

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);
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 对象数组。

type
Type

反序列化的对象的 Type

返回

XmlSerializer[]

XmlSerializer 类的实例。

适用于

FromMappings(XmlMapping[])

返回从 XmlSerializer 对象的数组创建的 XmlTypeMapping 对象的数组。

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);
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 的数组。

返回

XmlSerializer[]

一个 XmlSerializer 对象数组。

注解

对于调用方,当对此方法进行重复调用时,建议调用方缓存返回的序列化程序。

适用于

FromMappings(XmlMapping[], Evidence)

注意

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.

返回 XmlSerializer 类的实例,该类通过一个 XML 类型到另一个 XML 类型的映射来创建。

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[]
[<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.")>]
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 对象的数组,这些对象用于将一个类型映射到另一个类型。

evidence
Evidence

Evidence 类的实例,包含为公共语言运行时策略系统提供的主机数据和程序集数据。

返回

XmlSerializer[]

XmlSerializer 类的实例。

属性

适用于