Example #1
0
 private void Default(TwisonLink link, Func <TwisonLink, bool> condition, Action <TwisonLink> applyDefault)
 {
     if (!condition(link))
     {
         applyDefault(link);
     }
 }
Example #2
0
 private void Guard(TwisonLink link, Func <TwisonLink, bool> condition, Func <TwisonLink, string> error)
 {
     if (!condition(link))
     {
         throw new TwisonValidationError(error(link), link);
     }
 }
Example #3
0
 public void GoToPassage(TwisonLink link)
 {
     GoToPassage(link.passage);
 }