XmlReflectionImporter.ImportTypeMapping 方法
定义
为指定的 .NET Framework 类型生成到 XML 架构元素的映射。Generates a mapping to an XML Schema element for a specified .NET Framework type.
重载
| ImportTypeMapping(Type) |
此 API 支持产品基础结构,不能在代码中直接使用。 为指定的 .NET 类型生成到 XML 架构元素的映射。Generates a mapping to an XML Schema element for a specified .NET type. |
| ImportTypeMapping(Type, String) |
此 API 支持产品基础结构,不能在代码中直接使用。 使用指定的类型和命名空间为 .NET 类型生成到 XML 架构元素的映射。Generates a mapping to an XML Schema element for a .NET type, using the specified type and namespace. |
| ImportTypeMapping(Type, XmlRootAttribute) |
此 API 支持产品基础结构,不能在代码中直接使用。 使用指定的类型和属性为 .NET 类型生成到 XML 架构元素的映射。Generates a mapping to an XML Schema element for a .NET type, using the specified type and attribute. |
| ImportTypeMapping(Type, XmlRootAttribute, String) |
此 API 支持产品基础结构,不能在代码中直接使用。 使用指定的类型、属性和命名空间为 .NET 类型生成到 XML 架构元素的映射。Generates a mapping to an XML Schema element for a .NET type, using the specified type, attribute, and namespace. |
ImportTypeMapping(Type)
为指定的 .NET 类型生成到 XML 架构元素的映射。Generates a mapping to an XML Schema element for a specified .NET type.
此 API 支持产品基础结构,不能在代码中直接使用。
public:
System::Xml::Serialization::XmlTypeMapping ^ ImportTypeMapping(Type ^ type);
public System.Xml.Serialization.XmlTypeMapping ImportTypeMapping (Type type);
member this.ImportTypeMapping : Type -> System.Xml.Serialization.XmlTypeMapping
Public Function ImportTypeMapping (type As Type) As XmlTypeMapping
参数
- type
- Type
将为其生成类型映射的 .NET 类型。The .NET type for which to generate a type mapping.
返回
从一个类型到一个 XML 架构元素的 .NET 内部映射。Internal .NET mapping of a type to an XML Schema element.
注解
不需要 ImportTypeMapping 直接调用方法。It is not necessary to call the ImportTypeMapping method directly.
适用于
ImportTypeMapping(Type, String)
使用指定的类型和命名空间为 .NET 类型生成到 XML 架构元素的映射。Generates a mapping to an XML Schema element for a .NET type, using the specified type and namespace.
此 API 支持产品基础结构,不能在代码中直接使用。
public:
System::Xml::Serialization::XmlTypeMapping ^ ImportTypeMapping(Type ^ type, System::String ^ defaultNamespace);
public System.Xml.Serialization.XmlTypeMapping ImportTypeMapping (Type type, string? defaultNamespace);
public System.Xml.Serialization.XmlTypeMapping ImportTypeMapping (Type type, string defaultNamespace);
member this.ImportTypeMapping : Type * string -> System.Xml.Serialization.XmlTypeMapping
Public Function ImportTypeMapping (type As Type, defaultNamespace As String) As XmlTypeMapping
参数
- type
- Type
将为其生成类型映射的 .NET 类型。The .NET type for which to generate a type mapping.
- defaultNamespace
- String
要使用的默认 XML 命名空间。The default XML namespace to use.
返回
从一个类型到一个 XML 架构元素的 .NET 内部映射。Internal .NET mapping of a type to an XML Schema element.
注解
不需要 ImportTypeMapping 直接调用方法。It is not necessary to call the ImportTypeMapping method directly.
适用于
ImportTypeMapping(Type, XmlRootAttribute)
使用指定的类型和属性为 .NET 类型生成到 XML 架构元素的映射。Generates a mapping to an XML Schema element for a .NET type, using the specified type and attribute.
此 API 支持产品基础结构,不能在代码中直接使用。
public:
System::Xml::Serialization::XmlTypeMapping ^ ImportTypeMapping(Type ^ type, System::Xml::Serialization::XmlRootAttribute ^ root);
public System.Xml.Serialization.XmlTypeMapping ImportTypeMapping (Type type, System.Xml.Serialization.XmlRootAttribute? root);
public System.Xml.Serialization.XmlTypeMapping ImportTypeMapping (Type type, System.Xml.Serialization.XmlRootAttribute root);
member this.ImportTypeMapping : Type * System.Xml.Serialization.XmlRootAttribute -> System.Xml.Serialization.XmlTypeMapping
Public Function ImportTypeMapping (type As Type, root As XmlRootAttribute) As XmlTypeMapping
参数
- type
- Type
将为其生成类型映射的 .NET 类型。The .NET type for which to generate a type mapping.
- root
- XmlRootAttribute
应用于类型的 XmlRootAttribute 特性。An XmlRootAttribute attribute that is applied to the type.
返回
XmlTypeMapping,表示 .NET 类型到 XML 架构元素的映射。An XmlTypeMapping that represents a mapping of a .NET type to an XML Schema element.
注解
不需要 ImportTypeMapping 直接调用方法。It is not necessary to call the ImportTypeMapping method directly.
适用于
ImportTypeMapping(Type, XmlRootAttribute, String)
使用指定的类型、属性和命名空间为 .NET 类型生成到 XML 架构元素的映射。Generates a mapping to an XML Schema element for a .NET type, using the specified type, attribute, and namespace.
此 API 支持产品基础结构,不能在代码中直接使用。
public:
System::Xml::Serialization::XmlTypeMapping ^ ImportTypeMapping(Type ^ type, System::Xml::Serialization::XmlRootAttribute ^ root, System::String ^ defaultNamespace);
public System.Xml.Serialization.XmlTypeMapping ImportTypeMapping (Type type, System.Xml.Serialization.XmlRootAttribute? root, string? defaultNamespace);
public System.Xml.Serialization.XmlTypeMapping ImportTypeMapping (Type type, System.Xml.Serialization.XmlRootAttribute root, string defaultNamespace);
member this.ImportTypeMapping : Type * System.Xml.Serialization.XmlRootAttribute * string -> System.Xml.Serialization.XmlTypeMapping
Public Function ImportTypeMapping (type As Type, root As XmlRootAttribute, defaultNamespace As String) As XmlTypeMapping
参数
- type
- Type
将为其生成类型映射的 .NET 类型。The .NET type for which to generate a type mapping.
- root
- XmlRootAttribute
应用于类型的 XmlRootAttribute 特性。An XmlRootAttribute attribute that is applied to the type.
- defaultNamespace
- String
要使用的默认 XML 命名空间。The default XML namespace to use.
返回
XmlTypeMapping,其中包含一个类型到一个 XML 架构元素的 .NET 内部映射。An XmlTypeMapping that contains the internal .NET mapping of a type to an XML Schema element.
注解
不需要 ImportTypeMapping 直接调用方法。It is not necessary to call the ImportTypeMapping method directly.