Method RegisterGenericDecorator
- Namespace
- Autofac
- Assembly
- Autofac.dll
RegisterGenericDecorator(ContainerBuilder, Type, Type, object, object?)
public static IRegistrationBuilder<object, OpenGenericDecoratorActivatorData, DynamicRegistrationStyle> RegisterGenericDecorator(this ContainerBuilder builder, Type decoratorType, Type decoratedServiceType, object fromKey, object? toKey = null)
Parameters
builderContainerBuilderdecoratorTypeTypedecoratedServiceTypeTypefromKeyobjecttoKeyobject
Returns
RegisterGenericDecorator(ContainerBuilder, Type, Type, Func<IDecoratorContext, bool>?)
public static void RegisterGenericDecorator(this ContainerBuilder builder, Type decoratorType, Type serviceType, Func<IDecoratorContext, bool>? condition = null)
Parameters
builderContainerBuilderdecoratorTypeTypeserviceTypeTypeconditionFunc<IDecoratorContext, bool>