Esempio n. 1
0
        public Boolean IsEqual(PopulationActivityEvent compareEvent)
        {
            Boolean isEqual = true;

            if (this.scheduleType != compareEvent.ScheduleType)
            {
                isEqual = false;
            }

            if (this.scheduleValue != compareEvent.ScheduleValue)
            {
                isEqual = false;
            }

            if (this.scheduleQualifier != compareEvent.ScheduleQualifier)
            {
                isEqual = false;
            }


            isEqual &= (anchorDate == compareEvent.AnchorDate);


            if (this.reoccurring != compareEvent.Reoccurring)
            {
                isEqual = false;
            }

            if (this.performActionDateType != compareEvent.PerformActionDateType)
            {
                isEqual = false;
            }

            if (isEqual)
            {
                isEqual = isEqual && action.IsEqual(compareEvent.action);
            }


            return(isEqual);
        }
Esempio n. 2
0
        public Boolean IsEqual(ActivityThreshold compareObject)
        {
            Boolean isEqual = base.IsEqual((CoreObject)compareObject);


            isEqual &= (relativeDateValue == compareObject.RelativeDateValue);

            isEqual &= (relativeDateQualifier == compareObject.RelativeDateQualifier);

            isEqual &= (status == compareObject.Status);


            isEqual &= (((action != null) && (compareObject.Action != null)) || ((action == null) && (compareObject.Action == null)));

            if ((action != null) && (compareObject.Action != null))
            {
                isEqual &= action.IsEqual(compareObject.Action);
            }

            return(isEqual);
        }
Esempio n. 3
0
        public Boolean IsEqual(PopulationTriggerEvent compareEvent)
        {
            Boolean isEqual = true;

            if (this.eventType != compareEvent.EventType)
            {
                isEqual = false;
            }

            else
            {
                switch (this.eventType)
                {
                case Mercury.Server.Application.PopulationTriggerEventType.Service:

                    if (this.serviceId != compareEvent.ServiceId)
                    {
                        isEqual = false;
                    }

                    break;

                case Mercury.Server.Application.PopulationTriggerEventType.Metric:

                    if (this.metricType != compareEvent.metricType)
                    {
                        isEqual = false;
                    }

                    else
                    {
                        if (this.metricId != compareEvent.MetricId)
                        {
                            isEqual = false;
                        }

                        if (this.metricMaximum != compareEvent.MetricMaximum)
                        {
                            isEqual = false;
                        }

                        if (this.metricMaximum != compareEvent.MetricMaximum)
                        {
                            isEqual = false;
                        }
                    }

                    break;

                case Mercury.Server.Application.PopulationTriggerEventType.AuthorizedService:

                    if (this.authorizedServiceId != compareEvent.AuthorizedServiceId)
                    {
                        isEqual = false;
                    }

                    break;
                }
            }

            isEqual = isEqual && (problemStatementId == compareEvent.ProblemStatementId);

            if (isEqual)
            {
                isEqual = isEqual && action.IsEqual(compareEvent.action);
            }

            return(isEqual);
        }