Show / Hide Table of Contents

Class DecoratorContainerBuilderExtensions

Extension methods for the Autofac ContainerBuilder.

Inheritance
System.Object
DecoratorContainerBuilderExtensions
Inherited Members
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Namespace: Autofac
Assembly: CSF.DecoratorBuilder.Autofac.dll
Syntax
public static class DecoratorContainerBuilderExtensions

Methods

| Improve this Doc View Source

RegisterDecoratedService<TService>(ContainerBuilder, Func<ICreatesAutofacDecorator<TService>, Parameter[], ICustomizesAutofacDecorator<TService>>)

Registers a service created with the decorator pattern.

Declaration
public static IRegistrationBuilder<TService, SimpleActivatorData, SingleRegistrationStyle> RegisterDecoratedService<TService>(this ContainerBuilder builder, Func<ICreatesAutofacDecorator<TService>, Parameter[], ICustomizesAutofacDecorator<TService>> customizationFunc)
    where TService : class
Parameters
Type Name Description
Autofac.ContainerBuilder builder

A container builder.

System.Func<ICreatesAutofacDecorator<TService>, Autofac.Core.Parameter[], ICustomizesAutofacDecorator<TService>> customizationFunc

A customization function, to build the 'shape' of the decorated service.

Returns
Type Description
Autofac.Builder.IRegistrationBuilder<TService, Autofac.Builder.SimpleActivatorData, Autofac.Builder.SingleRegistrationStyle>

The registration builder.

Type Parameters
Name Description
TService

The service type, typically an interface.

| Improve this Doc View Source

RegisterDecoratedService<TService>(ContainerBuilder, Func<ICreatesAutofacDecorator<TService>, ICustomizesAutofacDecorator<TService>>)

Registers a service created with the decorator pattern.

Declaration
public static IRegistrationBuilder<TService, SimpleActivatorData, SingleRegistrationStyle> RegisterDecoratedService<TService>(this ContainerBuilder builder, Func<ICreatesAutofacDecorator<TService>, ICustomizesAutofacDecorator<TService>> customizationFunc)
    where TService : class
Parameters
Type Name Description
Autofac.ContainerBuilder builder

A container builder.

System.Func<ICreatesAutofacDecorator<TService>, ICustomizesAutofacDecorator<TService>> customizationFunc

A customization function, to build the 'shape' of the decorated service.

Returns
Type Description
Autofac.Builder.IRegistrationBuilder<TService, Autofac.Builder.SimpleActivatorData, Autofac.Builder.SingleRegistrationStyle>

The registration builder.

Type Parameters
Name Description
TService

The service type, typically an interface.

| Improve this Doc View Source

RegisterDecoratedServiceType(ContainerBuilder, Type, Func<ICreatesAutofacDecorator, Parameter[], ICustomizesAutofacDecorator>)

Registers a service type created with the decorator pattern.

Declaration
public static IRegistrationBuilder<object, SimpleActivatorData, SingleRegistrationStyle> RegisterDecoratedServiceType(this ContainerBuilder builder, Type serviceType, Func<ICreatesAutofacDecorator, Parameter[], ICustomizesAutofacDecorator> customizationFunc)
Parameters
Type Name Description
Autofac.ContainerBuilder builder

A container builder.

System.Type serviceType

The service type, typically an interface.

System.Func<ICreatesAutofacDecorator, Autofac.Core.Parameter[], ICustomizesAutofacDecorator> customizationFunc

A customization function, to build the 'shape' of the decorated service.

Returns
Type Description
Autofac.Builder.IRegistrationBuilder<System.Object, Autofac.Builder.SimpleActivatorData, Autofac.Builder.SingleRegistrationStyle>

The registration builder.

| Improve this Doc View Source

RegisterDecoratedServiceType(ContainerBuilder, Type, Func<ICreatesAutofacDecorator, ICustomizesAutofacDecorator>)

Registers a service type created with the decorator pattern.

Declaration
public static IRegistrationBuilder<object, SimpleActivatorData, SingleRegistrationStyle> RegisterDecoratedServiceType(this ContainerBuilder builder, Type serviceType, Func<ICreatesAutofacDecorator, ICustomizesAutofacDecorator> customizationFunc)
Parameters
Type Name Description
Autofac.ContainerBuilder builder

A container builder.

System.Type serviceType

The service type, typically an interface.

System.Func<ICreatesAutofacDecorator, ICustomizesAutofacDecorator> customizationFunc

A customization function, to build the 'shape' of the decorated service.

Returns
Type Description
Autofac.Builder.IRegistrationBuilder<System.Object, Autofac.Builder.SimpleActivatorData, Autofac.Builder.SingleRegistrationStyle>

The registration builder.

  • Improve this Doc
  • View Source
In This Article
Back to top Generated by DocFX