C# Class Castle.Facilities.DynamicLoader.DynamicLoaderFacility

DynamicLoader facility.
Inheritance: System.MarshalByRefObject, IFacility, IDisposable
Show file Open project: nats/castle-1.0.3-mono

Public Methods

Method Description
Dispose ( ) : void

IDisposable implementation. Releases all RemoteLoaders and AppDomains.

Init ( IKernel kernel, IConfiguration facilityConfig ) : void

Initializes the facility.

Terminate ( ) : void

Terminates the facility.

Protected Methods

Method Description
Dispose ( bool disposing ) : void
GetConfigAttribute ( IConfiguration cfg, string attribute, string defaultValue ) : string
GetCurrentAppRootDirectory ( ) : string

Gets the root directory of the current application. For web applications, it is obtained from HttpServerUtility.MapPath. For other applications, AppDomain.BaseDirectory is used.

Init ( ) : void
InitializeBatchRegistration ( RemoteLoader loader, IConfiguration batchRegistrationNode ) : void
NormalizeDirectoryPath ( string path ) : string

Normalizes a directory path. It includes resolving parent (..) paths and the ~ prefix, which maps to the root of the current application.

Private Methods

Method Description
CreateAppDomain ( IConfiguration domainNode ) : AppDomain
CreateRemoteLoader ( AppDomain appDomain ) : RemoteLoader
GetChildNodeValue ( IConfiguration cfg, string nodeName ) : string
InitializeBatchComponents ( RemoteLoader loader, IConfiguration componentsNode ) : void

Register each batch component.

An example of a valid configuration node: <component id="componentid.*"> <providesService service="Company.Project.IService, Company.Project" /> </component>

IsEmpty ( string value ) : bool
IsTrue ( string value ) : bool

Method Details

Dispose() public method

IDisposable implementation. Releases all RemoteLoaders and AppDomains.
public Dispose ( ) : void
return void

Dispose() protected method

protected Dispose ( bool disposing ) : void
disposing bool
return void

GetConfigAttribute() protected method

protected GetConfigAttribute ( IConfiguration cfg, string attribute, string defaultValue ) : string
cfg IConfiguration
attribute string
defaultValue string
return string

GetCurrentAppRootDirectory() protected method

Gets the root directory of the current application. For web applications, it is obtained from HttpServerUtility.MapPath. For other applications, AppDomain.BaseDirectory is used.
protected GetCurrentAppRootDirectory ( ) : string
return string

Init() protected method

protected Init ( ) : void
return void

Init() public method

Initializes the facility.
public Init ( IKernel kernel, IConfiguration facilityConfig ) : void
kernel IKernel
facilityConfig IConfiguration
return void

InitializeBatchRegistration() protected method

protected InitializeBatchRegistration ( RemoteLoader loader, IConfiguration batchRegistrationNode ) : void
loader RemoteLoader
batchRegistrationNode IConfiguration
return void

NormalizeDirectoryPath() protected method

Normalizes a directory path. It includes resolving parent (..) paths and the ~ prefix, which maps to the root of the current application.
protected NormalizeDirectoryPath ( string path ) : string
path string The directory path
return string

Terminate() public method

Terminates the facility.
public Terminate ( ) : void
return void