Пример #1
0
 public PersistedDataSource(BufferReader reader)
 {
     var start = reader.BytesRead;
     this.Name = reader.ReadString();
     this.Status = (PersistedDataSourceStatus)reader.ReadVariableLengthInt32();
     this.SerializedSize = reader.BytesRead - start;
 }
Пример #2
0
        public PersistedDataHeader(BufferReader reader)
        {
            var start = reader.BytesRead;

            this.Name = reader.ReadString();

            this.StartTime = reader.ReadVariableLengthInt64().ToDateTimeOffset();
            this.EndTime = reader.ReadVariableLengthInt64().ToDateTimeOffset();

            this.DataType = (PersistedDataType)reader.ReadVariableLengthInt32();
            var sourceCount = reader.ReadVariableLengthInt32();

            this.Sources = new List<PersistedDataSource>(sourceCount);
            for (var i = 0; i < sourceCount; ++i)
            {
                this.Sources.Add(new PersistedDataSource(reader));
            }

            this.DimensionSet = new DimensionSet(reader);

            this.DataCount = reader.ReadVariableLengthUInt32();

            this.SerializedSize = reader.BytesRead - start;
        }