NamespaceMapEntry 类

定义

提供 XamlTypeMapper 在 XML 命名空间、CLR 命名空间以及包含该 CLR 命名空间的相关类型的程序集之间建立映射所使用的信息。Provides information that the XamlTypeMapper uses for mapping between an XML namespace, a CLR namespace, and the assembly that contains the relevant types for that CLR namespace.

public ref class NamespaceMapEntry
public class NamespaceMapEntry
type NamespaceMapEntry = class
Public Class NamespaceMapEntry
继承
NamespaceMapEntry

注解

此类型特定于 XAML 的 WPF 实现。This type is specific to the WPF implementation of XAML. 如果在常规 XAML 实现中使用此方法, 则必须包含 WPF 程序集。If you use it in a general XAML implementation, you must include the WPF assemblies.

不需要包括 WPF 程序集的替代方法包括引用 xaml 架构上下文 (在中的服务提供程序上下文IXamlSchemaContextProvider中提供), 或从XamlObjectWriter.SchemaContext xaml 节点循环或常规 xaml 编写器引用框架中进行引用。XAML 架构上下文包括用于返回其程序集、首选前缀映射和 XAML 命名空间信息的 API。Alternative techniques that do not require including WPF assemblies include referencing the XAML schema context (available in a service provider context from IXamlSchemaContextProvider, or from XamlObjectWriter.SchemaContext from a XAML node loop or general XAML writer frame of reference.) The XAML schema context includes API for returning its assemblies, preferred prefix mappings, and XAML namespace information.

构造函数

NamespaceMapEntry()

初始化 NamespaceMapEntry 类的新实例。Initializes a new instance of the NamespaceMapEntry class.

NamespaceMapEntry(String, String, String)

使用所提供的 XML 命名空间、CLR 命名空间和程序集信息初始化 NamespaceMapEntry 类的新实例。Initializes a new instance of the NamespaceMapEntry class, using provided XML namespace, CLR namespace, and assembly information.

属性

AssemblyName

获取或设置包含 CLR 命名空间中类型的程序集名称。Gets or sets the assembly name that contains the types in the CLR namespace.

ClrNamespace

获取或设置包含要映射的类型的 CLR 命名空间。Gets or sets the CLR namespace that contains the types being mapped.

XmlNamespace

获取或设置要映射到的 XML 命名空间的映射前缀。Gets or sets the mapping prefix for the XML namespace being mapped to.

方法

Equals(Object)

确定指定的对象是否等于当前对象。Determines whether the specified object is equal to the current object.

(继承自 Object)
GetHashCode()

用作默认哈希函数。Serves as the default hash function.

(继承自 Object)
GetType()

获取当前实例的 TypeGets the Type of the current instance.

(继承自 Object)
MemberwiseClone()

创建当前 Object 的浅表副本。Creates a shallow copy of the current Object.

(继承自 Object)
ToString()

返回一个表示当前对象的 string。Returns a string that represents the current object.

(继承自 Object)

适用于

另请参阅