예제 #1
0
        // Token: 0x06000136 RID: 310 RVA: 0x00007620 File Offset: 0x00005820
        internal static AmConfigChangedFlags CheckForChanges(AmConfig left, AmConfig right)
        {
            AmConfigChangedFlags amConfigChangedFlags = AmConfigChangedFlags.None;

            if (left.Role != right.Role)
            {
                amConfigChangedFlags |= AmConfigChangedFlags.Role;
            }
            if (!object.ReferenceEquals(left.DbState, right.DbState))
            {
                amConfigChangedFlags |= AmConfigChangedFlags.DbState;
            }
            if (!SharedHelper.StringIEquals(left.LastError, right.LastError))
            {
                amConfigChangedFlags |= AmConfigChangedFlags.LastError;
            }
            if ((left.DagConfig == null && right.DagConfig != null) || (left.DagConfig != null && right.DagConfig == null))
            {
                amConfigChangedFlags |= AmConfigChangedFlags.DagConfig;
            }
            if (left.DagConfig != null && right.DagConfig != null)
            {
                if (!left.DagConfig.Id.Equals(right.DagConfig.Id))
                {
                    amConfigChangedFlags |= AmConfigChangedFlags.DagId;
                }
                if (!AmServerName.IsArrayEquals(left.DagConfig.MemberServers, right.DagConfig.MemberServers))
                {
                    amConfigChangedFlags |= AmConfigChangedFlags.MemberServers;
                }
                if (!AmServerName.IsEqual(left.DagConfig.CurrentPAM, right.DagConfig.CurrentPAM))
                {
                    amConfigChangedFlags |= AmConfigChangedFlags.CurrentPAM;
                }
                if (!object.ReferenceEquals(left.DagConfig.Cluster, right.DagConfig.Cluster))
                {
                    amConfigChangedFlags |= AmConfigChangedFlags.Cluster;
                }
            }
            return(amConfigChangedFlags);
        }