コード例 #1
0
        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);
        }
コード例 #2
0
        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);
                }
            }
        }
コード例 #3
0
 public HistoryRecordArray AddHistoryRecord(HistoryRecord historyRecord)
 {
     HistoryRecords.Add(historyRecord);
     return(this);
 }