Beispiel #1
0
        /// <summary>
        /// Serializes content from the writer
        /// </summary>
        public void FromBinary(IBinaryRawReader reader)
        {
            Station = reader.ReadDouble();
            var offsetCount = reader.ReadInt();

            Offsets = new List <StationOffsetRow>();
            for (var i = 0; i < offsetCount; i++)
            {
                var offset = new StationOffsetRow();
                offset.FromBinary(reader);
                Offsets.Add(offset);
            }
            Minimum.FromBinary(reader);
            Maximum.FromBinary(reader);
            Average.FromBinary(reader);
        }
Beispiel #2
0
        /// <summary>
        /// Serializes content from the writer
        /// </summary>
        public override void InternalFromBinary(IBinaryRawReader reader)
        {
            base.InternalFromBinary(reader);

            var version = VersionSerializationHelper.CheckVersionByte(reader, VERSION_NUMBER);

            if (version == 1)
            {
                ReturnCode = (ReportReturnCode)reader.ReadInt();
                ReportType = (ReportType)reader.ReadInt();
                var griddedRowsCount = reader.ReadInt();
                StationOffsetRows = new List <StationOffsetRow>(griddedRowsCount);
                for (int i = 0; i < griddedRowsCount; i++)
                {
                    var row = new StationOffsetRow();
                    row.FromBinary(reader);
                    StationOffsetRows.Add(row);
                }
            }
        }