public LookupChoice(LookupChoice.Action action) { if (action == LookupChoice.Action.NewSearch) { throw new ArgumentException("Invalid LookupChoice. NewSerch needs a new title to use."); } this.action = action; }
/// <summary> /// A Retry LookupChoice to retry with a new title. /// </summary> /// <param name="action">MUST be LookupChoice.Action.NewSearch</param> /// <param name="newTitleToSearch">The new title to retry searching for</param> public LookupChoice(LookupChoice.Action action, string newTitleToSearch) { if (action != LookupChoice.Action.NewSearch) { throw new ArgumentException("Invalid. Action must be set to LookupChoice.Action.NewSearch when using a newTitleToSearch"); } this.action = action; this.newTitleToSearch = newTitleToSearch; }