/// <summary> /// Uns the register. /// </summary> /// <param name="key">Key.</param> public void UnRegister(string key) { if (dicModules.ContainsKey(key)) { BaseModule module = dicModules[key]; module.Release(); dicModules.Remove(key); module = null; } }
/// <summary> /// Uns the register. /// </summary> /// <param name="module">Module.</param> public void UnRegister(BaseModule module) { Type t = module.GetType(); UnRegister(t.ToString()); }
/// <summary> /// Register the specified module. /// </summary> /// <param name="module">Module.</param> public void Register(BaseModule module) { Type t = module.GetType(); Register(t.ToString(), module); }
private void LoadModule(Type moduleType) { BaseModule bm = System.Activator.CreateInstance(moduleType) as BaseModule; bm.Load(); }