Пример #1
0
 public void Register(string key, BaseModule module)
 {
     if (!_dicModules.ContainsKey(key))
     {
         _dicModules.Add(key, module);
     }
 }
Пример #2
0
 /// <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;
     }
 }
Пример #3
0
        /// <summary>
        /// Uns the register.
        /// </summary>
        /// <param name="module">Module.</param>
        public void UnRegister(BaseModule module)
        {
            Type t = module.GetType();

            UnRegister(t.ToString());
        }
Пример #4
0
        private void LoadModule(Type moduleType)
        {
            BaseModule bm = System.Activator.CreateInstance(moduleType) as BaseModule;

            bm.Load();
        }
Пример #5
0
        public void Register(BaseModule module)
        {
            Type t = module.GetType();

            Register(t.ToString(), module);
        }