// Token: 0x060011CD RID: 4557 RVA: 0x0004A424 File Offset: 0x00048624
        public HealthInfoPersisted ConvertToHealthInfoPersisted()
        {
            HealthInfoPersisted hi = new HealthInfoPersisted();

            hi.CreateTimeUtcStr     = DateTimeHelper.ToPersistedString(this.CreateTimeUtc);
            hi.LastUpdateTimeUtcStr = DateTimeHelper.ToPersistedString(this.LastUpdateTimeUtc);
            base.ReaderLockedOperation(delegate
            {
                foreach (KeyValuePair <Guid, DbHealthInfo> keyValuePair in this.m_dbServerInfos)
                {
                    DbHealthInfoPersisted item = keyValuePair.Value.ConvertToSerializable();
                    hi.Databases.Add(item);
                }
                foreach (ServerHealthInfo serverHealthInfo in this.m_serverInfos.Values)
                {
                    ServerHealthInfoPersisted item2 = serverHealthInfo.ConvertToSerializable();
                    hi.Servers.Add(item2);
                }
            });
            return(hi);
        }
예제 #2
0
        // Token: 0x0600121A RID: 4634 RVA: 0x0004B03C File Offset: 0x0004923C
        public DbHealthInfoPersisted ConvertToSerializable()
        {
            DbHealthInfoPersisted dbHealthInfoPersisted = new DbHealthInfoPersisted(this.DbGuid, this.DbName);

            dbHealthInfoPersisted.DbFoundInAD           = this.DbFoundInAD.ConvertToSerializable();
            dbHealthInfoPersisted.SkippedFromMonitoring = this.SkippedFromMonitoring.ConvertToSerializable();
            foreach (DbCopyHealthInfo dbCopyHealthInfo in this.DbServerInfos.Values)
            {
                dbHealthInfoPersisted.DbCopies.Add(dbCopyHealthInfo.ConvertToSerializable());
            }
            DbAvailabilityRedundancyInfo dbAvailabilityRedundancyInfo = this.DbAvailabilityRedundancyInfo;

            dbHealthInfoPersisted.IsAtLeast1AvailableCopy = dbAvailabilityRedundancyInfo.AvailabilityInfo[1].ConvertToSerializable();
            dbHealthInfoPersisted.IsAtLeast2AvailableCopy = dbAvailabilityRedundancyInfo.AvailabilityInfo[2].ConvertToSerializable();
            dbHealthInfoPersisted.IsAtLeast3AvailableCopy = dbAvailabilityRedundancyInfo.AvailabilityInfo[3].ConvertToSerializable();
            dbHealthInfoPersisted.IsAtLeast4AvailableCopy = dbAvailabilityRedundancyInfo.AvailabilityInfo[4].ConvertToSerializable();
            dbHealthInfoPersisted.IsAtLeast1RedundantCopy = dbAvailabilityRedundancyInfo.RedundancyInfo[1].ConvertToSerializable();
            dbHealthInfoPersisted.IsAtLeast2RedundantCopy = dbAvailabilityRedundancyInfo.RedundancyInfo[2].ConvertToSerializable();
            dbHealthInfoPersisted.IsAtLeast3RedundantCopy = dbAvailabilityRedundancyInfo.RedundancyInfo[3].ConvertToSerializable();
            dbHealthInfoPersisted.IsAtLeast4RedundantCopy = dbAvailabilityRedundancyInfo.RedundancyInfo[4].ConvertToSerializable();
            return(dbHealthInfoPersisted);
        }
예제 #3
0
        // Token: 0x0600121B RID: 4635 RVA: 0x0004B194 File Offset: 0x00049394
        public void InitializeFromSerializable(DbHealthInfoPersisted dbHip)
        {
            this.DbFoundInAD           = StateTransitionInfo.ConstructFromPersisted(dbHip.DbFoundInAD);
            this.SkippedFromMonitoring = StateTransitionInfo.ConstructFromPersisted(dbHip.SkippedFromMonitoring);
            if (dbHip.DbCopies != null)
            {
                foreach (DbCopyHealthInfoPersisted dbCopyHealthInfoPersisted in dbHip.DbCopies)
                {
                    AmServerName     serverName       = new AmServerName(dbCopyHealthInfoPersisted.ServerFqdn);
                    DbCopyHealthInfo dbCopyHealthInfo = this.AddNewDbCopy(serverName);
                    dbCopyHealthInfo.InitializeFromSerializable(dbCopyHealthInfoPersisted);
                }
            }
            DbAvailabilityRedundancyInfo dbAvailabilityRedundancyInfo = this.DbAvailabilityRedundancyInfo;

            dbAvailabilityRedundancyInfo.AvailabilityInfo[1] = StateTransitionInfo.ConstructFromPersisted(dbHip.IsAtLeast1AvailableCopy);
            dbAvailabilityRedundancyInfo.AvailabilityInfo[2] = StateTransitionInfo.ConstructFromPersisted(dbHip.IsAtLeast2AvailableCopy);
            dbAvailabilityRedundancyInfo.AvailabilityInfo[3] = StateTransitionInfo.ConstructFromPersisted(dbHip.IsAtLeast3AvailableCopy);
            dbAvailabilityRedundancyInfo.AvailabilityInfo[4] = StateTransitionInfo.ConstructFromPersisted(dbHip.IsAtLeast4AvailableCopy);
            dbAvailabilityRedundancyInfo.RedundancyInfo[1]   = StateTransitionInfo.ConstructFromPersisted(dbHip.IsAtLeast1RedundantCopy);
            dbAvailabilityRedundancyInfo.RedundancyInfo[2]   = StateTransitionInfo.ConstructFromPersisted(dbHip.IsAtLeast2RedundantCopy);
            dbAvailabilityRedundancyInfo.RedundancyInfo[3]   = StateTransitionInfo.ConstructFromPersisted(dbHip.IsAtLeast3RedundantCopy);
            dbAvailabilityRedundancyInfo.RedundancyInfo[4]   = StateTransitionInfo.ConstructFromPersisted(dbHip.IsAtLeast4RedundantCopy);
        }