public DatabaseFieldDescriptor(ref BufferedBinaryReader reader, ParserOptions parserOptions) { Encoding = parserOptions.Encoding ?? Encoding.ASCII; NumericCulture = parserOptions.InvariantNumbers ? CultureInfo.InvariantCulture : parserOptions.Culture ?? CultureInfo.InvariantCulture; DateCulture = parserOptions.InvariantDates ? CultureInfo.InvariantCulture : parserOptions.Culture ?? CultureInfo.InvariantCulture; FieldName = reader.ReadBytes(11); FieldType = (EFieldType)reader.ReadByte(); Reserved01 = reader.ReadBytes(4); FieldLength = reader.ReadByte(); FieldPrecision = reader.ReadByte(); #pragma warning disable 618 FieldFlags = (EFieldFlags)reader.ReadByte(); #pragma warning restore 618 Reserved02 = reader.ReadByte(); WorkAreaId = reader.ReadByte(); Reserved03 = reader.ReadBytes(10); TableFlags = (ETableFlags)reader.ReadByte(); }
public DatabaseHeader(ref BufferedBinaryReader reader) { byte versionInfo = reader.ReadByte(); Level = (EDatabaseLevel)(versionInfo & 0b0000_0111); Version = (EDatabaseVersion)(versionInfo & 0b1111_1000); UpdateYear = reader.ReadByte(); UpdateMonth = reader.ReadByte(); UpdateDay = reader.ReadByte(); RecordCount = reader.ReadInt32(); HeaderLength = reader.ReadInt16(); RecordLength = reader.ReadInt16(); Reserved01 = reader.ReadBytes(2); IncompleteTransaction = reader.ReadByte(); EncryptionFlag = reader.ReadByte(); Reserved02 = reader.ReadBytes(12); TableFlags = (ETableFlags)reader.ReadByte(); LanguageDriverId = reader.ReadByte(); EndOfHeaderMarker = reader.ReadInt16(); }