ExportAttribute 构造函数
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
初始化 ExportAttribute 类的新实例。
重载
| 名称 | 说明 |
|---|---|
| ExportAttribute() |
初始化类的新实例 ExportAttribute ,在默认协定名称下导出用此属性标记的类型或成员。 |
| ExportAttribute(String) |
初始化类的新实例 ExportAttribute ,导出在指定协定名称下用此属性标记的类型或成员。 |
| ExportAttribute(Type) |
初始化类的新实例 ExportAttribute ,在派生自指定类型的协定名称下导出用此属性标记的类型或成员。 |
| ExportAttribute(String, Type) |
初始化类的新实例 ExportAttribute ,在指定的协定名称下导出指定类型。 |
ExportAttribute()
- Source:
- ExportAttribute.cs
- Source:
- ExportAttribute.cs
- Source:
- ExportAttribute.cs
- Source:
- ExportAttribute.cs
初始化类的新实例 ExportAttribute ,在默认协定名称下导出用此属性标记的类型或成员。
public:
ExportAttribute();
public ExportAttribute();
Public Sub New ()
注解
默认协定名称是在属性或字段类型上调用 GetContractName 方法的结果,或者调用用此属性标记的类型。
用此属性标记的方法必须通过使用或ExportAttribute(String)ExportAttribute(Type)指定协定名称或类型。
通过使用属性执行区分大小写的非语言比较来比较 Ordinal 协定名称。
适用于
ExportAttribute(String)
- Source:
- ExportAttribute.cs
- Source:
- ExportAttribute.cs
- Source:
- ExportAttribute.cs
- Source:
- ExportAttribute.cs
初始化类的新实例 ExportAttribute ,导出在指定协定名称下用此属性标记的类型或成员。
public:
ExportAttribute(System::String ^ contractName);
public ExportAttribute(string? contractName);
public ExportAttribute(string contractName);
new System.ComponentModel.Composition.ExportAttribute : string -> System.ComponentModel.Composition.ExportAttribute
Public Sub New (contractName As String)
参数
- contractName
- String
用于导出用此属性标记的类型或成员的协定名称,或者 null 使用默认协定名称的空字符串 (“”) 。
注解
默认协定名称是在属性或字段类型上调用 GetContractName 方法的结果,或者调用此属性标记的类型。
用此属性标记的方法必须通过使用或ExportAttribute(String)ExportAttribute(Type)指定协定名称或类型。
通过使用属性执行区分大小写的非语言比较来比较 Ordinal 协定名称。
适用于
ExportAttribute(Type)
- Source:
- ExportAttribute.cs
- Source:
- ExportAttribute.cs
- Source:
- ExportAttribute.cs
- Source:
- ExportAttribute.cs
初始化类的新实例 ExportAttribute ,在派生自指定类型的协定名称下导出用此属性标记的类型或成员。
public:
ExportAttribute(Type ^ contractType);
public ExportAttribute(Type? contractType);
public ExportAttribute(Type contractType);
new System.ComponentModel.Composition.ExportAttribute : Type -> System.ComponentModel.Composition.ExportAttribute
Public Sub New (contractType As Type)
参数
- contractType
- Type
从中派生用于导出用此属性标记的类型或成员的协定名称,或使用 null 默认协定名称的类型。
注解
协定名称是调用方法 GetContractName 时 contractType的结果。
默认协定名称是在属性或字段类型上调用 GetContractName 方法的结果,或者调用用此属性标记的类型。
用此属性标记的方法必须通过使用或ExportAttribute(String)ExportAttribute(Type)指定协定名称或类型。
通过使用属性执行区分大小写的非语言比较来比较 Ordinal 协定名称。
适用于
ExportAttribute(String, Type)
- Source:
- ExportAttribute.cs
- Source:
- ExportAttribute.cs
- Source:
- ExportAttribute.cs
- Source:
- ExportAttribute.cs
初始化类的新实例 ExportAttribute ,在指定的协定名称下导出指定类型。
public:
ExportAttribute(System::String ^ contractName, Type ^ contractType);
public ExportAttribute(string? contractName, Type? contractType);
public ExportAttribute(string contractName, Type contractType);
new System.ComponentModel.Composition.ExportAttribute : string * Type -> System.ComponentModel.Composition.ExportAttribute
Public Sub New (contractName As String, contractType As Type)
参数
- contractName
- String
用于导出用此属性标记的类型或成员的协定名称,或者 null 使用默认协定名称的空字符串 (“”) 。
- contractType
- Type
要导出的类型。
注解
默认协定名称是调用 AttributedModelServices.GetContractName(Type) 属性或字段类型的结果,或者调用用此属性标记的类型本身。
协定名称使用区分大小写的非语言比较进行比较 StringComparer.Ordinal。