public static Outcome GetOutcome(OutcomeState state) { switch (state) { case OutcomeState.Canceled: return(Canceled); case OutcomeState.Completed: return(Completed); case OutcomeState.Faulted: return(Faulted); default: return(None); } }
protected override void Cancel(NativeActivityContext context) { context.ScheduleActivity(_w1); OutcomeState outcome = this.OutcomeOnCancellation.Get(context); switch (outcome) { case OutcomeState.Canceled: base.Cancel(context); break; case OutcomeState.Completed: context.RemoveAllBookmarks(); break; case OutcomeState.Faulted: throw new TestCaseException("Exception is intentionally thrown during cancellation"); } }
public TestBlockingActivityWithWriteLineInCancel(string displayName, OutcomeState outcome) : this(displayName) { ((BlockingActivityWithWriteLineInCancel)this.ProductActivity).OutcomeOnCancellation = new InArgument <OutcomeState>(outcome); }
public Outcome(OutcomeState initialOutcome, OutcomeState propogatedOutcome) { this.DefaultPropogationState = initialOutcome; this.propogatedOutcome = propogatedOutcome; }
public Outcome(OutcomeState ExpectedOutcome) : this(ExpectedOutcome, ExpectedOutcome) { }