Ejemplo n.º 1
0
        protected void DoPushToFilter(CommandBase command)
        {
            Exception exception = null;
            bool      result;

            try
            {
                result = _filterManager.Process(command);
            }
            catch (Exception ex)
            {
                result    = false;
                exception = ex;
            }
            CommandState nextState = result ? CommandState.Executing
                                            : command.ShouldFailIfFiltered ? CommandState.Failed
                                                                           : CommandState.Pending;

            command.StartRequest(nextState, exception);
        }