PartConventionBuilder::AddPartMetadata Method (String^, Func<Type^, Object^>^)
.NET Framework (current version)
Adds metadata that has the specified name and value to the part. The value is returned by a function that maps the part type to the metadata value.
Assembly: System.Composition.Convention (in System.Composition.Convention.dll)
public:
PartConventionBuilder^ AddPartMetadata(
String^ name,
Func<Type^, Object^>^ getValueFromPartType
)
Parameters
- name
-
Type:
System::String^
The name of the metadata to add.
- getValueFromPartType
-
Type:
System::Func<Type^, Object^>^
A function that returns the metadata value on the part type.
Return Value
Type: System.Composition.Convention::PartConventionBuilder^A part builder that provides further configuration of the part.
Show: