Example #1
0
        protected override bool Process(IInteraction parameters)
        {
            IInteraction candidate;
            bool         successful;

            if (successful = parameters.TryGetClosest(typeof(CheckInteraction), out candidate))
            {
                CheckInteraction callback = (CheckInteraction)candidate;
                callback.Successful = false;
            }

            return(successful);
        }
Example #2
0
        protected override bool Process(IInteraction parameters)
        {
            IInteraction candidate;
            bool         successful;

            if (successful = parameters.TryGetClosest(typeof(CheckInteraction), out candidate))
            {
                CheckInteraction callback = (CheckInteraction)candidate;
                if (callback.Successful)
                {
                    successful = this.Successful.TryProcess(parameters);
                }
                else
                {
                    successful = this.Failure.TryProcess(parameters);
                }
            }

            return(successful);
        }