편집

다음을 통해 공유


ScopingExtensions.Imports Method

Definition

Determines whether the specified part imports the specified contract.

Overloads

Imports(ComposablePartDefinition, String)

Determines whether the specified part imports the specified contract.

Imports(ComposablePartDefinition, String, ImportCardinality)

Determines whether the specified part imports the specified contract with the specified cardinality.

Imports(ComposablePartDefinition, String)

Source:
ScopingExtensions.cs
Source:
ScopingExtensions.cs
Source:
ScopingExtensions.cs
Source:
ScopingExtensions.cs

Determines whether the specified part imports the specified contract.

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

Parameters

part
ComposablePartDefinition

The part to search.

contractName
String

The name of the contract.

Returns

true if part imports the specified contract; otherwise, false.

Applies to

Imports(ComposablePartDefinition, String, ImportCardinality)

Source:
ScopingExtensions.cs
Source:
ScopingExtensions.cs
Source:
ScopingExtensions.cs
Source:
ScopingExtensions.cs

Determines whether the specified part imports the specified contract with the specified cardinality.

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

Parameters

part
ComposablePartDefinition

The part to search.

contractName
String

The name of the contract.

importCardinality
ImportCardinality

The cardinality of the contract.

Returns

true if part imports a contract that has the specified name and cardinality; otherwise, false.

Applies to