C# Класс Castle.Facilities.Startable.StartableFacility

Наследование: Castle.MicroKernel.Facilities.AbstractFacility
Показать файл Открыть проект Примеры использования класса

Открытые методы

Метод Описание
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