public override bool set(string newVal, out string error) { try { var regexes = new NameRegexes(); regexes.set(newVal); val = regexes; } catch (ArgumentException) { error = string.Format("Could not parse regex '{0}'", newVal); return(false); } error = ""; return(true); }
public NameRegexOption(string shortName, string longName, string description, string val) : base(shortName, longName, description) { Default = this.val = new NameRegexes(val); }
public override bool Set(string newVal, out string error) { try { var regexes = new NameRegexes(); regexes.Set(newVal); val = regexes; } catch (ArgumentException) { error = string.Format("Could not parse regex '{0}'", newVal); return false; } error = ""; return true; }