/// <summary>
        /// 创建一个service
        /// </summary>
        /// <param name="name"></param>
        /// <returns></returns>
        public static ADataListenerT <T> Create <T>(string name)
        {
            ADataListenerTBase data = null;

            if (!serviceTMap.TryGetValue(name, out data))
            {
                data = new ADataListenerT <T>();
                serviceTMap[name] = data;
            }

            return(data  as  ADataListenerT <T>);
        }
Beispiel #2
0
        /// <summary>
        /// 获取一个service
        /// </summary>
        /// <param name="name"></param>
        /// <returns></returns>
        public static ADataListenerT <T> GetService <T>(string name)
        {
            ABaseDataListenerT data = null;

            serviceTMap.TryGetValue(name, out data);
            if (data == null)
            {
                data = new ADataListenerT <T>();

                serviceTMap[name] = data;
            }
            return(data as  ADataListenerT <T>);
        }