private void UpdateReplayStateWithError(CopyStatusClientCachedEntry status, bool validationChecksPassed)
        {
            Exception ex = null;

            try
            {
                using (RegistryStateAccess registryStateAccess = new RegistryStateAccess(this.m_replayStateRegKey))
                {
                    ex = this.UpdateReplayStateProperties(registryStateAccess, validationChecksPassed);
                }
            }
            catch (RegistryParameterException ex2)
            {
                ex = ex2;
            }
            if (ex != null)
            {
                DatabaseValidatorBase.Tracer.TraceError <Guid, string, Exception>((long)this.GetHashCode(), "UpdateReplayStateWithError() for db copy '{0}\\{1}' failed to write to registry state: Error: {2}", status.DbGuid, status.ServerContacted.NetbiosName, ex);
            }
        }
        protected Exception UpdateReplayStatePropertiesCommon(RegistryStateAccess regState, bool validationChecksPassed, string lastChecksPassedTimeRegkeyName, string isLastChecksPassedRegkeyName)
        {
            DateTime  utcNow = DateTime.UtcNow;
            Exception ex;

            if (validationChecksPassed)
            {
                ex = regState.WriteString(lastChecksPassedTimeRegkeyName, utcNow.ToFileTime().ToString());
                if (ex != null)
                {
                    DatabaseValidatorBase.Tracer.TraceError <string, Exception>((long)this.GetHashCode(), "UpdateReplayStateProperties(): Failed to write '{0}' value. Exception: {1}", lastChecksPassedTimeRegkeyName, ex);
                }
            }
            ex = regState.WriteString(isLastChecksPassedRegkeyName, validationChecksPassed.ToString());
            if (ex != null)
            {
                DatabaseValidatorBase.Tracer.TraceError <string, Exception>((long)this.GetHashCode(), "UpdateReplayStateProperties(): Failed to write '{0}' value. Exception: {1}", isLastChecksPassedRegkeyName, ex);
            }
            return(ex);
        }
 // Token: 0x0600143F RID: 5183 RVA: 0x00051A1B File Offset: 0x0004FC1B
 protected override Exception UpdateReplayStateProperties(RegistryStateAccess regState, bool validationChecksPassed)
 {
     return(null);
 }
Beispiel #4
0
 // Token: 0x0600143A RID: 5178 RVA: 0x000519AD File Offset: 0x0004FBAD
 protected override Exception UpdateReplayStateProperties(RegistryStateAccess regState, bool validationChecksPassed)
 {
     return(base.UpdateReplayStatePropertiesCommon(regState, validationChecksPassed, "LastCopyRedundancyChecksPassedTime", "IsLastCopyRedundancyChecksPassed"));
 }
 protected abstract Exception UpdateReplayStateProperties(RegistryStateAccess regState, bool validationChecksPassed);