Table of Contents

Class InitializableCompositeModule

Namespace
Loehnert.Lisrt.Modules
Assembly
Loehnert.Lisrt.Modules.dll

Represents a base for an initializable composite module.

public abstract class InitializableCompositeModule : CompositeModule, ICompositeModule, ILisrtModule, IInitializable, INotifyPropertyChangedEx, INotifyPropertyChanged
Inheritance
PropertyChangedBase
InitializableCompositeModule
Implements
INotifyPropertyChangedEx
Derived
Inherited Members
PropertyChangedBase.Refresh()
PropertyChangedBase.IsNotifying
PropertyChangedBase.PropertyChanged
Extension Methods

Constructors

InitializableCompositeModule(string)

Initializes a new instance of the InitializableCompositeModule class.

public InitializableCompositeModule(string name)

Parameters

name string

The name of the instance.

Exceptions

ArgumentNullException

Thrown when name is null or empty.

InitializableCompositeModule(string, params ILisrtModule[])

Initializes a new instance of the InitializableCompositeModule class.

public InitializableCompositeModule(string name, params ILisrtModule[] subModules)

Parameters

name string

The name of the instance.

subModules ILisrtModule[]

Sub modules of the instance.

Properties

InitializationState

Gets or sets the initialization state.

public InitializationState InitializationState { get; protected set; }

Property Value

InitializationState

Methods

Exit()

Deinitializes the module and all of its sub modules, whose InitializationState doesn't equals to NotInitialized.

public virtual void Exit()

Initialize()

Initializes the module.

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.

protected void InitializeSubModules()