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); }
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); }