AttributedModelServices::Imports Method (ComposablePartDefinition^, Type^, ImportCardinality)
.NET Framework (current version)
Returns a value that indicates whether the specified part contains an import that matches the specified contract type and import cardinality.
Assembly: System.ComponentModel.Composition (in System.ComponentModel.Composition.dll)
public: [ExtensionAttribute] static bool Imports( ComposablePartDefinition^ part, Type^ contractType, ImportCardinality importCardinality )
Parameters
- part
-
Type:
System.ComponentModel.Composition.Primitives::ComposablePartDefinition^
The part to search.
- contractType
-
Type:
System::Type^
The contract type.
- importCardinality
-
Type:
System.ComponentModel.Composition.Primitives::ImportCardinality
The import cardinality.
Return Value
Type: System::Booleantrue if part contains an import definition that matches contractType and importCardinality; otherwise, false.
.NET Framework
Available since 4.5
Available since 4.5
Show: