AttributedModelServices.Exports 方法

定义

重载

Exports(ComposablePartDefinition, Type)

返回指示指定的部分是否包含与指定协定类型相匹配的导出的值。Returns a value that indicates whether the specified part contains an export that matches the specified contract type.

Exports<T>(ComposablePartDefinition)

返回指示指定的部分是否包含与指定协定类型相匹配的导出的值。Returns a value that indicates whether the specified part contains an export that matches the specified contract type.

Exports(ComposablePartDefinition, Type)

返回指示指定的部分是否包含与指定协定类型相匹配的导出的值。Returns a value that indicates whether the specified part contains an export that matches the specified contract type.

public:
[System::Runtime::CompilerServices::Extension]
 static bool Exports(System::ComponentModel::Composition::Primitives::ComposablePartDefinition ^ part, Type ^ contractType);
public static bool Exports (this System.ComponentModel.Composition.Primitives.ComposablePartDefinition part, Type contractType);
static member Exports : System.ComponentModel.Composition.Primitives.ComposablePartDefinition * Type -> bool
<Extension()>
Public Function Exports (part As ComposablePartDefinition, contractType As Type) As Boolean

参数

part
ComposablePartDefinition

要搜索的部件。The part to search.

contractType
Type

协定类型。The contract type.

返回

Boolean

如果 part 包含与 contractType 匹配的导出定义,则为 true;否则为 falsetrue if part contains an export definition that matches contractType; otherwise, false.

适用于

产品 已引入

Exports<T>(ComposablePartDefinition)

返回指示指定的部分是否包含与指定协定类型相匹配的导出的值。Returns a value that indicates whether the specified part contains an export that matches the specified contract type.

public:
generic <typename T>
[System::Runtime::CompilerServices::Extension]
 static bool Exports(System::ComponentModel::Composition::Primitives::ComposablePartDefinition ^ part);
public static bool Exports<T> (this System.ComponentModel.Composition.Primitives.ComposablePartDefinition part);
static member Exports : System.ComponentModel.Composition.Primitives.ComposablePartDefinition -> bool
<Extension()>
Public Function Exports(Of T) (part As ComposablePartDefinition) As Boolean

类型参数

T

协定类型。The contract type.

参数

part
ComposablePartDefinition

要搜索的部件。The part to search.

返回

Boolean

如果 part 包含类型 T 的导出定义,则为 true;否则为 falsetrue if part contains an export definition of type T; otherwise, false.

适用于

产品 已引入