Пример #1
0
        /// <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);
        }
Пример #2
0
        static void Main(string[] args)
        {
            using (var context = new JobContext())
            {
                context.JobVacancies.RemoveRange();
                context.SaveChanges();
            }

            var listener = new DataListenerService();

            listener.Register();
        }
Пример #3
0
        /// <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);
        }
Пример #4
0
    /// <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);
    }
Пример #5
0
        /// <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);
        }
Пример #6
0
 public M_AIViewBase(Transform t, DataListenerService service)
 {
     this.Model     = service;
     this.Transform = t;
 }
Пример #7
0
 public AWindow(Transform transform) : base(transform)
 {
     RegisterUIMessages();
     State = new DataListenerService();
 }
Пример #8
0
 public AWindow(string path) : base(path)
 {
     RegisterUIMessages();
     State = new DataListenerService();
 }
Пример #9
0
 public View_MVCTest(Transform t, DataListenerService service) : base(t, service)
 {
 }
Пример #10
0
 public ViewContrl_MVCTest(DataListenerService data) : base(data)
 {
 }
Пример #11
0
 public AViewContrlBase(DataListenerService data)
 {
     this.Model = data;
 }