Class InitializableCompositeModule
Represents a base for an initializable composite module.
public abstract class InitializableCompositeModule : CompositeModule, ICompositeModule, ILisrtModule, IInitializable, INotifyPropertyChangedEx, INotifyPropertyChanged
- Inheritance
-
PropertyChangedBaseInitializableCompositeModule
- Implements
-
INotifyPropertyChangedEx
- Derived
- Inherited Members
-
PropertyChangedBase.Refresh()PropertyChangedBase.IsNotifyingPropertyChangedBase.PropertyChanged
- Extension Methods
Constructors
InitializableCompositeModule(string)
Initializes a new instance of the InitializableCompositeModule class.
public InitializableCompositeModule(string name)
Parameters
name
stringThe 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
stringThe 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
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()