C# Class Castle.Facilities.DynamicLoader.RemoteLoader

Loads components on an isolated AppDomain.
Inheritance: System.MarshalByRefObject, IDisposable
Mostra file Open project: nats/castle-1.0.3-mono Class Usage Examples

Public Methods

Method Description
CreateRemoteInstance ( ComponentModel model, CreationContext context, object arguments, Type signature ) : object

Creates a component on an isolated AppDomain.

Dispose ( ) : void

Disposes the Kernel.

InitializeLifetimeService ( ) : object

Overrides MarshalByRefObject.InitializeLifetimeService, so no lease is returned and the object is kept in memory as long as the host application domain is running.

RegisterByServiceProvided ( string componentIdMask ) : void

Searches for implementations of the given services in the current AppDomain and add as components. Used by DynamicLoaderFacility.InitializeBatchRegistration.

RemoteLoader ( ) : System

Creates a new RemoteLoader. This constructor should not be called directly in the code, but via System.AppDomain.CreateInstance(string,string).

Private Methods

Method Description
GenerateComponentId ( ) : string

Generates an unique component id, given the componentIdMask.

IsValidServiceImplementation ( Type serviceType, Type t ) : bool

Checks whether a type t is a valid implementation of a given service serviceType.

LoadAllAssemblies ( ) : void

Loads all assemblies in the current AppDomain.

Method Details

CreateRemoteInstance() public method

Creates a component on an isolated AppDomain.
public CreateRemoteInstance ( ComponentModel model, CreationContext context, object arguments, Type signature ) : object
model Castle.Core.ComponentModel
context Castle.MicroKernel.CreationContext
arguments object
signature System.Type
return object

Dispose() public method

Disposes the Kernel.
public Dispose ( ) : void
return void

InitializeLifetimeService() public method

Overrides MarshalByRefObject.InitializeLifetimeService, so no lease is returned and the object is kept in memory as long as the host application domain is running.
public InitializeLifetimeService ( ) : object
return object

RegisterByServiceProvided() public method

Searches for implementations of the given services in the current AppDomain and add as components. Used by DynamicLoaderFacility.InitializeBatchRegistration.
public RegisterByServiceProvided ( string componentIdMask ) : void
componentIdMask string The component id mask. Any * (asterisk) character will be replaced by a sequential number, starting by 1 (one).
return void

RemoteLoader() public method

Creates a new RemoteLoader. This constructor should not be called directly in the code, but via System.AppDomain.CreateInstance(string,string).
public RemoteLoader ( ) : System
return System