/// <summary> /// Initializes a new instance of the <see cref="InputCollectionReplace" /> class. /// </summary> /// <param name="input">Collection of strings (required).</param> /// <param name="match">Match value (required).</param> /// <param name="replacement">Replacement value (required).</param> /// <param name="ignoreCase">Ignore case (required) (default to IgnoreCaseEnum.True).</param> public InputCollectionReplace(List <string> input = default(List <string>), string match = default(string), string replacement = default(string), IgnoreCaseEnum ignoreCase = IgnoreCaseEnum.True) { // to ensure "input" is required (not null) this.Input = input ?? throw new ArgumentNullException("input is a required property for InputCollectionReplace and cannot be null"); // to ensure "match" is required (not null) this.Match = match ?? throw new ArgumentNullException("match is a required property for InputCollectionReplace and cannot be null"); // to ensure "replacement" is required (not null) this.Replacement = replacement ?? throw new ArgumentNullException("replacement is a required property for InputCollectionReplace and cannot be null"); this.IgnoreCase = ignoreCase; }
/// <summary> /// Initializes a new instance of the <see cref="InputCollectionReplace" /> class. /// </summary> /// <param name="input">Collection of strings (required).</param> /// <param name="match">Match value (required).</param> /// <param name="replacement">Replacement value (required).</param> /// <param name="ignoreCase">Ignore case (required) (default to IgnoreCaseEnum.True).</param> public InputCollectionReplace(List <string> input = default(List <string>), string match = default(string), string replacement = default(string), IgnoreCaseEnum ignoreCase = IgnoreCaseEnum.True) { // to ensure "input" is required (not null) if (input == null) { throw new InvalidDataException("input is a required property for InputCollectionReplace and cannot be null"); } else { this.Input = input; } // to ensure "match" is required (not null) if (match == null) { throw new InvalidDataException("match is a required property for InputCollectionReplace and cannot be null"); } else { this.Match = match; } // to ensure "replacement" is required (not null) if (replacement == null) { throw new InvalidDataException("replacement is a required property for InputCollectionReplace and cannot be null"); } else { this.Replacement = replacement; } // to ensure "ignoreCase" is required (not null) if (ignoreCase == null) { throw new InvalidDataException("ignoreCase is a required property for InputCollectionReplace and cannot be null"); } else { this.IgnoreCase = ignoreCase; } }