/// <summary> /// 获取Csharp对象池目标组件; /// </summary> /// <typeparam name="T"></typeparam> /// <param name="args">初始化参数</param> /// <returns></returns> public T GetCsharpObject <T>(params Object[] args) where T : new() { CsharpObjectPool <T> pool; Object temp; if (_csharpObjectPool.TryGetValue(typeof(T), out temp)) { pool = temp as CsharpObjectPool <T>; } else { pool = CreateCsharpPool <T>(); } T t = pool.Get(); IPool target = t as IPool; if (target != null) { target.OnGet(args); } return(t); }