/// <summary> /// Initializes a new instance of the <see cref="ParameterizedString"/> /// class by using the specified parameterized string and parameter /// delimiter. /// </summary> /// <param name="str">A string that contains literal text and paramters /// delimited by <paramref name="delimiter"/>.</param> /// <param name="delimiter">A string that delimits a parameter within the /// given <paramref name="str"/>.</param> /// <exception cref="ArgumentNullException"><paramref name="str"/> or /// <paramref name="delimiter"/> is <c>null</c>.</exception> public ParameterizedString(string str, string delimiter) { if (str == null || delimiter == null) { throw new ArgumentNullException((str == null) ? "str" : "delimiter"); } delimiter_ = delimiter; flat_string = str; parts_ = new List<ParameterizedStringPart>(); parameters_ = new ParameterizedStringPartParameterCollection(); use_space_as_terminator = false; }
/// <summary> /// Initializes a new instance of the <see cref="ParameterizedString"/> /// class by using the specified parameterized string and parameter /// delimiter. /// </summary> /// <param name="str">A string that contains literal text and paramters /// delimited by <paramref name="delimiter"/>.</param> /// <param name="delimiter">A string that delimits a parameter within the /// given <paramref name="str"/>.</param> /// <exception cref="ArgumentNullException"><paramref name="str"/> or /// <paramref name="delimiter"/> is <c>null</c>.</exception> public ParameterizedString(string str, string delimiter) { if (str == null || delimiter == null) { throw new ArgumentNullException((str == null) ? "str" : "delimiter"); } delimiter_ = delimiter; flat_string = str; parts_ = new List <ParameterizedStringPart>(); parameters_ = new ParameterizedStringPartParameterCollection(); use_space_as_terminator = false; }