Show / Hide Table of Contents

Class MefModuleManager

Component responsible for coordinating the modules' type loading and module initialization process.

Inheritance
object
ModuleManager
MefModuleManager
Implements
IModuleManager
IDisposable
IPartImportsSatisfiedNotification
ModuleManager.LoadModuleCompleted
ModuleManager.ModuleDownloadProgressChanged
ModuleManager.Dispose()
ModuleManager.LoadModule(string)
ModuleManager.Run()
ModuleManager.ModuleCatalog
ModuleManager.Dispose(bool)
ModuleManager.HandleModuleTypeLoadingError(ModuleInfo, Exception)
ModuleManager.LoadModulesThatAreReadyForLoad()
ModuleManager.ModuleTypeLoaders
object.Equals(object)
object.Equals(object, object)
object.GetHashCode()
object.GetType()
object.MemberwiseClone()
object.ReferenceEquals(object, object)
object.ToString()
Namespace: Sartorius.SAF.Presentation.MefExtensions
Assembly: Sartorius.SAF.Presentation.dll
Syntax
[Export(typeof(IModuleManager))]
public class MefModuleManager : ModuleManager, IModuleManager, IDisposable, IPartImportsSatisfiedNotification
Remarks

This allows the MefBootstrapper to provide this class as a default implementation. If another implementation is found, this export will not be used.

Constructors

View Source

MefModuleManager(IModuleInitializer, IModuleCatalog)

Initializes a new instance of the MefModuleManager class.

Declaration
[ImportingConstructor]
public MefModuleManager(IModuleInitializer moduleInitializer, IModuleCatalog moduleCatalog)
Parameters
Type Name Description
IModuleInitializer moduleInitializer

Service used for initialization of modules.

IModuleCatalog moduleCatalog

Catalog that enumerates the modules to be loaded and initialized.

Properties

View Source

ImportedModules

Gets or sets the modules to be imported.

Declaration
[ImportMany(AllowRecomposition = true)]
protected IEnumerable<Lazy<IModule, IModuleExport>> ImportedModules { get; set; }
Property Value
Type Description
IEnumerable<Lazy<IModule, IModuleExport>>
Remarks

Import the available modules from the MEF container

Methods

View Source

ModuleNeedsRetrieval(ModuleInfo)

Checks if the module needs to be retrieved before it's initialized.

Declaration
protected override bool ModuleNeedsRetrieval(ModuleInfo moduleInfo)
Parameters
Type Name Description
ModuleInfo moduleInfo

Module that is being checked if needs retrieval.

Returns
Type Description
bool

True if the module needs to be retrieved. Otherwise, false.

Overrides
ModuleManager.ModuleNeedsRetrieval(ModuleInfo)
View Source

OnImportsSatisfied()

Called when a part's imports have been satisfied and it is safe to use.

Declaration
public virtual void OnImportsSatisfied()
Remarks

Whenever the MEF container loads new types that cause ImportedModules to be recomposed, this is called. This method ensures that as the MEF container discovered new modules, the ModuleCatalog is updated.

Implements

IModuleManager
IDisposable
IPartImportsSatisfiedNotification

Extension Methods

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