Exemple #1
0
 /// <summary>
 /// Create a specified type and name of object pool.
 /// </summary>
 /// <param name="name"></param>
 /// <param name="poolSize"></param>
 /// <param name="createObjectFunc"></param>
 /// <param name="getObjectHandler"></param>
 /// <typeparam name="T"></typeparam>
 /// <returns></returns>
 /// <exception cref="ArgumentException"></exception>
 // ReSharper disable once MemberHidesStaticFromOuterClass
 public static IObjectPool <T> Create <T>(string name, int poolSize, Func <T> createObjectFunc, Action <ObjectBox <T> > getObjectHandler = null)
 => ManagedModels.Create <T, TManagedModel>(name, poolSize, createObjectFunc, getObjectHandler);
Exemple #2
0
 /// <summary>
 /// Create a specified type and name of object pool.
 /// </summary>
 /// <param name="name"></param>
 /// <param name="poolFunc"></param>
 /// <typeparam name="T"></typeparam>
 /// <returns></returns>
 /// <exception cref="ArgumentNullException"></exception>
 /// <exception cref="ArgumentException"></exception>
 // ReSharper disable once MemberHidesStaticFromOuterClass
 public static IObjectPool <T> Create <T>(string name, Func <IObjectPool <T> > poolFunc)
 => ManagedModels.Create <T, TManagedModel>(name, poolFunc);
Exemple #3
0
 /// <summary>
 /// Create a specified type and name of object pool.
 /// </summary>
 /// <param name="name"></param>
 /// <param name="pool"></param>
 /// <typeparam name="T"></typeparam>
 /// <returns></returns>
 /// <exception cref="ArgumentNullException"></exception>
 /// <exception cref="ArgumentException"></exception>
 // ReSharper disable once MemberHidesStaticFromOuterClass
 public static IObjectPool <T> Create <T>(string name, IObjectPool <T> pool)
 => ManagedModels.Create <T, TManagedModel>(name, pool);
Exemple #4
0
 /// <summary>
 /// Create a specified type of object pool.
 /// </summary>
 /// <param name="poolFunc"></param>
 /// <typeparam name="T"></typeparam>
 /// <returns></returns>
 /// <exception cref="ArgumentNullException"></exception>
 /// <exception cref="ArgumentException"></exception>
 // ReSharper disable once MemberHidesStaticFromOuterClass
 public static IObjectPool <T> Create <T>(Func <IObjectPool <T> > poolFunc)
 => ManagedModels.Create <T, TManagedModel>(poolFunc);
Exemple #5
0
 /// <summary>
 /// Create a specified type of object pool.
 /// </summary>
 /// <param name="pool"></param>
 /// <typeparam name="T"></typeparam>
 /// <returns></returns>
 /// <exception cref="ArgumentNullException"></exception>
 /// <exception cref="ArgumentException"></exception>
 // ReSharper disable once MemberHidesStaticFromOuterClass
 public static IObjectPool <T> Create <T>(IObjectPool <T> pool)
 => ManagedModels.Create <T, TManagedModel>(pool);
Exemple #6
0
 /// <summary>
 /// Create a specified type of object pool.
 /// </summary>
 /// <param name="policy"></param>
 /// <typeparam name="T"></typeparam>
 /// <returns></returns>
 // ReSharper disable once MemberHidesStaticFromOuterClass
 public static IObjectPool <T> Create <T>(IPolicy <T> policy)
 => ManagedModels.Create <T, TManagedModel>(policy);