public static HistoryRecordArray Parse(SqlString stringToParse) { if (stringToParse.IsNull) { return(Null); } var parsedROCHistoryRecords = new HistoryRecordArray(); parsedROCHistoryRecords.historyRecords = new List <HistoryRecord>(); var parsedString = stringToParse.Value.Split("|".ToCharArray()); for (var i = 0; parsedString.Length > i; i++) { parsedROCHistoryRecords.historyRecords.Add(HistoryRecord.Parse(parsedString[i])); } return(parsedROCHistoryRecords); }
public void Read(BinaryReader binaryReader) { HistoryRecords.Clear(); IsNull = binaryReader.ReadBoolean(); if (IsNull) { return; } else { var length = binaryReader.ReadInt32(); for (var i = 0; length > i; i++) { var historyRecord = new HistoryRecord(); historyRecord.Read(binaryReader); HistoryRecords.Add(historyRecord); } } }
public HistoryRecordArray AddHistoryRecord(HistoryRecord historyRecord) { HistoryRecords.Add(historyRecord); return(this); }