Class ModuleTable

Keep tracks of module to assembly mappings

Inheritance
System.Object
ModuleTable
Implements
System.Collections.Generic.IEnumerable<ShellModule>
System.Collections.IEnumerable
Inherited Members
System.Object.ToString()
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
Namespace: EPiServer.Shell.Modules
Assembly: EPiServer.Shell.dll
Version: 8.11.0
Syntax
public class ModuleTable : IEnumerable<ShellModule>, IEnumerable

Constructors

ModuleTable()

Declaration
public ModuleTable()

Methods

Add(ShellModule)

Adds the specified module to the assembly-module mapping.

Declaration
public void Add(ShellModule newModule)
Parameters
Type Name Description
ShellModule newModule

The module that should be added.

AddRange(IEnumerable<ShellModule>)

Adds a range of modules to the module table.

Declaration
public void AddRange(IEnumerable<ShellModule> modules)
Parameters
Type Name Description
System.Collections.Generic.IEnumerable<ShellModule> modules

The modules to add.

FindModule(String)

Searches for a ShellModule with a specific namne.

Declaration
public ShellModule FindModule(string moduleName)
Parameters
Type Name Description
System.String moduleName

Module name to search for

Returns
Type Description
ShellModule

GetEnumerator()

Gets a ShellModule enumerator.

Declaration
public virtual IEnumerator<ShellModule> GetEnumerator()
Returns
Type Description
System.Collections.Generic.IEnumerator<ShellModule>

An enumerator for ShellModule instances in the module table.

GetModuleAssemblies()

Lists all module assemblies

Declaration
public IList<Assembly> GetModuleAssemblies()
Returns
Type Description
System.Collections.Generic.IList<System.Reflection.Assembly>

GetModuleOrDefault(Assembly)

Gets the shell module, or defaults to the application root.

Declaration
public ShellModule GetModuleOrDefault(Assembly assembly)
Parameters
Type Name Description
System.Reflection.Assembly assembly

The assembly within the requested module.

Returns
Type Description
ShellModule

A shell modeule, or a default one.

GetModules()

Gets managed shell modues.

Declaration
public IEnumerable<ShellModule> GetModules()
Returns
Type Description
System.Collections.Generic.IEnumerable<ShellModule>

All modules

Initialize(IEnumerable<ShellModule>)

Initializes the module manager for fist time usage.

Declaration
public void Initialize(IEnumerable<ShellModule> modules)
Parameters
Type Name Description
System.Collections.Generic.IEnumerable<ShellModule> modules

ResolveClientPath(ShellModule, String)

Resolves a path to a client resource relative to the specified module.

Declaration
public static string ResolveClientPath(ShellModule module, string moduleRelativePath)
Parameters
Type Name Description
ShellModule module

Shell module.

System.String moduleRelativePath

The module relative path.

Returns
Type Description
System.String

An absolute path to a resource within a module.

ResolveClientPath(String, String)

Resolves a path to a client resource relative to the specified module.

Declaration
public string ResolveClientPath(string moduleName, string moduleRelativePath)
Parameters
Type Name Description
System.String moduleName

Name of the module.

System.String moduleRelativePath

The module relative path.

Returns
Type Description
System.String

An absolute path to a resource within a module.

ResolvePath(ShellModule, String)

Resolves a path to a resource relative to the specified module.

Declaration
public static string ResolvePath(ShellModule module, string moduleRelativePath)
Parameters
Type Name Description
ShellModule module

The Shell module.

System.String moduleRelativePath

The module relative path.

Returns
Type Description
System.String

An absolute path to a resource within a module.

ResolvePath(String, String)

Resolves a path to a resource relative to the specified module.

Declaration
public string ResolvePath(string moduleName, string moduleRelativePath)
Parameters
Type Name Description
System.String moduleName

Name of the module.

System.String moduleRelativePath

The module relative path.

Returns
Type Description
System.String

An absolute path to a resource within a module.

TryGetModule(Assembly, out ShellModule)

Tries to get the module associated to an assembly

Declaration
public bool TryGetModule(Assembly assembly, out ShellModule shellModule)
Parameters
Type Name Description
System.Reflection.Assembly assembly

The associated assembly

ShellModule shellModule

The module out parameter

Returns
Type Description
System.Boolean

True if the module exists

Explicit Interface Implementations

IEnumerable.GetEnumerator()

Declaration
IEnumerator IEnumerable.GetEnumerator()
Returns
Type Description
System.Collections.IEnumerator

Implements

System.Collections.Generic.IEnumerable<T>
System.Collections.IEnumerable

Extension Methods