DefaultPoolManager

Warning

This documentation is for an implementation of a service. This class is not meant to be used directly; instead use the IPoolManager service via dependency injection to access this functionality.

Information documented here may not be up to date.

class DefaultPoolManager : System.Object, IPoolManager

The default implementation of an T:Protogame.IPoolManager.

public IPool<T> NewPool<T>(string name, int size, System.Action<T> resetAction)
Type Parameters:
 
  • T
Parameters:
  • name (string) –
  • size (int) –
  • resetAction (System.Action<T>) –
public IPool<T> NewPool<T>(string name, int size, System.Func<T> factoryFunc, System.Action<T> resetAction)
Type Parameters:
 
  • T
Parameters:
  • name (string) –
  • size (int) –
  • factoryFunc (System.Func<T>) –
  • resetAction (System.Action<T>) –
public IPool<T> NewPool<T>(string name, int size, System.Func<T> factoryFunc, System.Action<T> resetAction, System.Action<T> newAction)
Type Parameters:
 
  • T
Parameters:
  • name (string) –
  • size (int) –
  • factoryFunc (System.Func<T>) –
  • resetAction (System.Action<T>) –
  • newAction (System.Action<T>) –
public IPool<T> NewScalingPool<T>(string name, int increment, System.Action<T> resetAction)
Type Parameters:
 
  • T
Parameters:
  • name (string) –
  • increment (int) –
  • resetAction (System.Action<T>) –
public IPool<T> NewScalingPool<T>(string name, int increment, System.Func<T> factoryFunc, System.Action<T> resetAction)
Type Parameters:
 
  • T
Parameters:
  • name (string) –
  • increment (int) –
  • factoryFunc (System.Func<T>) –
  • resetAction (System.Action<T>) –
public IPool<T> NewScalingPool<T>(string name, int increment, System.Func<T> factoryFunc, System.Action<T> resetAction, System.Action<T> newAction)
Type Parameters:
 
  • T
Parameters:
  • name (string) –
  • increment (int) –
  • factoryFunc (System.Func<T>) –
  • resetAction (System.Action<T>) –
  • newAction (System.Action<T>) –
public Protogame.IPool<T[]> NewArrayPool<T>(string name, int size, int arraySize, System.Action<T[]> resetAction)
Type Parameters:
 
  • T
Parameters:
  • name (string) –
  • size (int) –
  • arraySize (int) –
  • resetAction (System.Action<T[]>) –
public Protogame.IPool<T[]> NewScalingArrayPool<T>(string name, int increment, int arraySize, System.Action<T[]> resetAction)
Type Parameters:
 
  • T
Parameters:
  • name (string) –
  • increment (int) –
  • arraySize (int) –
  • resetAction (System.Action<T[]>) –