/// <summary> /// コレクション内の指定された位置に新しい要素を挿入します。 /// </summary> /// <param name="self"></param> /// <param name="index">要素の添字</param> /// <param name="item">新しい要素</param> /// <param name="quoted">引用符付き文字列として追加する場合は<c>true</c></param> /// <exception cref="ArgumentOutOfRangeException">添字が範囲外の場合</exception> /// <exception cref="ArgumentNullException">setterの引数として<c>null</c>が指定された場合</exception> /// <exception cref="NotSupportedException">コレクションが読み取り専用の場合</exception> public static void Insert(this NonNullCollection <IParameterValue> self, int index, string item, bool quoted) { if (item == null) { throw new ArgumentNullException(nameof(item)); } self.Insert(index, quoted ? QuotedStringParameterValue.OfValue(item) : RawStringParameterValue.OfValue(item)); }
/// <summary> /// パラメータ値を設定します。 /// </summary> /// <param name="v">パラメータ値</param> /// <param name="quoted">引用符付き文字列の場合<c>true</c></param> /// <returns>ビルダー</returns> public Builder AddValue(string v, bool quoted) { _values.Add(quoted ? QuotedStringParameterValue.OfValue(v) : RawStringParameterValue.OfValue(v)); return(this); }