Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
Exports Method

ScopingExtensions.Exports Method

.NET Framework 4.6 and 4.5

Gets a value that indicates whether the specified part exports the specified contract.

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

public static bool Exports(
	this ComposablePartDefinition part,
	string contractName


Type: System.ComponentModel.Composition.Primitives.ComposablePartDefinition

The part to search.

Type: System.String

The name of the contract.

Return Value

Type: System.Boolean
true if part exports the specified contract; otherwise, false.

Usage Note

In Visual Basic and C#, you can call this method as an instance method on any object of type ComposablePartDefinition. When you use instance method syntax to call this method, omit the first parameter. For more information, see Extension Methods (Visual Basic) or Extension Methods (C# Programming Guide).

.NET Framework

Supported in: 4.6, 4.5
© 2015 Microsoft