private void CheckClash(MenuOption option) { if (GotoMenuOptions.ContainsKey(option) || ReturnOptions.ContainsKey(option)) { throw new BuilderException("Option '" + option + "' already defined"); } }
private IMenu AddGotoMenuOption(MenuOption option, string targetMenuId, IDictionary <string, string> cookies = null) { CheckClash(option); GotoMenuOptions[option] = new Tuple <string, IDictionary <string, string> >(targetMenuId, cookies); return(this); }
public IMenu AddTriggerPieOption(MenuOption option, string result) { CheckClash(option); ReturnOptions[option] = result; return(this); }