C# Class Revenj.Extensibility.Autofac.ContainerBuilder

Used to build an IContainer from component registrations.
Most ContainerBuilder functionality is accessed via extension methods in RegistrationExtensions.
Inheritance: IObjectFactoryBuilder
Afficher le fichier Open project: ngs-doo/revenj Class Usage Examples

Méthodes publiques

Méthode Description
Add ( IFactoryBuilderFunc item ) : void
Add ( IFactoryBuilderInstance item ) : void
Add ( IFactoryBuilderType item ) : void
Build ( ContainerBuildOptions options = ContainerBuildOptions.Default ) : IContainer

Create a new container with the component registrations that have been made.

Build can only be called once per ContainerBuilder - this prevents ownership issues for provided instances. Build enables support for the relationship types that come with Autofac (e.g. Func, Owned, Meta, Lazy, IEnumerable.) To exclude support for these types, first create the container, then call Update() on the builder.

RegisterCallback ( Action configurationCallback ) : void

Register a callback that will be invoked when the container is configured.

This is primarily for extending the builder syntax.

Private Methods

Méthode Description
Build ( IComponentRegistry componentRegistry, bool excludeDefaultModules ) : void
RegisterDefaultAdapters ( IComponentRegistry componentRegistry ) : void
StartStartableComponents ( IComponentContext componentContext ) : void
Update ( IComponentRegistry componentRegistry ) : void

Method Details

Add() public méthode

public Add ( IFactoryBuilderFunc item ) : void
item IFactoryBuilderFunc
Résultat void

Add() public méthode

public Add ( IFactoryBuilderInstance item ) : void
item IFactoryBuilderInstance
Résultat void

Add() public méthode

public Add ( IFactoryBuilderType item ) : void
item IFactoryBuilderType
Résultat void

Build() public méthode

Create a new container with the component registrations that have been made.
Build can only be called once per ContainerBuilder - this prevents ownership issues for provided instances. Build enables support for the relationship types that come with Autofac (e.g. Func, Owned, Meta, Lazy, IEnumerable.) To exclude support for these types, first create the container, then call Update() on the builder.
public Build ( ContainerBuildOptions options = ContainerBuildOptions.Default ) : IContainer
options ContainerBuildOptions Options that influence the way the container is initialised.
Résultat IContainer

RegisterCallback() public méthode

Register a callback that will be invoked when the container is configured.
This is primarily for extending the builder syntax.
public RegisterCallback ( Action configurationCallback ) : void
configurationCallback Action Callback to execute.
Résultat void