AttributedModelServices.Imports<T> Method (ComposablePartDefinition, 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.

Namespace:   System.ComponentModel.Composition
Assembly:  System.ComponentModel.Composition (in System.ComponentModel.Composition.dll)

public static bool Imports<T>(
	this ComposablePartDefinition part,
	ImportCardinality importCardinality

Return Value

Type: System.Boolean

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

Type Parameters


The contract type.

.NET Framework
Available since 4.5
Return to top