Modifier

Partager via


AttributedModelServices.Imports Method

Definition

Returns a value that indicates whether a specified part contains an import that matches a specified contract.

Overloads

Imports(ComposablePartDefinition, Type)

Returns a value that indicates whether the specified part contains an import that matches the specified contract type.

Imports(ComposablePartDefinition, Type, ImportCardinality)

Returns a value that indicates whether the specified part contains an import that matches the specified contract type and import cardinality.

Imports<T>(ComposablePartDefinition)

Returns a value that indicates whether the specified part contains an import that matches the specified contract type.

Imports<T>(ComposablePartDefinition, ImportCardinality)

Returns a value that indicates whether the specified part contains an import that matches the specified contract type and import cardinality.

Imports(ComposablePartDefinition, Type)

Source:
AttributedModelServices.cs
Source:
AttributedModelServices.cs

Returns a value that indicates whether the specified part contains an import that matches the specified contract type.

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

Parameters

part
ComposablePartDefinition

The part to search.

contractType
Type

The contract type.

Returns

true if part contains an import definition that matches contractType; otherwise, false.

Applies to

Imports(ComposablePartDefinition, Type, ImportCardinality)

Source:
AttributedModelServices.cs
Source:
AttributedModelServices.cs

Returns a value that indicates whether the specified part contains an import that matches the specified contract type and import cardinality.

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

Parameters

part
ComposablePartDefinition

The part to search.

contractType
Type

The contract type.

importCardinality
ImportCardinality

The import cardinality.

Returns

true if part contains an import definition that matches contractType and importCardinality; otherwise, false.

Applies to

Imports<T>(ComposablePartDefinition)

Source:
AttributedModelServices.cs
Source:
AttributedModelServices.cs

Returns a value that indicates whether the specified part contains an import that matches the specified contract type.

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

Type Parameters

T

The contract type.

Parameters

part
ComposablePartDefinition

The part to search.

Returns

true if part contains an import definition of type T; otherwise, false.

Applies to

Imports<T>(ComposablePartDefinition, ImportCardinality)

Source:
AttributedModelServices.cs
Source:
AttributedModelServices.cs

Returns a value that indicates whether the specified part contains an import that matches the specified contract type and import cardinality.

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

Type Parameters

T

The contract type.

Parameters

part
ComposablePartDefinition

The part to search.

importCardinality
ImportCardinality

The import cardinality.

Returns

true if part contains an import definition of type T that has the specified import cardinality; otherwise, false.

Applies to