public ContinueWithDialog(IDialog <T> antecedent, Continutation <T, R> continuation) { SetField.NotNull(out this.Antecedent, nameof(antecedent), antecedent); SetField.NotNull(out this.Continuation, nameof(continuation), continuation); }
/// <summary> /// When the antecedent <see cref="IDialog{T}"/> has completed, execute the continuation to produce the next <see cref="IDialog{R}"/>. /// </summary> /// <typeparam name="T">The type of the antecedent dialog.</typeparam> /// <typeparam name="R">The type of the next dialog.</typeparam> /// <param name="antecedent">The antecedent <see cref="IDialog{T}"/>.</param> /// <param name="continuation">The continuation to produce the next <see cref="IDialog{R}"/>.</param> /// <returns>The next <see cref="IDialog{R}"/>.</returns> public static IDialog <R> ContinueWith <T, R>(this IDialog <T> antecedent, Continutation <T, R> continuation) { return(new ContinueWithDialog <T, R>(antecedent, continuation)); }