Show / Hide Table of Contents

Class ModuleInitializer

Implements the IModuleInitializer interface. Handles loading of a module based on a type.

Inheritance
System.Object
ModuleInitializer
MefModuleInitializer
Implements
IModuleInitializer
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Namespace: Sartorius.SAF.Presentation.Modularity
Assembly: Sartorius.SAF.Presentation.dll
Syntax
public class ModuleInitializer : IModuleInitializer

Constructors

View Source

ModuleInitializer(IServiceLocator)

Initializes a new instance of ModuleInitializer.

Declaration
public ModuleInitializer(IServiceLocator serviceLocator)
Parameters
Type Name Description
CommonServiceLocator.IServiceLocator serviceLocator

The container that will be used to resolve the modules by specifying its type.

Methods

View Source

CreateModule(ModuleInfo)

Uses the container to resolve a new IModule by specifying its System.Type.

Declaration
protected virtual IModule CreateModule(ModuleInfo moduleInfo)
Parameters
Type Name Description
ModuleInfo moduleInfo

The module to create.

Returns
Type Description
IModule

A new instance of the module specified by moduleInfo.

View Source

CreateModule(String)

Uses the container to resolve a new IModule by specifying its System.Type.

Declaration
protected virtual IModule CreateModule(string typeName)
Parameters
Type Name Description
System.String typeName

The type name to resolve. This type must implement IModule.

Returns
Type Description
IModule

A new instance of typeName.

View Source

HandleModuleInitializationError(ModuleInfo, String, Exception)

Handles any exception occured in the module Initialization process. This method can be overriden to provide a different behavior.

Declaration
public virtual void HandleModuleInitializationError(ModuleInfo moduleInfo, string assemblyName, Exception exception)
Parameters
Type Name Description
ModuleInfo moduleInfo

The module metadata where the error happened.

System.String assemblyName

The assembly name.

System.Exception exception

The exception thrown that is the cause of the current error.

Exceptions
Type Condition
ModuleInitializeException
View Source

Initialize(ModuleInfo)

Initializes the specified module.

Declaration
public void Initialize(ModuleInfo moduleInfo)
Parameters
Type Name Description
ModuleInfo moduleInfo

The module to initialize

Implements

IModuleInitializer

Extension Methods

CollectionExtensions.AddRange<T, TCollection>(TCollection, IEnumerable<T>)
SerializableObjectCloneExtension.Clone<T>(T)
  • View Source
Back to top Generated by DocFX