Imports Method (ComposablePartDefinition, Type)

AttributedModelServices.Imports Method (ComposablePartDefinition, Type)

.NET Framework 4.6 and 4.5

Returns a value that indicates whether the specified part contains an import that matches the specified contract type.

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

public static bool Imports(
	this ComposablePartDefinition part,
	Type contractType


Type: System.ComponentModel.Composition.Primitives.ComposablePartDefinition

The part to search.

Type: System.Type

The contract type.

Return Value

Type: System.Boolean

true if part contains an import definition that matches contractType; otherwise, false.

.NET Framework
Available since 4.5
Return to top
© 2015 Microsoft