C# 클래스 Revenj.Extensibility.Autofac.ContainerBuilder

Used to build an IContainer from component registrations.
Most ContainerBuilder functionality is accessed via extension methods in RegistrationExtensions.
상속: IObjectFactoryBuilder
파일 보기 프로젝트 열기: ngs-doo/revenj 1 사용 예제들

공개 메소드들

메소드 설명
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.

비공개 메소드들

메소드 설명
Build ( IComponentRegistry componentRegistry, bool excludeDefaultModules ) : void
RegisterDefaultAdapters ( IComponentRegistry componentRegistry ) : void
StartStartableComponents ( IComponentContext componentContext ) : void
Update ( IComponentRegistry componentRegistry ) : void

메소드 상세

Add() 공개 메소드

public Add ( IFactoryBuilderFunc item ) : void
item IFactoryBuilderFunc
리턴 void

Add() 공개 메소드

public Add ( IFactoryBuilderInstance item ) : void
item IFactoryBuilderInstance
리턴 void

Add() 공개 메소드

public Add ( IFactoryBuilderType item ) : void
item IFactoryBuilderType
리턴 void

Build() 공개 메소드

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.
리턴 IContainer

RegisterCallback() 공개 메소드

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.
리턴 void