Beispiel #1
0
 internal Task ChooseAsync(BinaryChoice choice)
 {
     if (used)
     {
         throw new LinearityViolationException();
     }
     else
     {
         used = true;
         return(communicator.ChooseAsync(choice));
     }
 }
Beispiel #2
0
 internal void Choose(BinaryChoice choice)
 {
     if (used)
     {
         throw new LinearityViolationException();
     }
     else
     {
         used = true;
         communicator.Choose(choice);
     }
 }
Beispiel #3
0
 public BinaryTransitionResult(BinaryChoice choice, string message) : this(choice, message, true)
 {
 }
Beispiel #4
0
 public BinaryTransitionResult(BinaryChoice choice, string message, bool success) : base(message, success)
 {
     Choice = choice;
 }
Beispiel #5
0
 public virtual Task ChooseAsync(BinaryChoice choice)
 {
     return(SendAsync(choice));
 }
Beispiel #6
0
 public virtual void Choose(BinaryChoice choice)
 {
     Send(choice);
 }