ScopingExtensions.Imports Method (System.ComponentModel.Composition.Hosting) | Microsoft Learn
- Determines whether the specified part imports the specified contract with the specified cardinality.
- true if part imports a contract that has the specified name and cardinality; otherwise, false.
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
Public Function Imports (part As ComposablePartDefinition, contractName As String, importCardinality As ImportCardinality) As Boolean
Parameters
contractName
String
The name of the contract.
Returns
true if part imports a contract that has the specified name and cardinality; otherwise, false.
