Class FileModuleTypeLoader
Loads modules from an arbitrary location on the filesystem. This typeloader is only called if ModuleInfo classes have a Ref parameter that starts with "file://". This class is only used on the Desktop version of the Composite Application Library.
Inheritance
Namespace: Sartorius.SAF.Presentation.Modularity
Assembly: Sartorius.SAF.Presentation.dll
Syntax
public class FileModuleTypeLoader : IModuleTypeLoader, IDisposable
Constructors
View SourceFileModuleTypeLoader()
Initializes a new instance of the FileModuleTypeLoader class.
Declaration
public FileModuleTypeLoader()
FileModuleTypeLoader(IAssemblyResolver)
Initializes a new instance of the FileModuleTypeLoader class.
Declaration
public FileModuleTypeLoader(IAssemblyResolver assemblyResolver)
Parameters
Type | Name | Description |
---|---|---|
IAssemblyResolver | assemblyResolver | The assembly resolver. |
Methods
View SourceCanLoadModuleType(ModuleInfo)
Evaluates the Ref property to see if the current type loader will be able to retrieve the moduleInfo
.
Returns true if the Ref property starts with "file://", because this indicates that the file
is a local file.
Declaration
public bool CanLoadModuleType(ModuleInfo moduleInfo)
Parameters
Type | Name | Description |
---|---|---|
ModuleInfo | moduleInfo | Module that should have it's type loaded. |
Returns
Type | Description |
---|---|
System.Boolean | true if the current type loader is able to retrieve the module, otherwise false. |
Exceptions
Type | Condition |
---|---|
System.ArgumentNullException | An System.ArgumentNullException is thrown if |
Dispose()
Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.
Declaration
public void Dispose()
Remarks
Calls Dispose(Boolean)
Dispose(Boolean)
Disposes the associated AssemblyResolver.
Declaration
protected virtual void Dispose(bool disposing)
Parameters
Type | Name | Description |
---|---|---|
System.Boolean | disposing | When true, it is being called from the Dispose method. |
LoadModuleType(ModuleInfo)
Retrieves the moduleInfo
.
Declaration
public void LoadModuleType(ModuleInfo moduleInfo)
Parameters
Type | Name | Description |
---|---|---|
ModuleInfo | moduleInfo | Module that should have it's type loaded. |
Events
View SourceLoadModuleCompleted
Raised when a module is loaded or fails to load.
Declaration
public event EventHandler<LoadModuleCompletedEventArgs> LoadModuleCompleted
Event Type
Type | Description |
---|---|
System.EventHandler<LoadModuleCompletedEventArgs> |
ModuleDownloadProgressChanged
Raised repeatedly to provide progress as modules are loaded in the background.
Declaration
public event EventHandler<ModuleDownloadProgressChangedEventArgs> ModuleDownloadProgressChanged
Event Type
Type | Description |
---|---|
System.EventHandler<ModuleDownloadProgressChangedEventArgs> |