Ejemplo n.º 1
0
 /// <summary>
 /// To get the specified type and name of object pool.<br />
 /// 获取指定类型和名称的对象池。
 /// </summary>
 /// <param name="name"></param>
 /// <typeparam name="T"></typeparam>
 /// <returns></returns>
 /// <exception cref="InvalidOperationException"> Unknown type or name.</exception>
 /// <exception cref="ArgumentException">Unable to get the specified type and name of object pool.</exception>
 // ReSharper disable once MemberHidesStaticFromOuterClass
 public static IObjectPool <T> Get <T>(string name) => ManagedModels.Get <T, TManagedModel>(name);
Ejemplo n.º 2
0
 /// <summary>
 /// To get the specified type of object pool.<br />
 /// 获取指定类型的对象池。
 /// </summary>
 /// <typeparam name="T"></typeparam>
 /// <returns></returns>
 /// <exception cref="InvalidOperationException"> Unknown type.</exception>
 /// <exception cref="ArgumentException">Unable to get the specified type of object pool.</exception>
 // ReSharper disable once MemberHidesStaticFromOuterClass
 public static IObjectPool <T> Get <T>() => ManagedModels.Get <T, TManagedModel>();