public bool Equals(DestinyProfileTransitoryCurrentActivity input)
        {
            if (input == null)
            {
                return(false);
            }

            return
                ((
                     StartTime == input.StartTime ||
                     (StartTime != null && StartTime.Equals(input.StartTime))
                     ) &&
                 (
                     EndTime == input.EndTime ||
                     (EndTime != null && EndTime.Equals(input.EndTime))
                 ) &&
                 (
                     Score == input.Score ||
                     (Score.Equals(input.Score))
                 ) &&
                 (
                     HighestOpposingFactionScore == input.HighestOpposingFactionScore ||
                     (HighestOpposingFactionScore.Equals(input.HighestOpposingFactionScore))
                 ) &&
                 (
                     NumberOfOpponents == input.NumberOfOpponents ||
                     (NumberOfOpponents.Equals(input.NumberOfOpponents))
                 ) &&
                 (
                     NumberOfPlayers == input.NumberOfPlayers ||
                     (NumberOfPlayers.Equals(input.NumberOfPlayers))
                 ));
        }
示例#2
0
        /// <summary>
        /// Returns true if DutyTiming instances are equal
        /// </summary>
        /// <param name="other">Instance of DutyTiming to be compared</param>
        /// <returns>Boolean</returns>
        public bool Equals(DutyTiming other)
        {
            if (other is null)
            {
                return(false);
            }
            if (ReferenceEquals(this, other))
            {
                return(true);
            }

            return
                ((
                     Date == other.Date ||
                     Date != null &&
                     Date.Equals(other.Date)
                     ) &&
                 (
                     StartTime == other.StartTime ||
                     StartTime != null &&
                     StartTime.Equals(other.StartTime)
                 ) &&
                 (
                     EndTime == other.EndTime ||
                     EndTime != null &&
                     EndTime.Equals(other.EndTime)
                 ) &&
                 (
                     BreakDuration == other.BreakDuration ||

                     BreakDuration.Equals(other.BreakDuration)
                 ));
        }
示例#3
0
        /// <summary>
        ///     Determines whether the specified <see cref="System.Object" /> is equal to this instance.
        /// </summary>
        /// <param name="obj">
        ///     The <see cref="System.Object" /> to compare with this instance.
        /// </param>
        /// <returns>
        ///     <c>true</c> if the specified <see cref="System.Object" /> is equal to this instance; otherwise, <c>false</c>.
        /// </returns>
        public override bool Equals(object obj)
        {
            var period = obj as IPeriod;

            if (period != null)
            {
                IPeriod p = period;
                if (MatchesDateOnly || p.MatchesDateOnly)
                {
                    return
                        (StartTime.Value.Date == p.StartTime.Value.Date &&
                         (
                             EndTime == null ||
                             p.EndTime == null ||
                             EndTime.Value.Date.Equals(p.EndTime.Value.Date)
                         ));
                }

                return
                    (StartTime.Equals(p.StartTime) &&
                     (
                         EndTime == null ||
                         p.EndTime == null ||
                         EndTime.Equals(p.EndTime)
                     ));
            }
            return(false);
        }
示例#4
0
        /// <summary>
        /// Returns true if StoreSpecialHour instances are equal
        /// </summary>
        /// <param name="input">Instance of StoreSpecialHour to be compared</param>
        /// <returns>Boolean</returns>
        public bool Equals(StoreSpecialHour input)
        {
            if (input == null)
            {
                return(false);
            }

            return
                ((
                     Date == input.Date ||
                     Date != null &&
                     Date.Equals(input.Date)
                     ) &&
                 (
                     Closed == input.Closed ||
                     Closed != null &&
                     Closed.Equals(input.Closed)
                 ) &&
                 (
                     StartTime == input.StartTime ||
                     StartTime != null &&
                     StartTime.Equals(input.StartTime)
                 ) &&
                 (
                     EndTime == input.EndTime ||
                     EndTime != null &&
                     EndTime.Equals(input.EndTime)
                 ));
        }
示例#5
0
 internal void TryUpdateStartTime(DateTime startTime)
 {
     if (StartTime.Equals(default(DateTime)))
     {
         StartTime = startTime;
     }
 }
示例#6
0
 public override bool Equals(object obj)
 {
     if (obj is IPeriod)
     {
         IPeriod p = (IPeriod)obj;
         if (MatchesDateOnly || p.MatchesDateOnly)
         {
             return
                 (StartTime.Value.Date == p.StartTime.Value.Date &&
                  (
                      EndTime == null ||
                      p.EndTime == null ||
                      EndTime.Value.Date.Equals(p.EndTime.Value.Date)
                  ));
         }
         else
         {
             return
                 (StartTime.Equals(p.StartTime) &&
                  (
                      EndTime == null ||
                      p.EndTime == null ||
                      EndTime.Equals(p.EndTime)
                  ));
         }
     }
     return(false);
 }
        /// <summary>
        /// Compares two charge detail recordes for equality.
        /// </summary>
        /// <param name="ChargeDetailRecord">An charge detail record to compare with.</param>
        /// <returns>True if both match; False otherwise.</returns>
        public Boolean Equals(ChargeDetailRecord ChargeDetailRecord)
        {
            if ((Object)ChargeDetailRecord == null)
            {
                return(false);
            }

            return(CDRNature.Equals(ChargeDetailRecord.CDRNature) &&
                   ServiceSessionId.Equals(ChargeDetailRecord.ServiceSessionId) &&
                   RequestedServiceId.Equals(ChargeDetailRecord.RequestedServiceId) &&
                   EVSEId.Equals(ChargeDetailRecord.EVSEId) &&
                   UserContractIdAlias.Equals(ChargeDetailRecord.UserContractIdAlias) &&
                   UserId.Equals(ChargeDetailRecord.UserId) &&
                   StartTime.Equals(ChargeDetailRecord.StartTime) &&
                   EndTime.Equals(ChargeDetailRecord.EndTime) &&
                   MeterReports.Equals(ChargeDetailRecord.MeterReports) &&

                   ((!ExecPartnerSessionId.HasValue && !ChargeDetailRecord.ExecPartnerSessionId.HasValue) ||
                    (ExecPartnerSessionId.HasValue && ChargeDetailRecord.ExecPartnerSessionId.HasValue && ExecPartnerSessionId.Value.Equals(ChargeDetailRecord.ExecPartnerSessionId.Value))) &&

                   ((!ExecPartnerOperatorId.HasValue && !ChargeDetailRecord.ExecPartnerOperatorId.HasValue) ||
                    (ExecPartnerOperatorId.HasValue && ChargeDetailRecord.ExecPartnerOperatorId.HasValue && ExecPartnerOperatorId.Value.Equals(ChargeDetailRecord.ExecPartnerOperatorId.Value))) &&

                   ((!SalesPartnerSessionId.HasValue && !ChargeDetailRecord.SalesPartnerSessionId.HasValue) ||
                    (SalesPartnerSessionId.HasValue && ChargeDetailRecord.SalesPartnerSessionId.HasValue && SalesPartnerSessionId.Value.Equals(ChargeDetailRecord.SalesPartnerSessionId.Value))) &&

                   ((!SalesPartnerOperatorId.HasValue && !ChargeDetailRecord.SalesPartnerOperatorId.HasValue) ||
                    (SalesPartnerOperatorId.HasValue && ChargeDetailRecord.SalesPartnerOperatorId.HasValue && SalesPartnerOperatorId.Value.Equals(ChargeDetailRecord.SalesPartnerOperatorId.Value))) &&

                   ((!PartnerProductId.HasValue && !ChargeDetailRecord.PartnerProductId.HasValue) ||
                    (PartnerProductId.HasValue && ChargeDetailRecord.PartnerProductId.HasValue && PartnerProductId.Value.Equals(ChargeDetailRecord.PartnerProductId.Value))));
        }
示例#8
0
        /// <summary>
        /// Returns true if TimeIntervalRates instances are equal
        /// </summary>
        /// <param name="other">Instance of TimeIntervalRates to be compared</param>
        /// <returns>Boolean</returns>
        public bool Equals(TimeIntervalRates other)
        {
            if (other is null)
            {
                return(false);
            }
            if (ReferenceEquals(this, other))
            {
                return(true);
            }

            return
                ((
                     StartTime == other.StartTime ||
                     StartTime != null &&
                     StartTime.Equals(other.StartTime)
                     ) &&
                 (
                     EndTime == other.EndTime ||
                     EndTime != null &&
                     EndTime.Equals(other.EndTime)
                 ) &&
                 (
                     Rates == other.Rates ||
                     Rates != null &&
                     other.Rates != null &&
                     Rates.SequenceEqual(other.Rates)
                 ));
        }
示例#9
0
        /// <summary>
        /// Returns true if Thing instances are equal
        /// </summary>
        /// <param name="other">Instance of Thing to be compared</param>
        /// <returns>Boolean</returns>
        public bool Equals(ExportCsv other)
        {
            if (ReferenceEquals(null, other))
            {
                return(false);
            }
            if (ReferenceEquals(this, other))
            {
                return(true);
            }

            return
                ((
                     ObservationType == other.ObservationType ||
                     ObservationType != null &&
                     ObservationType.Equals(other.ObservationType)
                     ) &&
                 (
                     ThingId == other.ThingId ||
                     ThingId != null &&
                     ThingId.Equals(other.ThingId)
                 ) &&
                 (
                     EndTime == other.EndTime ||
                     EndTime != null &&
                     EndTime.Equals(other.EndTime)
                 ) &&
                 (
                     StartTime == other.StartTime ||
                     StartTime != null &&
                     StartTime.Equals(other.StartTime)
                 ));
        }
示例#10
0
        public override bool Equals(object o)
        {
            if (!(o is FileInfo))
            {
                return(false);
            }
            var v = o as FileInfo;

            if (!StartTime.Equals(v.StartTime))
            {
                return(false);
            }
            if (!EndTime.Equals(v.EndTime))
            {
                return(false);
            }
            if (!PrintState.Equals(v.PrintState))
            {
                return(false);
            }
            if (!JobId.Equals(v.JobId))
            {
                return(false);
            }
            if (!Name.Equals(v.Name))
            {
                return(false);
            }

            return(true);
        }
示例#11
0
 protected bool Equals(JobRunStatus other)
 {
     return(Id.Equals(other.Id) && string.Equals(Description, other.Description) && State == other.State &&
            StartTime.Equals(other.StartTime) && FinishTime.Equals(other.FinishTime) &&
            Equals(Result, other.Result) && string.Equals(CurrentMessage, other.CurrentMessage) &&
            CurrentMessageIndex == other.CurrentMessageIndex &&
            PreviousMessageIndex == other.PreviousMessageIndex && Equals(Messages, other.Messages));
 }
示例#12
0
 public int CompareTo(FrameElement other)
 {
     if (StartTime.Equals(other.StartTime))
     {
         return(Duration.CompareTo(other.Duration));
     }
     return(StartTime.CompareTo(other.StartTime));
 }
示例#13
0
        /// <summary>
        /// Returns true if PipelineStepImpl instances are equal
        /// </summary>
        /// <param name="other">Instance of PipelineStepImpl to be compared</param>
        /// <returns>Boolean</returns>
        public bool Equals(PipelineStepImpl other)
        {
            if (other is null)
            {
                return(false);
            }
            if (ReferenceEquals(this, other))
            {
                return(true);
            }

            return
                ((
                     Class == other.Class ||
                     Class != null &&
                     Class.Equals(other.Class)
                     ) &&
                 (
                     Links == other.Links ||
                     Links != null &&
                     Links.Equals(other.Links)
                 ) &&
                 (
                     DisplayName == other.DisplayName ||
                     DisplayName != null &&
                     DisplayName.Equals(other.DisplayName)
                 ) &&
                 (
                     DurationInMillis == other.DurationInMillis ||

                     DurationInMillis.Equals(other.DurationInMillis)
                 ) &&
                 (
                     Id == other.Id ||
                     Id != null &&
                     Id.Equals(other.Id)
                 ) &&
                 (
                     Input == other.Input ||
                     Input != null &&
                     Input.Equals(other.Input)
                 ) &&
                 (
                     Result == other.Result ||
                     Result != null &&
                     Result.Equals(other.Result)
                 ) &&
                 (
                     StartTime == other.StartTime ||
                     StartTime != null &&
                     StartTime.Equals(other.StartTime)
                 ) &&
                 (
                     State == other.State ||
                     State != null &&
                     State.Equals(other.State)
                 ));
        }
示例#14
0
        public override bool Equals(object obj)
        {
            if (!(obj is UsageData other))
            {
                return(false);
            }

            return(StartTime.Equals(other.StartTime) && EndTime.Equals(other.EndTime));
        }
示例#15
0
 public bool Equals(Period period)
 {
     if (MatchesDateOnly || period.MatchesDateOnly)
     {
         return(StartTime.Value.Date == period.StartTime.Value.Date &&
                (EndTime == null || period.EndTime == null || EndTime.Value.Date.Equals(period.EndTime.Value.Date)));
     }
     return(StartTime.Equals(period.StartTime) && (EndTime == null || period.EndTime == null || EndTime.Equals(period.EndTime)));
 }
示例#16
0
        public override bool Equals(object obj)
        {
            var a = obj as AlarmSampleId;

            if (a == null)
            {
                return(false);
            }
            return(StartTime.Equals(a.StartTime) && AlarmId.Equals(a.AlarmId));
        }
 public bool Equals(Slot b)
 {
     return
         (SubjectName == b.SubjectName &&
          Number == b.Number &&
          Type == b.Type &&
          Day.Equals(b.Day) &&
          StartTime.Equals(b.StartTime) &&
          EndTime.Equals(b.EndTime));
 }
示例#18
0
文件: CallTime.cs 项目: pw94/CallsCRM
        public override bool Equals(object obj)
        {
            var callTime = obj as CallTime;

            if (callTime == null)
            {
                return(false);
            }

            return(StartTime.Equals(callTime.StartTime) && EndTime.Equals(callTime.EndTime));
        }
示例#19
0
 public bool EqualsExceptNumberAndVenue(Slot b)
 {
     return
         (SubjectName == b.SubjectName &&
          Type == b.Type &&
          Day.Equals(b.Day) &&
          StartTime.Equals(b.StartTime) &&
          EndTime.Equals(b.EndTime) &&
          WeekNumber.Equals(b.WeekNumber)
         );
 }
示例#20
0
        /// <summary>
        /// Returns true if PipelineRunNode instances are equal
        /// </summary>
        /// <param name="other">Instance of PipelineRunNode to be compared</param>
        /// <returns>Boolean</returns>
        public bool Equals(PipelineRunNode other)
        {
            if (other is null)
            {
                return(false);
            }
            if (ReferenceEquals(this, other))
            {
                return(true);
            }

            return
                ((
                     Class == other.Class ||
                     Class != null &&
                     Class.Equals(other.Class)
                     ) &&
                 (
                     DisplayName == other.DisplayName ||
                     DisplayName != null &&
                     DisplayName.Equals(other.DisplayName)
                 ) &&
                 (
                     DurationInMillis == other.DurationInMillis ||

                     DurationInMillis.Equals(other.DurationInMillis)
                 ) &&
                 (
                     Edges == other.Edges ||
                     Edges != null &&
                     other.Edges != null &&
                     Edges.SequenceEqual(other.Edges)
                 ) &&
                 (
                     Id == other.Id ||
                     Id != null &&
                     Id.Equals(other.Id)
                 ) &&
                 (
                     Result == other.Result ||
                     Result != null &&
                     Result.Equals(other.Result)
                 ) &&
                 (
                     StartTime == other.StartTime ||
                     StartTime != null &&
                     StartTime.Equals(other.StartTime)
                 ) &&
                 (
                     State == other.State ||
                     State != null &&
                     State.Equals(other.State)
                 ));
        }
示例#21
0
        public virtual string ToOsbString()
        {
            string e      = EventType.ToShortString();
            string easing = ((int)Easing).ToString();
            string startT = Math.Round(StartTime).ToString(CultureInfo.InvariantCulture);
            string endT   = StartTime.Equals(EndTime)
                ? ""
                : Math.Round(EndTime).ToString(CultureInfo.InvariantCulture);

            return($"{e},{easing},{startT},{endT},{Script}");
        }
示例#22
0
 public bool Equals(UniEvent other)
 {
     if (ReferenceEquals(null, other))
     {
         return(false);
     }
     if (ReferenceEquals(this, other))
     {
         return(true);
     }
     return(StartTime.Equals(other.StartTime) && EndTime.Equals(other.EndTime) && EventType == other.EventType && Unit == other.Unit && EventLeader == other.EventLeader);
 }
示例#23
0
        /// <summary>
        /// Returns true if Delegation instances are equal
        /// </summary>
        /// <param name="other">Instance of Delegation to be compared</param>
        /// <returns>Boolean</returns>
        public bool Equals(Delegation other)
        {
            if (ReferenceEquals(null, other))
            {
                return(false);
            }
            if (ReferenceEquals(this, other))
            {
                return(true);
            }

            return
                ((
                     DelegationId == other.DelegationId ||
                     DelegationId != null &&
                     DelegationId.Equals(other.DelegationId)
                     ) &&
                 (
                     Status == other.Status ||
                     Status != null &&
                     Status.Equals(other.Status)
                 ) &&
                 (
                     VestsDelegated == other.VestsDelegated ||
                     VestsDelegated != null &&
                     VestsDelegated.Equals(other.VestsDelegated)
                 ) &&
                 (
                     SteemPowerDelegated == other.SteemPowerDelegated ||
                     SteemPowerDelegated != null &&
                     SteemPowerDelegated.Equals(other.SteemPowerDelegated)
                 ) &&
                 (
                     StartTime == other.StartTime ||
                     StartTime != null &&
                     StartTime.Equals(other.StartTime)
                 ) &&
                 (
                     EndTime == other.EndTime ||
                     EndTime != null &&
                     EndTime.Equals(other.EndTime)
                 ) &&
                 (
                     SteemAccount == other.SteemAccount ||
                     SteemAccount != null &&
                     SteemAccount.Equals(other.SteemAccount)
                 ) &&
                 (
                     LastModifiedTime == other.LastModifiedTime ||
                     LastModifiedTime != null &&
                     LastModifiedTime.Equals(other.LastModifiedTime)
                 ));
        }
