Class InitializableCompositeModule
Represents a base for an initializable composite module.
Inheritance
Implements
Inherited Members
Namespace: Loehnert.Lisrt.Modules
Assembly: Loehnert.Lisrt.Modules.dll
Syntax
public abstract class InitializableCompositeModule : CompositeModule, ICompositeModule, ILisrtModule, IInitializable, INotifyPropertyChangedEx, INotifyPropertyChanged
Constructors
InitializableCompositeModule(String)
Initializes a new instance of the InitializableCompositeModule class.
Declaration
public InitializableCompositeModule(string name)
Parameters
Type | Name | Description |
---|---|---|
String | name | The name of the instance. |
Exceptions
Type | Condition |
---|---|
System.ArgumentNullException | Thrown when |
InitializableCompositeModule(String, ILisrtModule[])
Initializes a new instance of the InitializableCompositeModule class.
Declaration
public InitializableCompositeModule(string name, params ILisrtModule[] subModules)
Parameters
Type | Name | Description |
---|---|---|
String | name | The name of the instance. |
ILisrtModule[] | subModules | Sub modules of the instance. |
Properties
InitializationState
Gets or sets the initialization state.
Declaration
public InitializationState InitializationState { get; protected set; }
Property Value
Type | Description |
---|---|
InitializationState |
Methods
Exit()
Deinitializes the module and all of its sub modules, whose InitializationState doesn't equals to NotInitialized.
Declaration
public virtual void Exit()
Initialize()
Initializes the module.
Declaration
public abstract void Initialize()
Remarks
Initialize your module in a try-catch, then call the InitializeSubModules() to initialize the submodules. Re-throw the exception in the catch block, with ThrowWithModuleInformation(Exception, ILisrtModule). Don't forget to set the InitializationState. Note that you can initialize a submodule yourself if it is required for the initialization of this module.
InitializeSubModules()
Initializes the submodules and re-throws exceptions with module informations. Note: Just the SubModules and not recursive.
Declaration
protected void InitializeSubModules()