Windows apps
Collapse the table of content
Expand the table of content
Information
The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.

CompositionContext::TryGetExport Method (Type^, String^, Object^)

.NET Framework (current version)
 

Returns the export that matches the specified contract name and type, or returns null if no match is found.

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

public:
bool TryGetExport(
	Type^ exportType,
	String^ contractName,
	[OutAttribute] Object^% export
)

Parameters

exportType
Type: System::Type^

The type to match.

contractName
Type: System::String^

The name to match.

export
Type: System::Object^

When this method returns, contains the matched export or null.

Return Value

Type: System::Boolean

true if an export was found; otherwise, false.

Return to top
Show:
© 2017 Microsoft