public void Setup() { this.native = new NATIVE_DBINFOMISC4 { dbinfo = new NATIVE_DBINFOMISC { ulVersion = Any.UInt32, ulUpdate = Any.UInt32, signDb = new NATIVE_SIGNATURE { logtimeCreate = Any.Logtime, ulRandom = Any.UInt32, }, dbstate = 1, lgposConsistent = Any.Lgpos, logtimeConsistent = Any.Logtime, logtimeAttach = Any.Logtime, lgposAttach = Any.Lgpos, logtimeDetach = Any.Logtime, lgposDetach = Any.Lgpos, signLog = new NATIVE_SIGNATURE { logtimeCreate = Any.Logtime, ulRandom = Any.UInt32, }, bkinfoFullPrev = Any.Bkinfo, bkinfoIncPrev = Any.Bkinfo, bkinfoFullCur = Any.Bkinfo, fShadowingDisabled = Any.UInt32, fUpgradeDb = Any.UInt32, dwMajorVersion = Any.UInt16, dwMinorVersion = Any.UInt16, dwBuildNumber = Any.UInt16, lSPNumber = Any.UInt16, cbPageSize = Any.UInt16, }, genMinRequired = Any.UInt16, genMaxRequired = Any.UInt16, logtimeGenMaxCreate = Any.Logtime, ulRepairCount = Any.UInt16, logtimeRepair = Any.Logtime, ulRepairCountOld = Any.UInt16, ulECCFixSuccess = Any.UInt16, logtimeECCFixSuccess = Any.Logtime, ulECCFixSuccessOld = Any.UInt16, ulECCFixFail = Any.UInt16, logtimeECCFixFail = Any.Logtime, ulECCFixFailOld = Any.UInt16, ulBadChecksum = Any.UInt16, logtimeBadChecksum = Any.Logtime, ulBadChecksumOld = Any.UInt16, genCommitted = Any.UInt16, bkinfoCopyPrev = Any.Bkinfo, bkinfoDiffPrev = Any.Bkinfo, }; this.managed = new JET_DBINFOMISC(); this.managed.SetFromNativeDbinfoMisc(ref this.native); }
public void VerifyDbinfomiscCanBeSerialized() { var expected = new JET_DBINFOMISC { cbPageSize = 8192, signDb = new JET_SIGNATURE(1, DateTime.Now, "COMPUTAR!") }; SerializeAndCompare(expected); }
public void VerifyGetNativeDbInfoMisc() { // We need to test GetNativeDbinfomisc4 var nativeDbinfoMisc4 = this.managed.GetNativeDbinfomisc4(); var reconstituted = new JET_DBINFOMISC(); reconstituted.SetFromNativeDbinfoMisc(ref nativeDbinfoMisc4); Assert.IsTrue(reconstituted.Equals(this.managed)); }
// Token: 0x060020F1 RID: 8433 RVA: 0x00097B50 File Offset: 0x00095D50 public void GetDatabaseInformation(Guid guidMdb, out JET_DBINFOMISC databaseInformation) { JET_DBINFOMISC tmpDbInfo = new JET_DBINFOMISC(); base.ProtectedCallWithTimeout("GetPhysicalDatabaseInformation", this.RpcTimeout, delegate { this.ExRpcAdmin.GetPhysicalDatabaseInformation(guidMdb, out tmpDbInfo); }); databaseInformation = tmpDbInfo; }
public void VerifyGetNativeDbInfoMiscWithaLthernate() { // We need to test GetNativeDbinfomisc4 with some alternate values. // In order to do that, we need to change some variables around, // but this is an easy (if convoluted!) way of duplicating the object. var nativeDbinfoMisc4 = this.managed.GetNativeDbinfomisc4(); var reconstituted = new JET_DBINFOMISC(); reconstituted.SetFromNativeDbinfoMisc(ref nativeDbinfoMisc4); Assert.IsTrue(reconstituted.Equals(this.managed)); // Now change some variables to exercise other code paths. reconstituted.fUpgradeDb = !reconstituted.fUpgradeDb; reconstituted.fShadowingDisabled = !reconstituted.fShadowingDisabled; var nativeOpposite = reconstituted.GetNativeDbinfomisc4(); var managedOpposite = new JET_DBINFOMISC(); managedOpposite.SetFromNativeDbinfoMisc(ref nativeOpposite); Assert.IsTrue(reconstituted.Equals(managedOpposite)); }
/// <summary> /// Retrieves certain information about the given database. /// </summary> /// <param name="databaseName">The file name of the database.</param> /// <param name="dbinfomisc">The value to be retrieved.</param> /// <param name="infoLevel">The specific data to retrieve.</param> public static void JetGetDatabaseFileInfo( string databaseName, out JET_DBINFOMISC dbinfomisc, JET_DbInfo infoLevel) { Api.Check(Impl.JetGetDatabaseFileInfo(databaseName, out dbinfomisc, infoLevel)); }
/// <summary> /// Retrieves certain information about the given database. /// </summary> /// <param name="sesid">The session to use.</param> /// <param name="dbid">The database identifier.</param> /// <param name="dbinfomisc">The value to be retrieved.</param> /// <param name="infoLevel">The specific data to retrieve.</param> public static void JetGetDatabaseInfo( JET_SESID sesid, JET_DBID dbid, out JET_DBINFOMISC dbinfomisc, JET_DbInfo infoLevel) { Api.Check(Impl.JetGetDatabaseInfo(sesid, dbid, out dbinfomisc, infoLevel)); }
public void JetDbinfomiscToString() { var value = new JET_DBINFOMISC(); Assert.AreEqual("JET_DBINFOMISC(JET_SIGNATURE(0::))", value.ToString()); }
// Token: 0x060020E6 RID: 8422 RVA: 0x0009767C File Offset: 0x0009587C public void LogReplayRequest(Guid guidMdb, uint ulgenLogReplayMax, uint ulLogReplayFlags, out uint ulgenLogReplayNext, out JET_DBINFOMISC dbinfo, out IPagePatchReply pagePatchReply, out uint[] corruptedPages) { pagePatchReply = null; corruptedPages = null; uint tmplgenLogReplayNext = 0U; JET_DBINFOMISC tmpdbinfo = new JET_DBINFOMISC(); uint patchReplyPageNumber = 0U; byte[] patchReplyToken = null; byte[] patchReplyData = null; uint[] pagesToBePatched = null; base.ProtectedCallWithTimeout("LogReplayRequest2", this.RpcTimeout, delegate { this.ExRpcAdmin.LogReplayRequest(guidMdb, ulgenLogReplayMax, ulLogReplayFlags, out tmplgenLogReplayNext, out tmpdbinfo, out patchReplyPageNumber, out patchReplyToken, out patchReplyData, out pagesToBePatched); }); ulgenLogReplayNext = tmplgenLogReplayNext; dbinfo = tmpdbinfo; if (patchReplyPageNumber != 0U) { pagePatchReply = new PagePatchReply { PageNumber = checked ((int)patchReplyPageNumber), Data = patchReplyData, Token = patchReplyToken }; } if (pagesToBePatched != null && pagesToBePatched.Length > 0) { corruptedPages = pagesToBePatched; } }
// Token: 0x06000966 RID: 2406 RVA: 0x0002C3E9 File Offset: 0x0002A5E9 public static bool IsIncrementalReseedInProgress(JET_DBINFOMISC dbInfo) { return(dbInfo.dbstate == (JET_dbstate)6); }
// Token: 0x06000964 RID: 2404 RVA: 0x0002C3A4 File Offset: 0x0002A5A4 public static bool IsIncrementalReseedPossible(JET_DBINFOMISC dbInfo) { JET_dbstate dbstate = dbInfo.dbstate; return(dbstate == JET_dbstate.DirtyShutdown || dbstate == (JET_dbstate)7 || dbstate == JET_dbstate.CleanShutdown || dbstate == (JET_dbstate)6); }
// Token: 0x06000963 RID: 2403 RVA: 0x0002C390 File Offset: 0x0002A590 public static bool IsIncrementalReseedPossible(string database, out JET_DBINFOMISC dbInfo) { Api.JetGetDatabaseFileInfo(database, out dbInfo, JET_DbInfo.Misc); return(EseHelper.IsIncrementalReseedPossible(dbInfo)); }