RegistrationExtensionsRegisterComposablePartCatalog Method (ContainerBuilder, ComposablePartCatalog, FuncExportDefinition, IEnumerableService) |
Register a MEF catalog.
Namespace:
Autofac.Integration.Mef
Assembly:
Autofac.Integration.Mef (in Autofac.Integration.Mef.dll) Version: 6.0.0+4280ac7e7f34f8dcbf61bbdf820a070216e453fc
Syntax public static void RegisterComposablePartCatalog(
this ContainerBuilder builder,
ComposablePartCatalog catalog,
Func<ExportDefinition, IEnumerable<Service>> exposedServicesMapper
)
<ExtensionAttribute>
Public Shared Sub RegisterComposablePartCatalog (
builder As ContainerBuilder,
catalog As ComposablePartCatalog,
exposedServicesMapper As Func(Of ExportDefinition, IEnumerable(Of Service))
)
Parameters
- builder
- Type: AutofacContainerBuilder
The container builder. - catalog
- Type: System.ComponentModel.Composition.PrimitivesComposablePartCatalog
The catalog to register. - exposedServicesMapper
- Type: SystemFuncExportDefinition, IEnumerableService
A mapping function to transform ExportDefinitions into Services.
Usage Note
In Visual Basic and C#, you can call this method as an instance method on any object of type
ContainerBuilder. 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