Example #1
0
        public DataLabExt(IStreamReader reader, GraphRecordNumber id, ushort length)
            : base(reader, id, length)
        {
            // assert that the correct record type is instantiated
            Debug.Assert(this.Id == ID);

            // initialize class members from stream
            this.frtHeader = new FrtHeader(reader);

            // assert that the correct number of bytes has been read from the stream
            Debug.Assert(this.Offset + this.Length == this.Reader.BaseStream.Position);
        }
        public DataLabExtContents(IStreamReader reader, GraphRecordNumber id, ushort length)
            : base(reader, id, length)
        {
            // assert that the correct record type is instantiated
            Debug.Assert(this.Id == ID);

            // initialize class members from stream
            this.frtHeader = new FrtHeader(reader);

            ushort flags = reader.ReadUInt16();

            this.fSerName  = Utils.BitmaskToBool(flags, 0x0001);
            this.fCatName  = Utils.BitmaskToBool(flags, 0x0002);
            this.fValue    = Utils.BitmaskToBool(flags, 0x0004);
            this.fPercent  = Utils.BitmaskToBool(flags, 0x0008);
            this.fBubSizes = Utils.BitmaskToBool(flags, 0x0010);

            this.rgchSep = new XLUnicodeStringMin2(reader);

            // assert that the correct number of bytes has been read from the stream
            Debug.Assert(this.Offset + this.Length == this.Reader.BaseStream.Position);
        }