/// <summary> /// 删除一个service /// </summary> /// <param name="name"></param> static public void DelService(string name) { DataListenerService data = null; serviceMap.TryGetValue(name, out data); data = null; // serviceMap.Remove(name); }
static void Main(string[] args) { using (var context = new JobContext()) { context.JobVacancies.RemoveRange(); context.SaveChanges(); } var listener = new DataListenerService(); listener.Register(); }
/// <summary> /// 获取一个service /// </summary> /// <param name="name"></param> /// <returns></returns> public static DataListenerService GetService(string name) { DataListenerService data = null; serviceMap.TryGetValue(name, out data); if (data == null) { data = new DataListenerService(); serviceMap[name] = data; } return(data); }
/// <summary> /// 创建一个service /// </summary> /// <param name="name"></param> /// <returns></returns> public static DataListenerService Create(string name) { var data = new DataListenerService(); if (serviceMap.ContainsKey(name) == false) { serviceMap[name] = data; } else { Debug.LogError("已存在同名DataDrive_Service"); return(null); } return(data); }
/// <summary> /// 创建一个service /// </summary> /// <param name="name"></param> /// <returns></returns> public static DataListenerService Create(string name) { var data = new DataListenerService(); if (serviceMap.ContainsKey(name) == false) { serviceMap[name] = data; } else { return(GetService(name)); } return(data); }
public M_AIViewBase(Transform t, DataListenerService service) { this.Model = service; this.Transform = t; }
public AWindow(Transform transform) : base(transform) { RegisterUIMessages(); State = new DataListenerService(); }
public AWindow(string path) : base(path) { RegisterUIMessages(); State = new DataListenerService(); }
public View_MVCTest(Transform t, DataListenerService service) : base(t, service) { }
public ViewContrl_MVCTest(DataListenerService data) : base(data) { }
public AViewContrlBase(DataListenerService data) { this.Model = data; }