//----------------------------------------------------------------------- // // Copyright (c) Microsoft Corporation. // //----------------------------------------------------------------------- namespace Microsoft.Isam.Esent.Interop { using System; using System.Collections.Generic; using System.Diagnostics; using System.Diagnostics.CodeAnalysis; using System.Globalization; using System.Runtime.InteropServices; /// /// The native version of the JET_DBINFOMISC structure. /// [StructLayout(LayoutKind.Sequential)] [SuppressMessage("Microsoft.StyleCop.CSharp.NamingRules", "SA1305:FieldNamesMustNotUseHungarianNotation", Justification = "This should match the unmanaged API, which isn't capitalized.")] [SuppressMessage( "Microsoft.StyleCop.CSharp.NamingRules", "SA1307:AccessibleFieldsMustBeginWithUpperCaseLetter", Justification = "This should match the unmanaged API, which isn't capitalized.")] internal struct NATIVE_DBINFOMISC { /// /// Version of Esent that created the database. /// public uint ulVersion; /// /// Incremental version of Esent that created the database. /// public uint ulUpdate; /// /// Database signature. /// public NATIVE_SIGNATURE signDb; /// /// Consistent/inconsistent state. /// public uint dbstate; /// /// Null if in inconsistent state. /// public JET_LGPOS lgposConsistent; /// /// Null if in inconsistent state. /// public JET_LOGTIME logtimeConsistent; /// /// Last attach time. /// public JET_LOGTIME logtimeAttach; /// /// Lgpos at last attach. /// public JET_LGPOS lgposAttach; /// /// Last detach time. /// public JET_LOGTIME logtimeDetach; /// /// Lgpos at last detach. /// public JET_LGPOS lgposDetach; /// /// Logfile signature. /// public NATIVE_SIGNATURE signLog; /// /// Last successful full backup. /// public JET_BKINFO bkinfoFullPrev; /// /// Last successful incremental backup. Reset when /// is set. /// public JET_BKINFO bkinfoIncPrev; /// /// Current backup. /// public JET_BKINFO bkinfoFullCur; /// /// Internal use only. /// public uint fShadowingDisabled; /// /// Internal use only. /// public uint fUpgradeDb; /// /// OS major version. /// public uint dwMajorVersion; /// /// OS minor version. /// public uint dwMinorVersion; /// /// OS build number. /// public uint dwBuildNumber; /// /// OS Service Pack number. /// public uint lSPNumber; /// /// Database page size (0 = 4Kb page). /// public uint cbPageSize; } /// /// Native version of the JET_DBINFOMISC structure. /// Adds support for fields that we added in Windows 7. /// [StructLayout(LayoutKind.Sequential)] [SuppressMessage("Microsoft.StyleCop.CSharp.NamingRules", "SA1305:FieldNamesMustNotUseHungarianNotation", Justification = "This should match the unmanaged API, which isn't capitalized.")] [SuppressMessage( "Microsoft.StyleCop.CSharp.NamingRules", "SA1307:AccessibleFieldsMustBeginWithUpperCaseLetter", Justification = "This should match the unmanaged API, which isn't capitalized.")] internal struct NATIVE_DBINFOMISC4 { /// /// The core dbinfo structure. /// public NATIVE_DBINFOMISC dbinfo; // Fields added in JET_DBINFOMISC2 /// /// The minimum log generation required for replaying the logs. /// Typically the checkpoint generation. /// public uint genMinRequired; /// /// The maximum log generation required for replaying the logs. /// public uint genMaxRequired; /// /// Creation time of the logfile. /// public JET_LOGTIME logtimeGenMaxCreate; /// /// Number of times repair has been called on this database. /// public uint ulRepairCount; /// /// The last time that repair was run against this database. /// public JET_LOGTIME logtimeRepair; /// /// Number of times this database was repaired before the last defrag. /// public uint ulRepairCountOld; /// /// Number of times a one bit error was successfully fixed. /// public uint ulECCFixSuccess; /// /// The last time a one bit error was successfully fixed. /// public JET_LOGTIME logtimeECCFixSuccess; /// /// The number of times a one bit error was successfully fixed before the last repair. /// public uint ulECCFixSuccessOld; /// /// Number of times an uncorrectable one bit error was encountered. /// public uint ulECCFixFail; /// /// The last time an uncorrectable one bit error was encountered. /// public JET_LOGTIME logtimeECCFixFail; /// /// The number of times an uncorrectable one bit error was encountered. /// public uint ulECCFixFailOld; /// /// Number of times a non-correctable checksum error was found. /// public uint ulBadChecksum; /// /// The last time a non-correctable checksum error was found. /// public JET_LOGTIME logtimeBadChecksum; /// /// The number of times a non-correctable checksum error was found before the last repair. /// public uint ulBadChecksumOld; // Fields added in JET_DBINFOMISC3 /// /// The maximum log generation committed to the database. Typically the current log generation. /// public uint genCommitted; // Fields added in JET_DBINFOMISC4 /// /// Last successful copy backup. /// public JET_BKINFO bkinfoCopyPrev; /// /// Last successful differential backup. Reset when /// bkinfoFullPrev is set. /// public JET_BKINFO bkinfoDiffPrev; } /// /// Holds miscellaneous information about a database. This is /// the information that is contained in the database header. /// [SuppressMessage( "Microsoft.StyleCop.CSharp.NamingRules", "SA1300:ElementMustBeginWithUpperCaseLetter", Justification = "This should match the unmanaged API, which isn't capitalized.")] [SuppressMessage("Microsoft.StyleCop.CSharp.NamingRules", "SA1305:FieldNamesMustNotUseHungarianNotation", Justification = "Need to avoid clash between members and properties.")] [SuppressMessage( "Microsoft.StyleCop.CSharp.NamingRules", "SA1309:FieldNamesMustNotBeginWithUnderscore", Justification = "Need to avoid clash between members and properties.")] [Serializable] public sealed partial class JET_DBINFOMISC : IEquatable { #region Fields /// /// Version of Esent that created the database. /// private int _ulVersion; /// /// Incremental version of Esent that created the database. /// private int _ulUpdate; /// /// Database signature. /// private JET_SIGNATURE _signDb; /// /// Consistent/inconsistent state. /// private JET_dbstate _dbstate; /// /// Null if in inconsistent state. /// private JET_LGPOS _lgposConsistent; /// /// Null if in inconsistent state. /// private JET_LOGTIME _logtimeConsistent; /// /// Last attach time. /// private JET_LOGTIME _logtimeAttach; /// /// Lgpos at last attach. /// private JET_LGPOS _lgposAttach; /// /// Last detach time. /// private JET_LOGTIME _logtimeDetach; /// /// Lgpos at last detach. /// private JET_LGPOS _lgposDetach; /// /// Logfile signature. /// private JET_SIGNATURE _signLog; /// /// Last successful full backup. /// private JET_BKINFO _bkinfoFullPrev; /// /// Last successful incremental backup. Reset when /// is set. /// private JET_BKINFO _bkinfoIncPrev; /// /// Current backup. /// private JET_BKINFO _bkinfoFullCur; /// /// Internal use only. /// private bool _fShadowingDisabled; /// /// Internal use only. /// private bool _fUpgradeDb; /// /// OS major version. /// private int _dwMajorVersion; /// /// OS minor version. /// private int _dwMinorVersion; /// /// OS build number. /// private int _dwBuildNumber; /// /// OS Service Pack number. /// private int _lSPNumber; /// /// Database page size (0 = 4Kb page). /// private int _cbPageSize; /// /// The minimum log generation required for replaying the logs. /// Typically the checkpoint generation. /// private int _genMinRequired; /// /// The maximum log generation required for replaying the logs. /// private int _genMaxRequired; /// /// Creation time of the logfile. /// private JET_LOGTIME _logtimeGenMaxCreate; /// /// Number of times repair has been called on this database. /// private int _ulRepairCount; /// /// The last time that repair was run against this database. /// private JET_LOGTIME _logtimeRepair; /// /// Number of times this database was repaired before the last defrag. /// private int _ulRepairCountOld; /// /// Number of times a one bit error was successfully fixed. /// private int _ulECCFixSuccess; /// /// The last time a one bit error was successfully fixed. /// private JET_LOGTIME _logtimeECCFixSuccess; /// /// The number of times a one bit error was successfully fixed before the last repair. /// private int _ulECCFixSuccessOld; /// /// Number of times an uncorrectable one bit error was encountered. /// private int _ulECCFixFail; /// /// The last time an uncorrectable one bit error was encountered. /// private JET_LOGTIME _logtimeECCFixFail; /// /// The number of times an uncorrectable one bit error was encountered. /// private int _ulECCFixFailOld; /// /// Number of times a non-correctable checksum error was found. /// private int _ulBadChecksum; /// /// The last time a non-correctable checksum error was found. /// private JET_LOGTIME _logtimeBadChecksum; /// /// The number of times a non-correctable checksum error was found before the last repair. /// private int _ulBadChecksumOld; /// /// The maximum log generation committed to the database. Typically the current log generation. /// private int _genCommitted; /// /// Last successful copy backup. /// private JET_BKINFO _bkinfoCopyPrev; /// /// Last successful differential backup. Reset when /// is set. /// private JET_BKINFO _bkinfoDiffPrev; #endregion #region Properties /// /// Gets the version of Esent that created the database. /// public int ulVersion { [DebuggerStepThrough] get { return this._ulVersion; } internal set { this._ulVersion = value; } } /// /// Gets the incremental version of Esent that created the database. /// public int ulUpdate { [DebuggerStepThrough] get { return this._ulUpdate; } internal set { this._ulUpdate = value; } } /// /// Gets the database signature. /// public JET_SIGNATURE signDb { [DebuggerStepThrough] get { return this._signDb; } internal set { this._signDb = value; } } /// /// Gets the consistent/inconsistent state of the database. /// public JET_dbstate dbstate { [DebuggerStepThrough] get { return this._dbstate; } internal set { this._dbstate = value; } } /// /// Gets the lgpos when the database was made consistent. /// This value is null if the database is inconsistent. /// public JET_LGPOS lgposConsistent { [DebuggerStepThrough] get { return this._lgposConsistent; } internal set { this._lgposConsistent = value; } } /// /// Gets the time when the database was made consistent. /// This value is null if the database is inconsistent. /// public JET_LOGTIME logtimeConsistent { [DebuggerStepThrough] get { return this._logtimeConsistent; } internal set { this._logtimeConsistent = value; } } /// /// Gets the time when the database was attached. /// public JET_LOGTIME logtimeAttach { [DebuggerStepThrough] get { return this._logtimeAttach; } internal set { this._logtimeAttach = value; } } /// /// Gets the lgpos of the last attach. /// public JET_LGPOS lgposAttach { [DebuggerStepThrough] get { return this._lgposAttach; } internal set { this._lgposAttach = value; } } /// /// Gets the time of the last detach. /// public JET_LOGTIME logtimeDetach { [DebuggerStepThrough] get { return this._logtimeDetach; } internal set { this._logtimeDetach = value; } } /// /// Gets the lgpos of the last detach. /// public JET_LGPOS lgposDetach { [DebuggerStepThrough] get { return this._lgposDetach; } internal set { this._lgposDetach = value; } } /// /// Gets the logfile signature of logs used to modify the database. /// public JET_SIGNATURE signLog { [DebuggerStepThrough] get { return this._signLog; } internal set { this._signLog = value; } } /// /// Gets information about the last successful full backup. /// public JET_BKINFO bkinfoFullPrev { [DebuggerStepThrough] get { return this._bkinfoFullPrev; } internal set { this._bkinfoFullPrev = value; } } /// /// Gets information about the last successful incremental backup. /// This value is reset when is set. /// public JET_BKINFO bkinfoIncPrev { [DebuggerStepThrough] get { return this._bkinfoIncPrev; } internal set { this._bkinfoIncPrev = value; } } /// /// Gets information about the current backup. /// public JET_BKINFO bkinfoFullCur { [DebuggerStepThrough] get { return this._bkinfoFullCur; } internal set { this._bkinfoFullCur = value; } } /// /// Gets a value indicating whether catalog shadowing is enabled. /// This value is for internal use only. /// public bool fShadowingDisabled { [DebuggerStepThrough] get { return this._fShadowingDisabled; } internal set { this._fShadowingDisabled = value; } } /// /// Gets a value indicating whether the database is being upgraded. /// This value is for internal use only. /// public bool fUpgradeDb { [DebuggerStepThrough] get { return this._fUpgradeDb; } internal set { this._fUpgradeDb = value; } } /// /// Gets the OS major version from the last attach. /// public int dwMajorVersion { [DebuggerStepThrough] get { return this._dwMajorVersion; } internal set { this._dwMajorVersion = value; } } /// /// Gets the OS minor version from the last attach. /// public int dwMinorVersion { [DebuggerStepThrough] get { return this._dwMinorVersion; } internal set { this._dwMinorVersion = value; } } /// /// Gets the OS build number from the last attach. /// public int dwBuildNumber { [DebuggerStepThrough] get { return this._dwBuildNumber; } internal set { this._dwBuildNumber = value; } } /// /// Gets the OS Service Pack number from the last attach. /// public int lSPNumber { [DebuggerStepThrough] get { return this._lSPNumber; } internal set { this._lSPNumber = value; } } /// /// Gets the database page size. A value of 0 means 4Kb pages. /// public int cbPageSize { [DebuggerStepThrough] get { return this._cbPageSize; } internal set { this._cbPageSize = value; } } /// /// Gets the minimum log generation required for replaying the logs. /// Typically the checkpoint generation. /// public int genMinRequired { [DebuggerStepThrough] get { return this._genMinRequired; } internal set { this._genMinRequired = value; } } /// /// Gets the maximum log generation required for replaying the logs. /// public int genMaxRequired { [DebuggerStepThrough] get { return this._genMaxRequired; } internal set { this._genMaxRequired = value; } } /// /// Gets the creation time of the logfile. /// public JET_LOGTIME logtimeGenMaxCreate { [DebuggerStepThrough] get { return this._logtimeGenMaxCreate; } internal set { this._logtimeGenMaxCreate = value; } } /// /// Gets the number of times repair has been called on this database. /// public int ulRepairCount { [DebuggerStepThrough] get { return this._ulRepairCount; } internal set { this._ulRepairCount = value; } } /// /// Gets the last time that repair was run against this database. /// public JET_LOGTIME logtimeRepair { [DebuggerStepThrough] get { return this._logtimeRepair; } internal set { this._logtimeRepair = value; } } /// /// Gets the number of times this database was repaired before the last defrag. /// public int ulRepairCountOld { [DebuggerStepThrough] get { return this._ulRepairCountOld; } internal set { this._ulRepairCountOld = value; } } /// /// Gets the number of times a one bit error was successfully fixed. /// public int ulECCFixSuccess { [DebuggerStepThrough] get { return this._ulECCFixSuccess; } internal set { this._ulECCFixSuccess = value; } } /// /// Gets the last time a one bit error was successfully fixed. /// public JET_LOGTIME logtimeECCFixSuccess { [DebuggerStepThrough] get { return this._logtimeECCFixSuccess; } internal set { this._logtimeECCFixSuccess = value; } } /// /// Gets the number of times a one bit error was successfully fixed before the last repair. /// public int ulECCFixSuccessOld { [DebuggerStepThrough] get { return this._ulECCFixSuccessOld; } internal set { this._ulECCFixSuccessOld = value; } } /// /// Gets the number of times an uncorrectable one bit error was encountered. /// public int ulECCFixFail { [DebuggerStepThrough] get { return this._ulECCFixFail; } internal set { this._ulECCFixFail = value; } } /// /// Gets the last time an uncorrectable one bit error was encountered. /// public JET_LOGTIME logtimeECCFixFail { [DebuggerStepThrough] get { return this._logtimeECCFixFail; } internal set { this._logtimeECCFixFail = value; } } /// /// Gets the number of times an uncorrectable one bit error was encountered. /// public int ulECCFixFailOld { [DebuggerStepThrough] get { return this._ulECCFixFailOld; } internal set { this._ulECCFixFailOld = value; } } /// /// Gets the number of times a non-correctable checksum error was found. /// public int ulBadChecksum { [DebuggerStepThrough] get { return this._ulBadChecksum; } internal set { this._ulBadChecksum = value; } } /// /// Gets the last time a non-correctable checksum error was found. /// public JET_LOGTIME logtimeBadChecksum { [DebuggerStepThrough] get { return this._logtimeBadChecksum; } internal set { this._logtimeBadChecksum = value; } } /// /// Gets the number of times a non-correctable checksum error was found before the last repair. /// public int ulBadChecksumOld { [DebuggerStepThrough] get { return this._ulBadChecksumOld; } internal set { this._ulBadChecksumOld = value; } } /// /// Gets the maximum log generation committed to the database. Typically the current log generation. /// public int genCommitted { [DebuggerStepThrough] get { return this._genCommitted; } internal set { this._genCommitted = value; } } /// /// Gets information about the last successful copy backup. /// public JET_BKINFO bkinfoCopyPrev { [DebuggerStepThrough] get { return this._bkinfoCopyPrev; } internal set { this._bkinfoCopyPrev = value; } } /// /// Gets information about the last successful differential backup. Reset when /// is set. /// public JET_BKINFO bkinfoDiffPrev { [DebuggerStepThrough] get { return this._bkinfoDiffPrev; } internal set { this._bkinfoDiffPrev = value; } } #endregion /// /// Gets a string representation of this object. /// /// A string representation of this object. public override string ToString() { return string.Format(CultureInfo.InvariantCulture, "JET_DBINFOMISC({0})", this._signDb); } /// /// Returns the hash code for this instance. /// /// The hash code for this instance. public override int GetHashCode() { var hashes = new[] { this._ulVersion, this._ulUpdate, this._signDb.GetHashCode(), this._dbstate.GetHashCode(), this._lgposConsistent.GetHashCode(), this._logtimeConsistent.GetHashCode(), this._logtimeAttach.GetHashCode(), this._lgposAttach.GetHashCode(), this._logtimeDetach.GetHashCode(), this._lgposDetach.GetHashCode(), this._signLog.GetHashCode(), this._bkinfoFullPrev.GetHashCode(), this._bkinfoIncPrev.GetHashCode(), this._bkinfoFullCur.GetHashCode(), this._fShadowingDisabled.GetHashCode(), this._fUpgradeDb.GetHashCode(), this._dwMajorVersion, this._dwMinorVersion, this._dwBuildNumber, this._lSPNumber, this._cbPageSize, this._genMinRequired, this._genMaxRequired, this._logtimeGenMaxCreate.GetHashCode(), this._ulRepairCount, this._logtimeRepair.GetHashCode(), this._ulRepairCountOld, this._ulECCFixSuccess, this._logtimeECCFixSuccess.GetHashCode(), this._ulECCFixSuccessOld, this._ulECCFixFail, this._logtimeECCFixFail.GetHashCode(), this._ulECCFixFailOld, this._ulBadChecksum, this._logtimeBadChecksum.GetHashCode(), this._ulBadChecksumOld, this._genCommitted, this._bkinfoCopyPrev.GetHashCode(), this._bkinfoDiffPrev.GetHashCode(), }; var listHashes = new List(hashes); this.AddNotYetPublishedHashCodes(listHashes); return Util.CalculateHashCode(listHashes); } /// /// Determines whether the specified is equal to the current . /// /// The to compare with the current . /// /// True if the specified is equal to the current ; otherwise, false. /// public override bool Equals(object obj) { if (obj == null || this.GetType() != obj.GetType()) { return false; } return this.Equals((JET_DBINFOMISC)obj); } /// /// Indicates whether the current object is equal to another object of the same type. /// /// An object to compare with this object. /// /// True if the current object is equal to the parameter; otherwise, false. /// public bool Equals(JET_DBINFOMISC other) { if (null == other) { return false; } bool notYetPublishedEquals = true; this.NotYetPublishedEquals(other, ref notYetPublishedEquals); return notYetPublishedEquals && this._ulVersion == other._ulVersion && this._ulUpdate == other._ulUpdate && this._signDb == other._signDb && this._dbstate == other._dbstate && this._lgposConsistent == other._lgposConsistent && this._logtimeConsistent == other._logtimeConsistent && this._logtimeAttach == other._logtimeAttach && this._lgposAttach == other._lgposAttach && this._logtimeDetach == other._logtimeDetach && this._lgposDetach == other._lgposDetach && this._signLog == other._signLog && this._bkinfoFullPrev == other._bkinfoFullPrev && this._bkinfoIncPrev == other._bkinfoIncPrev && this._bkinfoFullCur == other._bkinfoFullCur && this._fShadowingDisabled == other._fShadowingDisabled && this._fUpgradeDb == other._fUpgradeDb && this._dwMajorVersion == other._dwMajorVersion && this._dwMinorVersion == other._dwMinorVersion && this._dwBuildNumber == other._dwBuildNumber && this._lSPNumber == other._lSPNumber && this._cbPageSize == other._cbPageSize && this._genMinRequired == other._genMinRequired && this._genMaxRequired == other._genMaxRequired && this._logtimeGenMaxCreate == other._logtimeGenMaxCreate && this._ulRepairCount == other._ulRepairCount && this._logtimeRepair == other._logtimeRepair && this._ulRepairCountOld == other._ulRepairCountOld && this._ulECCFixSuccess == other._ulECCFixSuccess && this._logtimeECCFixSuccess == other._logtimeECCFixSuccess && this._ulECCFixSuccessOld == other._ulECCFixSuccessOld && this._ulECCFixFail == other._ulECCFixFail && this._logtimeECCFixFail == other._logtimeECCFixFail && this._ulECCFixFailOld == other._ulECCFixFailOld && this._ulBadChecksum == other._ulBadChecksum && this._logtimeBadChecksum == other._logtimeBadChecksum && this._ulBadChecksumOld == other._ulBadChecksumOld && this._genCommitted == other._genCommitted && this._bkinfoCopyPrev == other._bkinfoCopyPrev && this._bkinfoDiffPrev == other._bkinfoDiffPrev; } /// /// Sets the members of this object from a native object. /// /// The native object. internal void SetFromNativeDbinfoMisc(ref NATIVE_DBINFOMISC native) { unchecked { this._ulVersion = (int)native.ulVersion; this._ulUpdate = (int)native.ulUpdate; this._signDb = new JET_SIGNATURE(native.signDb); this._dbstate = (JET_dbstate)native.dbstate; this._lgposConsistent = native.lgposConsistent; this._logtimeConsistent = native.logtimeConsistent; this._logtimeAttach = native.logtimeAttach; this._lgposAttach = native.lgposAttach; this._logtimeDetach = native.logtimeDetach; this._lgposDetach = native.lgposDetach; this._signLog = new JET_SIGNATURE(native.signLog); this._bkinfoFullPrev = native.bkinfoFullPrev; this._bkinfoIncPrev = native.bkinfoIncPrev; this._bkinfoFullCur = native.bkinfoFullCur; this._fShadowingDisabled = 0 != native.fShadowingDisabled; this._fUpgradeDb = 0 != native.fUpgradeDb; this._dwMajorVersion = (int)native.dwMajorVersion; this._dwMinorVersion = (int)native.dwMinorVersion; this._dwBuildNumber = (int)native.dwBuildNumber; this._lSPNumber = (int)native.lSPNumber; this._cbPageSize = (int)native.cbPageSize; } } /// /// Sets the members of this object from a native object. /// /// The native object. internal void SetFromNativeDbinfoMisc(ref NATIVE_DBINFOMISC4 native) { this.SetFromNativeDbinfoMisc(ref native.dbinfo); unchecked { this._genMinRequired = (int)native.genMinRequired; this._genMaxRequired = (int)native.genMaxRequired; this._logtimeGenMaxCreate = native.logtimeGenMaxCreate; this._ulRepairCount = (int)native.ulRepairCount; this._logtimeRepair = native.logtimeRepair; this._ulRepairCountOld = (int)native.ulRepairCountOld; this._ulECCFixSuccess = (int)native.ulECCFixSuccess; this._logtimeECCFixSuccess = native.logtimeECCFixSuccess; this._ulECCFixSuccessOld = (int)native.ulECCFixSuccessOld; this._ulECCFixFail = (int)native.ulECCFixFail; this._logtimeECCFixFail = native.logtimeECCFixFail; this._ulECCFixFailOld = (int)native.ulECCFixFailOld; this._ulBadChecksum = (int)native.ulBadChecksum; this._logtimeBadChecksum = native.logtimeBadChecksum; this._ulBadChecksumOld = (int)native.ulBadChecksumOld; this._genCommitted = (int)native.genCommitted; this._bkinfoCopyPrev = native.bkinfoCopyPrev; this._bkinfoDiffPrev = native.bkinfoDiffPrev; } } /// /// Calculates the native version of the structure. /// /// The native version of the structure. internal NATIVE_DBINFOMISC GetNativeDbinfomisc() { NATIVE_DBINFOMISC native = new NATIVE_DBINFOMISC(); unchecked { native.ulVersion = (uint)this._ulVersion; native.ulUpdate = (uint)this._ulUpdate; native.signDb = this._signDb.GetNativeSignature(); native.dbstate = (uint)this._dbstate; native.lgposConsistent = this._lgposConsistent; native.logtimeConsistent = this._logtimeConsistent; native.logtimeAttach = this._logtimeAttach; native.lgposAttach = this._lgposAttach; native.logtimeDetach = this._logtimeDetach; native.lgposDetach = this._lgposDetach; native.signLog = this._signLog.GetNativeSignature(); native.bkinfoFullPrev = this._bkinfoFullPrev; native.bkinfoIncPrev = this._bkinfoIncPrev; native.bkinfoFullCur = this._bkinfoFullCur; native.fShadowingDisabled = this._fShadowingDisabled ? 1u : 0u; native.fUpgradeDb = this._fUpgradeDb ? 1u : 0u; native.dwMajorVersion = (uint)this._dwMajorVersion; native.dwMinorVersion = (uint)this._dwMinorVersion; native.dwBuildNumber = (uint)this._dwBuildNumber; native.lSPNumber = (uint)this._lSPNumber; native.cbPageSize = (uint)this._cbPageSize; } return native; } /// /// Calculates the native version of the structure. /// /// The native version of the structure. internal NATIVE_DBINFOMISC4 GetNativeDbinfomisc4() { NATIVE_DBINFOMISC4 native = new NATIVE_DBINFOMISC4(); native.dbinfo = this.GetNativeDbinfomisc(); unchecked { native.genMinRequired = (uint)this._genMinRequired; native.genMaxRequired = (uint)this._genMaxRequired; native.logtimeGenMaxCreate = this._logtimeGenMaxCreate; native.ulRepairCount = (uint)this._ulRepairCount; native.logtimeRepair = this._logtimeRepair; native.ulRepairCountOld = (uint)this._ulRepairCountOld; native.ulECCFixSuccess = (uint)this._ulECCFixSuccess; native.logtimeECCFixSuccess = this._logtimeECCFixSuccess; native.ulECCFixSuccessOld = (uint)this._ulECCFixSuccessOld; native.ulECCFixFail = (uint)this._ulECCFixFail; native.logtimeECCFixFail = this._logtimeECCFixFail; native.ulECCFixFailOld = (uint)this._ulECCFixFailOld; native.ulBadChecksum = (uint)this._ulBadChecksum; native.logtimeBadChecksum = this._logtimeBadChecksum; native.ulBadChecksumOld = (uint)this._ulBadChecksumOld; native.genCommitted = (uint)this._genCommitted; native.bkinfoCopyPrev = this._bkinfoCopyPrev; native.bkinfoDiffPrev = this._bkinfoDiffPrev; } return native; } /// /// Provides a hook to allow comparison of additional fields in /// a different file. These additonal fields are not yet published /// on MSDN. /// /// The structure to compare with. /// Whether the additional fields in /// are the same as this. partial void NotYetPublishedEquals(JET_DBINFOMISC other, ref bool notYetPublishedEquals); /// /// Provides a hook to allow additional fields to be calculated in the hashcode. /// These additonal fields are not yet published on MSDN. /// /// The list of hashcodes to add to. partial void AddNotYetPublishedHashCodes(IList hashCodes); } }