Skip to end of metadata
Go to start of metadata

Represents the default implementation of IAssemblyManager.

Definition

public class BaseAssemblyManager : IAssemblyManager

Summary

The following table summarizes the members exposed in this class.

Public Constructors

BaseAssemblyManager Constructor() Initializes a new instance of the BaseAssemblyManager class.

Protected Properties

Public Methods

Protected Methods

LoadAssemblies() Loads assemblies from configuration to memory and generate LoadedAssemblies list which will be scanned for types
OnBeforeAddAssembly(Assembly)
OnBeforeAddType(Assembly, Type)
RegisterType(Type)
ScanAssemblies() Scans types in Loaded assemblies
UnRegisterType(Type)

Events


Public Constructors

public BaseAssemblyManager()

Protected Properties

protected ScriptConfiguration Configuration { get; }

Public Methods

public void AddAssembly(Assembly assembly)

Parameters

assembly

public void AddType(Type type)

Parameters

type

public void AddType(string alias, Type type)

Adds type to a manager

Parameters

alias
type

public void AddTypes(Type[] types)

Parameters

types

public void Dispose()

public IEnumerable<MethodInfo> GetExtensionMethods(Type type)

Parameters

type

public IEnumerable<MethodInfo> GetExtensionMethods(Type type, string methodName)

Parameters

type
methodName

public Type GetType(string name)

Returns type by given name

Parameters

name Short, Alias or FullType name

Return Types

Type

Exceptions

public bool HasNamespace(string name)

Parameters

name

public bool HasType(string name)

Parameters

name

public void ImportExtensionMethods(Type type)

Parameters

type

public void Initialize(ScriptConfiguration configuration)

Parameters

configuration

public void RemoveAssembly(Assembly assembly)

Parameters

assembly

Protected Methods

protected void LoadAssemblies()

Loads assemblies from configuration to memory and generate LoadedAssemblies list which will be scanned for types

protected AssemblyHandlerEventArgs OnBeforeAddAssembly(Assembly assembly)

Parameters

assembly

protected AssemblyTypeHandlerEventArgs OnBeforeAddType(Assembly assembly, Type type)

Parameters

assembly
type

protected void RegisterType(Type type)

Parameters

type

protected void ScanAssemblies()

Scans types in Loaded assemblies

protected void UnRegisterType(Type type)

Parameters

type

Events

public event EventHandler<AssemblyHandlerEventArgs> BeforeAddAssembly

public event EventHandler<AssemblyTypeHandlerEventArgs> BeforeAddType

  • No labels