ScopingExtensions.Imports Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
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
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
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
.NET