C# 클래스 Castle.Facilities.Startable.StartableFacility

상속: Castle.MicroKernel.Facilities.AbstractFacility
파일 보기 프로젝트 열기: 7digital/Castle.Windsor 1 사용 예제들

공개 메소드들

메소드 설명
DeferredStart ( ) : void

This method changes behavior of the facility. Deferred mode should be used when you have single call to IWindsorContainer.Install and register all your components there. Enabling this mode will optimize the behavior of the facility so that it will wait 'till the end of installation and only after all IWindsorInstallers were ran it will instantiate and start all the startable components. An exception will be thrown if a startable component can't be instantiated and started. This will help you fail fast and diagnose issues quickly. If you don't want the exception to be thrown and you prefer the component to fail silently, use DeferredTryStart method instead.

It is recommended to use this method over DeferredTryStart method.

DeferredTryStart ( ) : void

This method changes behavior of the facility. Deferred mode should be used when you have single call to IWindsorContainer.Install and register all your components there. Enabling this mode will optimize the behavior of the facility so that it will wait 'till the end of installation and only after all IWindsorInstallers were ran it will instantiate and start all the startable components. No exception will be thrown if a startable component can't be instantiated and started. If you'd rather fail fast and diagnose issues quickly, use DeferredStart method instead.

It is recommended to use DeferredStart method over this method.

보호된 메소드들

메소드 설명
Init ( ) : void

비공개 메소드들

메소드 설명
AddHandlerToWaitingList ( IHandler handler ) : void
CacheForStart ( string key, IHandler handler ) : void
CheckWaitingList ( ) : void

For each new component registered, some components in the WaitingDependency state may have became valid, so we check them

IsStartable ( IHandler handler ) : bool
OnComponentRegistered ( String key, IHandler handler ) : void
OnHandlerStateChanged ( object source, EventArgs args ) : void
Start ( IHandler handler ) : void
StartAll ( bool &statechanged ) : void
StartAllInternal ( object sender, EventArgs e ) : void
TryStart ( IHandler handler ) : bool

Request the component instance

메소드 상세

DeferredStart() 공개 메소드

This method changes behavior of the facility. Deferred mode should be used when you have single call to IWindsorContainer.Install and register all your components there. Enabling this mode will optimize the behavior of the facility so that it will wait 'till the end of installation and only after all IWindsorInstallers were ran it will instantiate and start all the startable components. An exception will be thrown if a startable component can't be instantiated and started. This will help you fail fast and diagnose issues quickly. If you don't want the exception to be thrown and you prefer the component to fail silently, use DeferredTryStart method instead.
It is recommended to use this method over DeferredTryStart method.
public DeferredStart ( ) : void
리턴 void

DeferredTryStart() 공개 메소드

This method changes behavior of the facility. Deferred mode should be used when you have single call to IWindsorContainer.Install and register all your components there. Enabling this mode will optimize the behavior of the facility so that it will wait 'till the end of installation and only after all IWindsorInstallers were ran it will instantiate and start all the startable components. No exception will be thrown if a startable component can't be instantiated and started. If you'd rather fail fast and diagnose issues quickly, use DeferredStart method instead.
It is recommended to use DeferredStart method over this method.
public DeferredTryStart ( ) : void
리턴 void

Init() 보호된 메소드

protected Init ( ) : void
리턴 void