private static RecycledAction GetAction(Func <float, bool> action)
        {
            Ensure.ArgumentNotNull(action, "action");

            if (_actions == null)
            {
                _actions = new Queue <RecycledAction>(1);
            }

            RecycledAction ota;

            if (_actions.Count > 0)
            {
                ota        = _actions.Dequeue();
                ota.action = action;
            }
            else
            {
                ota = new RecycledAction
                {
                    action = action
                };
            }

            return(ota);
        }
 private static void Return(RecycledAction action)
 {
     action.action = null;
     _actions.Enqueue(action);
 }