/// <summary> /// Create new string vector with added vector value /// </summary> /// <param name="value">vector value to append</param> /// <returns>new string vector</returns> public StringVector With(string value) { Verify.IsNotEmpty(nameof(value), value); var sv = StringVector.Parse(value, Delimiter); return(new StringVector(_values.Concat(sv), Delimiter)); }
/// <summary> /// Set vector value(s) /// </summary> /// <param name="sv">string vector</param> public void Set(StringVector sv) { Verify.IsNotNull(nameof(sv), sv); Verify.Assert(RequiredVectors == null || RequiredVectors <= sv.Count, "Vector count is less than required vectors"); Verify.Assert(MaxVectors == null || sv.Count <= MaxVectors, "Max vectors has been exceeded"); int max = Math.Min(_bindings.Count, sv.Count); for (int index = 0; index < max; index++) { _bindings[index].Set(sv[index]); } }
/// <summary> /// With vector, concatenate vectors /// </summary> /// <param name="vector">vector</param> /// <returns>new vector</returns> public StringVector With(StringVector vector) { Verify.IsNotNull(nameof(vector), vector); return(new StringVector(_values.Concat(vector))); }