Show / Hide Table of Contents

Class MefModuleManager

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

Inheritance
System.Object
ModuleManager
MefModuleManager
Implements
IModuleManager
System.IDisposable
System.ComponentModel.Composition.IPartImportsSatisfiedNotification
ModuleManager.LoadModuleCompleted
ModuleManager.ModuleDownloadProgressChanged
ModuleManager.Dispose()
ModuleManager.LoadModule(String)
ModuleManager.Run()
ModuleManager.ModuleCatalog
ModuleManager.Dispose(Boolean)
ModuleManager.HandleModuleTypeLoadingError(ModuleInfo, Exception)
ModuleManager.LoadModulesThatAreReadyForLoad()
ModuleManager.ModuleTypeLoaders
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.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
System.Collections.Generic.IEnumerable<System.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
System.Boolean

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
System.IDisposable
System.ComponentModel.Composition.IPartImportsSatisfiedNotification

Extension Methods

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