/// <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); }
/// <summary> /// 初始化 /// </summary> public static void Init() { //初始化 StatusListenerServiceTest = new StatusListenerService(); }
public AWindow(Transform transform) : base(transform) { RegisterUIMessages(); State = new StatusListenerService(); }
public AWindow(string path) : base(path) { RegisterUIMessages(); State = new StatusListenerService(); }