/// <summary> /// Resets this instance. /// </summary> public void Reset() { rowData = new SplitStringRow(); rowid = 1; lastPos = 0; nextPos = delimiterLen * -1; }
/// <summary> /// Fills the row_ multi string. /// </summary> /// <param name="obj">The object.</param> /// <param name="rowid">The rowid.</param> /// <param name="item">The item.</param> public static void FillRow_MultiString(object obj, out SqlInt32 rowid, out SqlString item) { SplitStringRow row = (SplitStringRow)obj; rowid = row.RowId; item = row.Value; }
/// <summary> /// Initializes a new instance of the <see cref="SplitStringMulti" /> class. /// </summary> /// <param name="TheString">The string.</param> /// <param name="Delimiter">The delimiter.</param> /// <param name="removeEmptyEntries">If true the return value does not include array elements that contain an empty string.</param> public SplitStringMulti(char[] TheString, char[] Delimiter, bool removeEmptyEntries = false) { rowData = new SplitStringRow(); theString = TheString; stringLen = TheString.Length; delimiter = Delimiter; delimiterLen = (byte)(Delimiter.Length); isSingleCharDelim = (delimiterLen == 1); this.removeEmptyEntries = removeEmptyEntries; lastPos = 0; nextPos = delimiterLen * -1; }
/// <summary> /// Fills the row_ multi DBLS. /// </summary> /// <param name="obj">The object.</param> /// <param name="rowid">The rowid.</param> /// <param name="item">The item.</param> public static void FillRow_MultiDbls(object obj, out SqlInt32 rowid, out SqlDouble item) { SplitStringRow row = (SplitStringRow)obj; rowid = row.RowId; if (double.TryParse(row.Value, out double tmp)) { item = tmp; } else { item = SqlDouble.Null; } }
/// <summary> /// Fills the row_ multi int64. /// </summary> /// <param name="obj">The object.</param> /// <param name="rowid">The rowid.</param> /// <param name="item">The item.</param> public static void FillRow_MultiInt64(object obj, out SqlInt32 rowid, out SqlInt64 item) { SplitStringRow row = (SplitStringRow)obj; rowid = row.RowId; if (Int64.TryParse(row.Value, out long tmp)) { item = tmp; } else { item = SqlInt64.Null; } }