Beispiel #1
0
        // Token: 0x06001D5E RID: 7518 RVA: 0x00084B14 File Offset: 0x00082D14
        public static bool ExitLogRepair(Guid dbGuid)
        {
            LogRepair.Tracer.TraceDebug <Guid>(0L, "ExitLogRepair({0})", dbGuid);
            bool result;

            lock (LogRepair.s_globalLock)
            {
                RegistryStateIO registryStateIO = new RegistryStateIO(null, dbGuid.ToString(), false);
                LogRepairMode   logRepairMode;
                registryStateIO.TryReadEnum <LogRepairMode>("LogRepairMode", LogRepairMode.Off, out logRepairMode);
                if (logRepairMode == LogRepairMode.ReplayPending)
                {
                    registryStateIO.WriteEnum <LogRepairMode>("LogRepairMode", LogRepairMode.Off, true);
                    registryStateIO.WriteLong("LogRepairRetryCount", 0L, true);
                    result = true;
                }
                else if (logRepairMode == LogRepairMode.Enabled)
                {
                    LogRepair.Tracer.TraceDebug <Guid>(0L, "ExitLogRepair({0}) skipped because another corruption was reported", dbGuid);
                    result = false;
                }
                else
                {
                    result = true;
                }
            }
            return(result);
        }
 // Token: 0x06000B79 RID: 2937 RVA: 0x00032BCC File Offset: 0x00030DCC
 public RegistryStateIO(string machineName, string identity, bool fLocks)
 {
     this.m_machineName = machineName;
     this.m_identity    = identity;
     this.m_fStateLock  = fLocks;
     if (fLocks)
     {
         this.m_registryKey = string.Format("SOFTWARE\\Microsoft\\ExchangeServer\\v15\\Replay\\StateLock\\{0}", identity);
     }
     else
     {
         this.m_registryKey = string.Format("SOFTWARE\\Microsoft\\ExchangeServer\\v15\\Replay\\State\\{0}", identity);
     }
     this.m_key = RegistryStateIO.OpenRemoteKey(machineName, this.m_registryKey);
 }
 // Token: 0x06000B7B RID: 2939 RVA: 0x00032D7C File Offset: 0x00030F7C
 public override void DeleteState()
 {
     RegistryStateIO.trace.TraceDebug <string>((long)this.GetHashCode(), "DeleteState: {0}", this.m_registryKey);
     if (this.m_fStateLock)
     {
         using (RegistryKey registryKey = RegistryStateIO.OpenRemoteKey(this.m_machineName, "SOFTWARE\\Microsoft\\ExchangeServer\\v15\\Replay\\StateLock"))
         {
             registryKey.DeleteSubKeyTree(this.m_identity);
             return;
         }
     }
     using (RegistryKey registryKey2 = RegistryStateIO.OpenRemoteKey(this.m_machineName, "SOFTWARE\\Microsoft\\ExchangeServer\\v15\\Replay\\State"))
     {
         registryKey2.DeleteSubKeyTree(this.m_identity);
     }
 }
Beispiel #4
0
 // Token: 0x06001D5D RID: 7517 RVA: 0x00084A68 File Offset: 0x00082C68
 public static void EnableLogRepair(Guid dbGuid)
 {
     LogRepair.Tracer.TraceDebug <Guid>(0L, "EnableLogRepair({0})", dbGuid);
     lock (LogRepair.s_globalLock)
     {
         RegistryStateIO registryStateIO = new RegistryStateIO(null, dbGuid.ToString(), false);
         LogRepairMode   logRepairMode;
         registryStateIO.TryReadEnum <LogRepairMode>("LogRepairMode", LogRepairMode.Off, out logRepairMode);
         if (logRepairMode != LogRepairMode.Enabled)
         {
             registryStateIO.WriteEnum <LogRepairMode>("LogRepairMode", LogRepairMode.Enabled, true);
             if (logRepairMode == LogRepairMode.Off)
             {
                 registryStateIO.WriteLong("LogRepairRetryCount", 0L, true);
             }
         }
         else
         {
             LogRepair.Tracer.TraceDebug <Guid>(0L, "EnableLogRepair({0}) skipped because already enabled", dbGuid);
         }
     }
 }