/// <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);
/// <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);
/// <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);
/// <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);
/// <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);
/// <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);