ImportConventionBuilder::AddMetadataConstraint Method (String^, Func<Type^, Object^>^)

.NET Framework (current version)
 

Adds a constraint to the import requiring the specified metadata name and the value provided by the specified function on the part type.

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

public:
ImportConventionBuilder^ AddMetadataConstraint(
	String^ name,
	Func<Type^, Object^>^ getConstraintValueFromPartType
)

Parameters

name
Type: System::String^

The required metadata name.

getConstraintValueFromPartType
Type: System::Func<Type^, Object^>^

A function that provides the required metadata value.

Return Value

Type: System.Composition.Convention::ImportConventionBuilder^

An import builder that provides further configuration.

Return to top
Show: