Beispiel #1
0
        public bool Equals(UptimeScheduler other)
        {
            if (other == null)
            {
                return(false);
            }

            return(this.GetHashCode() == other.GetHashCode());
        }
Beispiel #2
0
        public override bool Equals(object obj)
        {
            if (obj == null || GetType() != obj.GetType())
            {
                return(false);
            }

            UptimeScheduler other = obj as UptimeScheduler;

            return(this.Equals(other));
        }
Beispiel #3
0
        private CheckSuspendResult CheckUptime(UptimeScheduler uptimeScheduler)
        {
            var now = DateTime.Now;

            if (uptimeScheduler.NextDueTimeWithDuration.HasValue && uptimeScheduler.NextDueTime.HasValue &&
                uptimeScheduler.NextDueTime < now && now < uptimeScheduler.NextDueTimeWithDuration.Value)
            {
                return(new CheckSuspendResult(true, string.Format(Wsapm.Core.Resources.Wsapm_Core.ScheduledUptimeCheck_UptimeDefinedReason, uptimeScheduler.NextDueTimeWithDuration.Value.ToShortTimeString())));
            }
            else
            {
                return(new CheckSuspendResult(false, String.Empty));
            }
        }