/// <summary>
        /// 删除一个service
        /// </summary>
        /// <param name="name"></param>
        static public void DelService(string name)
        {
            StatusListenerService status = null;

            serviceMap.TryGetValue(name, out status);
            status = null;
            //
            serviceMap.Remove(name);
        }
        /// <summary>
        /// 获取一个service
        /// </summary>
        /// <param name="name"></param>
        /// <returns></returns>
        public static StatusListenerService GetService(string name)
        {
            StatusListenerService status = null;

            serviceMap.TryGetValue(name, out status);
            if (status == null)
            {
                status = new StatusListenerService();

                serviceMap[name] = status;
            }
            return(status);
        }
        /// <summary>
        /// 创建一个service
        /// </summary>
        /// <param name="name"></param>
        /// <returns></returns>
        public static StatusListenerService Create(string name)
        {
            var data = new StatusListenerService();

            if (serviceMap.ContainsKey(name) == false)
            {
                serviceMap[name] = data;
            }
            else
            {
                return(GetService(name));
            }

            return(data);
        }
Esempio n. 4
0
 /// <summary>
 /// 初始化
 /// </summary>
 public static void Init()
 {
     //初始化
     StatusListenerServiceTest = new StatusListenerService();
 }
Esempio n. 5
0
 public AWindow(Transform transform) : base(transform)
 {
     RegisterUIMessages();
     State = new StatusListenerService();
 }
Esempio n. 6
0
 public AWindow(string path) : base(path)
 {
     RegisterUIMessages();
     State = new StatusListenerService();
 }