Share via


ImportConventionBuilder.AddMetadataConstraint Method

Definition

Overloads

AddMetadataConstraint(String, Func<Type,Object>)

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

AddMetadataConstraint(String, Object)

Adds a constraint to the import requiring the specified metadata name and value.

AddMetadataConstraint(String, Func<Type,Object>)

Source:
ImportConventionBuilder.cs
Source:
ImportConventionBuilder.cs
Source:
ImportConventionBuilder.cs
Source:
ImportConventionBuilder.cs

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

public:
 System::Composition::Convention::ImportConventionBuilder ^ AddMetadataConstraint(System::String ^ name, Func<Type ^, System::Object ^> ^ getConstraintValueFromPartType);
public System.Composition.Convention.ImportConventionBuilder AddMetadataConstraint (string name, Func<Type,object> getConstraintValueFromPartType);
member this.AddMetadataConstraint : string * Func<Type, obj> -> System.Composition.Convention.ImportConventionBuilder
Public Function AddMetadataConstraint (name As String, getConstraintValueFromPartType As Func(Of Type, Object)) As ImportConventionBuilder

Parameters

name
String

The required metadata name.

getConstraintValueFromPartType
Func<Type,Object>

A function that provides the required metadata value.

Returns

An import builder containing the constraint that allows for further configuration.

Applies to

AddMetadataConstraint(String, Object)

Source:
ImportConventionBuilder.cs
Source:
ImportConventionBuilder.cs
Source:
ImportConventionBuilder.cs
Source:
ImportConventionBuilder.cs

Adds a constraint to the import requiring the specified metadata name and value.

public:
 System::Composition::Convention::ImportConventionBuilder ^ AddMetadataConstraint(System::String ^ name, System::Object ^ value);
public System.Composition.Convention.ImportConventionBuilder AddMetadataConstraint (string name, object value);
member this.AddMetadataConstraint : string * obj -> System.Composition.Convention.ImportConventionBuilder
Public Function AddMetadataConstraint (name As String, value As Object) As ImportConventionBuilder

Parameters

name
String

The required metadata name.

value
Object

The required metadata value.

Returns

An import builder containing the constraint that allows for further configuration.

Applies to