示例#1
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;
     }
 }
示例#2
0
        /// <summary>
        /// Uns the register.
        /// </summary>
        /// <param name="module">Module.</param>
        public void UnRegister(BaseModule module)
        {
            Type t = module.GetType();

            UnRegister(t.ToString());
        }
示例#3
0
        /// <summary>
        /// Register the specified module.
        /// </summary>
        /// <param name="module">Module.</param>
        public void Register(BaseModule module)
        {
            Type t = module.GetType();

            Register(t.ToString(), module);
        }
示例#4
0
        private void LoadModule(Type moduleType)
        {
            BaseModule bm = System.Activator.CreateInstance(moduleType) as BaseModule;

            bm.Load();
        }