public DataStreamRecord(int interval, DataStreamRecordType type, byte[] data)
 {
     Interval   = interval;
     RecordType = type;
     Length     = data.Length;
     Data       = data;
 }
Esempio n. 2
0
        protected string ReadString(DataStreamRecordType type)
        {
            var data = ReadRecord();

            Debug.Assert(data.RecordType == type);

            return(UTF8.GetString(data.Data));
        }
Esempio n. 3
0
        public void Write(DataStreamRecordType type, int offset, byte[] source)
        {
            int count = source.Length - offset;

            byte[] data = new byte[count];
            Array.Copy(source, offset, data, 0, count);
            Write(type, data);
        }
Esempio n. 4
0
 public void Write(DataStreamRecordType type, byte[] data)
 {
     Write((int)Stopwatch.ElapsedMilliseconds, type, data);
 }
Esempio n. 5
0
        public void Write(int interval, DataStreamRecordType type, byte[] data)
        {
            var record = new DataStreamRecord(interval, type, data);

            Write(record);
        }