public TaskmanParameter( TaskmanConfiguration configuration, string name, string description, string defaultValue, string validationPattern = ".*", bool isUserScoped = false) : this( configuration, name, description, defaultValue, new Regex(validationPattern), isUserScoped) { }
public TaskmanParameter( TaskmanConfiguration configuration, string name, string description, string defaultValue, Regex validationRegex, bool isUserScoped = false) { if (configuration == null) { throw new ArgumentNullException(nameof(configuration)); } if (name == null) { throw new ArgumentNullException(nameof(name)); } if (description == null) { throw new ArgumentNullException(nameof(description)); } if (validationRegex == null) { throw new ArgumentNullException(nameof(validationRegex)); } if (defaultValue == null) { throw new ArgumentNullException(nameof(defaultValue)); } this._configuration = configuration; this.Name = name; this.Description = description; this.ValidationRegex = validationRegex; this.IsUserScoped = isUserScoped; Validate(defaultValue); this.DefaultValue = defaultValue; }