CompositionContext::TryGetExport Method (CompositionContract^, Object^)

.NET Framework (current version)
 

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

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

public:
virtual bool TryGetExport(
	CompositionContract^ contract,
	[OutAttribute] Object^% export
) abstract

Parameters

contract
Type: System.Composition.Hosting.Core::CompositionContract^

The contract 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: