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