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.

CompositionContract::TryUnwrapMetadataConstraint<T> Method (String^, T, CompositionContract^)

.NET Framework (current version)
 

Gets a metadata constraint that has the specified type and name, if it exists.

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

public:
generic<typename T>
bool TryUnwrapMetadataConstraint(
	String^ constraintName,
	[OutAttribute] T% constraintValue,
	[OutAttribute] CompositionContract^% remainingContract
)

Parameters

constraintName
Type: System::String^

The name of the metadata constraint.

constraintValue
Type: T

After this method returns, holds the value of the constraint if it was found.

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

After this method returns, holds the contract with the constraint removed, if the constraint was found.

Return Value

Type: System::Boolean

true if the constraint was found; otherwise, false.

Type Parameters

T

The type of the metadata constraint value.

Return to top
Show:
© 2017 Microsoft