AttributedModelServices.Imports 方法

定义

返回指示指定的部分是否包含与指定协定相匹配的导入的值。

重载

Imports(ComposablePartDefinition, Type)

返回指示指定的部分是否包含与指定协定类型相匹配的导入的值。

Imports(ComposablePartDefinition, Type, ImportCardinality)

返回指示指定的部分是否包含与指定协定类型和导入基数相匹配的导入的值。

Imports<T>(ComposablePartDefinition)

返回指示指定的部分是否包含与指定协定类型相匹配的导入的值。

Imports<T>(ComposablePartDefinition, ImportCardinality)

返回指示指定的部分是否包含与指定协定类型和导入基数相匹配的导入的值。

Imports(ComposablePartDefinition, Type)

Source:
AttributedModelServices.cs
Source:
AttributedModelServices.cs
Source:
AttributedModelServices.cs

返回指示指定的部分是否包含与指定协定类型相匹配的导入的值。

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

参数

part
ComposablePartDefinition

要搜索的部件。

contractType
Type

协定类型。

返回

如果 part 包含与 contractType 匹配的导入定义,则为 true;否则为 false

适用于

Imports(ComposablePartDefinition, Type, ImportCardinality)

Source:
AttributedModelServices.cs
Source:
AttributedModelServices.cs
Source:
AttributedModelServices.cs

返回指示指定的部分是否包含与指定协定类型和导入基数相匹配的导入的值。

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

参数

part
ComposablePartDefinition

要搜索的部件。

contractType
Type

协定类型。

importCardinality
ImportCardinality

导入基数。

返回

如果 part 包含与 contractTypeimportCardinality 匹配的导入定义,则为 true;否则为 false

适用于

Imports<T>(ComposablePartDefinition)

Source:
AttributedModelServices.cs
Source:
AttributedModelServices.cs
Source:
AttributedModelServices.cs

返回指示指定的部分是否包含与指定协定类型相匹配的导入的值。

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

类型参数

T

协定类型。

参数

part
ComposablePartDefinition

要搜索的部件。

返回

如果 part 包含类型 T 的导入定义,则为 true;否则为 false

适用于

Imports<T>(ComposablePartDefinition, ImportCardinality)

Source:
AttributedModelServices.cs
Source:
AttributedModelServices.cs
Source:
AttributedModelServices.cs

返回指示指定的部分是否包含与指定协定类型和导入基数相匹配的导入的值。

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

类型参数

T

协定类型。

参数

part
ComposablePartDefinition

要搜索的部件。

importCardinality
ImportCardinality

导入基数。

返回

如果 part 包含具有指定的导入基数类型 T 的导入定义,则为 true;否则为 false

适用于