Click or drag to resize

ExtensionMethodsGetExportsTMetadata Method (IExportProvider, Type, FuncIMetadata, TMetadata)

Gets the exports for the specified parameters.

Namespace:  TomsToolbox.Composition
Assembly:  TomsToolbox.Composition (in TomsToolbox.Composition.dll)
Syntax
public static IEnumerable<IExport<Object, TMetadata>> GetExports<TMetadata>(
	this IExportProvider exportProvider,
	Type type,
	Func<IMetadata?, TMetadata> metadataFactory
)
where TMetadata : class

Parameters

exportProvider
Type: TomsToolbox.CompositionIExportProvider
The export provider.
type
Type: SystemType
The type of the requested object.
metadataFactory
Type: SystemFuncIMetadata, TMetadata
The factory method to create the metadata object from the metadata dictionary.

Type Parameters

TMetadata
The type of the metadata.

Return Value

Type: IEnumerableIExportObject, TMetadata
The exports.

Usage Note

In Visual Basic and C#, you can call this method as an instance method on any object of type IExportProvider. When you use instance method syntax to call this method, omit the first parameter. For more information, see Extension Methods (Visual Basic) or Extension Methods (C# Programming Guide).
See Also