Пример #1
0
 public void Write(BufferWriter writer)
 {
     var startLength = writer.BytesWritten;
     writer.WriteString(this.Name);
     writer.WriteVariableLengthInt32((int)this.Status);
     this.SerializedSize = writer.BytesWritten - startLength;
 }
Пример #2
0
        public void Write(BufferWriter writer)
        {
            var start = writer.BytesWritten;
            writer.WriteString(this.Name);
            writer.WriteVariableLengthInt64(this.StartTime.ToMillisecondTimestamp());
            writer.WriteVariableLengthInt64(this.EndTime.ToMillisecondTimestamp());
            writer.WriteVariableLengthInt32((int)this.DataType);
            writer.WriteVariableLengthInt32(this.Sources.Count);

            foreach (var source in this.Sources)
            {
                source.Write(writer);
            }
            this.DimensionSet.Write(writer);
            writer.WriteVariableLengthUInt32(this.DataCount);

            this.SerializedSize = writer.BytesWritten - start;
        }