public PoolObject(T obj, PoolCallback initialization, PoolCallback finalization) { _obj = obj; _initi = initialization; _finalization = finalization; isActive = false; }
private PoolCallback _finalizationCallback; //Método para finalizar public PoolObject(T obj, PoolCallback initialization, PoolCallback finalization) { _obj = obj; //Guardo el objeto que va a contener este PoolObject _initializationCallback = initialization; //Guardo el método para inicilizar _finalizationCallback = finalization; //Guardo el método para finalizar isActive = false; //Pongo que esta desactivado (por el setter me aseguro que se va a desactivar) }
//Constructor de la clase public PoolObject(T obj, PoolCallback Initializacion, PoolCallback Finalization) { _object = obj; _initializationCallback = Initializacion; _finalizationCallback = Finalization; _IsActive = false; }
public PoolObject(T obj, PoolCallback init, PoolCallback dispose) { this.GetObj = obj; this.init = init; this.dispose = dispose; }