示例#24
0
 public bool Equals(JobRunInfo other)
 {
     return
         (RunIndex == other.RunIndex &&
          StartReason == other.StartReason &&
          DueTime.Equals(other.DueTime) &&
          DueTimeWasOverridden == other.DueTimeWasOverridden &&
          StartTime.Equals(other.StartTime) &&
          Nullable.Equals(EndTime, other.EndTime) &&
          Status == other.Status &&
          Output == other.Output &&
          Equals(Exception, other.Exception));
 }
示例#25
0
 public bool Equals(Slot b)
 {
     return
         (SubjectName == b.SubjectName &&
          Code == b.Code &&
          Number == b.Number &&
          Type == b.Type &&
          Venue == b.Venue &&
          Day.Equals(b.Day) &&
          StartTime.Equals(b.StartTime) &&
          EndTime.Equals(b.EndTime) &&
          WeekNumber.Equals(b.WeekNumber));
 }
示例#26
0
        public bool Equals(Lesson other)
        {
            if (ReferenceEquals(null, other))
            {
                return(false);
            }

            if (ReferenceEquals(this, other))
            {
                return(true);
            }

            return(string.Equals(Name, other.Name) && StartTime.Equals(other.StartTime));
        }
示例#27
0
 public int CompareTo(Period other)
 {
     if (StartTime.Equals(other.StartTime))
     {
         return(0);
     }
     if (StartTime.LessThan(other.StartTime))
     {
         return(-1);
     }
     if (StartTime.GreaterThan(other.StartTime))
     {
         return(1);
     }
     throw new Exception("An error occurred while comparing two Periods.");
 }
示例#28
0
        public bool EqualsExceptGroups(TimetableEvent e)
        {
            if (!AcademicYear.Equals(e.AcademicYear))
            {
                return(false);
            }
            if (!Name.Equals(e.Name))
            {
                return(false);
            }
            if (!Type.Equals(e.Type))
            {
                return(false);
            }
            if (!IsFaculty.Equals(e.IsFaculty))
            {
                return(false);
            }
            if (!StartTime.Equals(e.StartTime))
            {
                return(false);
            }
            if (!EndTime.Equals(e.EndTime))
            {
                return(false);
            }
            if (!Building.Equals(e.Building))
            {
                return(false);
            }
            if (!Room.Equals(e.Room))
            {
                return(false);
            }
            HashSet <string> tmp  = new HashSet <string>(Lecturers);
            HashSet <string> tmp2 = new HashSet <string>(e.Lecturers);

            if (!tmp.SetEquals(tmp2))
            {
                return(false);
            }
            if (!Remarks.Equals(e.Remarks))
            {
                return(false);
            }
            return(true);
        }
示例#29
0
        /// <summary>
        /// Override of the equality method.
        /// </summary>
        /// <param name="o"></param>
        /// <returns></returns>
        public bool Equals(Weeks o)
        {
            //Check whether the compared object is null.
            if (ReferenceEquals(o, null))
            {
                return(false);
            }

            //Check whether the compared object references the same data.
            if (ReferenceEquals(this, o))
            {
                return(true);
            }

            //Check whether the Weeks' properties are equal.
            return(_id.Equals(o._id) && UserId.Equals(o.UserId) && StartTime.Equals(o.StartTime) && Tools.SequenceEqual(Days, o.Days));
        }
示例#30
0
        public override bool Equals(object obj)
        {
            var viewer = obj as VipViewer;

            if (viewer == null)
            {
                return(false);
            }

            if (viewer == this)
            {
                return(true);
            }

            return(Name == viewer.Name && Movie == viewer.Movie && StartTime.Equals(viewer.StartTime) &&
                   Rating == viewer.Rating);
        }