/// <summary> /// To get or create a specified type and name of object pool. /// </summary> /// <param name="name"></param> /// <param name="insteadOfFactory"></param> /// <typeparam name="T"></typeparam> /// <returns></returns> /// <exception cref="ArgumentNullException"></exception> // ReSharper disable once MemberHidesStaticFromOuterClass public static IObjectPool <T> GetOrCreate <T>(string name, Func <IObjectPool <T> > insteadOfFactory) => ManagedModels.GetOrCreate <T, TManagedModel>(name, insteadOfFactory);
/// <summary> /// To get or 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> // ReSharper disable once MemberHidesStaticFromOuterClass public static IObjectPool <T> GetOrCreate <T>(string name, int poolSize, Func <T> createObjectFunc, Action <ObjectBox <T> > getObjectHandler = null) => ManagedModels.GetOrCreate <T, TManagedModel>(name, poolSize, createObjectFunc, getObjectHandler);
/// <summary> /// To get or create a specified type and name of object pool. /// </summary> /// <param name="name"></param> /// <param name="policy"></param> /// <typeparam name="T"></typeparam> /// <returns></returns> // ReSharper disable once MemberHidesStaticFromOuterClass public static IObjectPool <T> GetOrCreate <T>(string name, IPolicy <T> policy) => ManagedModels.GetOrCreate <T, TManagedModel>(name, policy);
/// <summary> /// To get or 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> GetOrCreate <T>(IPolicy <T> policy) => ManagedModels.GetOrCreate <T, TManagedModel>(policy);