Ejemplo n.º 1
0
 public void InitializeFromSerializable(ServerHealthInfoPersisted ship)
 {
     this.ServerFoundInAD = StateTransitionInfo.ConstructFromPersisted(ship.ServerFoundInAD);
     this.CriticalForMaintainingAvailability = StateTransitionInfo.ConstructFromPersisted(ship.CriticalForMaintainingAvailability);
     this.CriticalForMaintainingRedundancy   = StateTransitionInfo.ConstructFromPersisted(ship.CriticalForMaintainingRedundancy);
     this.CriticalForRestoringAvailability   = StateTransitionInfo.ConstructFromPersisted(ship.CriticalForRestoringAvailability);
     this.CriticalForRestoringRedundancy     = StateTransitionInfo.ConstructFromPersisted(ship.CriticalForRestoringRedundancy);
     this.HighForRestoringAvailability       = StateTransitionInfo.ConstructFromPersisted(ship.HighForRestoringAvailability);
     this.HighForRestoringRedundancy         = StateTransitionInfo.ConstructFromPersisted(ship.HighForRestoringRedundancy);
 }
        // 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);
        }