Пример #1
0
        public override bool Equals(object obj)
        {
            if (obj == null)
            {
                return(false);
            }

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

            return(obj is V1Employee other &&
                   ((Context == null && other.Context == null) || (Context?.Equals(other.Context) == true)) &&
                   ((Id == null && other.Id == null) || (Id?.Equals(other.Id) == true)) &&
                   ((FirstName == null && other.FirstName == null) || (FirstName?.Equals(other.FirstName) == true)) &&
                   ((LastName == null && other.LastName == null) || (LastName?.Equals(other.LastName) == true)) &&
                   ((RoleIds == null && other.RoleIds == null) || (RoleIds?.Equals(other.RoleIds) == true)) &&
                   ((AuthorizedLocationIds == null && other.AuthorizedLocationIds == null) || (AuthorizedLocationIds?.Equals(other.AuthorizedLocationIds) == true)) &&
                   ((Email == null && other.Email == null) || (Email?.Equals(other.Email) == true)) &&
                   ((Status == null && other.Status == null) || (Status?.Equals(other.Status) == true)) &&
                   ((ExternalId == null && other.ExternalId == null) || (ExternalId?.Equals(other.ExternalId) == true)) &&
                   ((CreatedAt == null && other.CreatedAt == null) || (CreatedAt?.Equals(other.CreatedAt) == true)) &&
                   ((UpdatedAt == null && other.UpdatedAt == null) || (UpdatedAt?.Equals(other.UpdatedAt) == true)));
        }
        /// <summary>
        /// Returns true if OgcDataStreamInfo instances are equal
        /// </summary>
        /// <param name="other">Instance of OgcDataStreamInfo to be compared</param>
        /// <returns>Boolean</returns>
        public bool Equals(OgcDataStreamInfo other)
        {
            if (ReferenceEquals(null, other))
            {
                return(false);
            }
            if (ReferenceEquals(this, other))
            {
                return(true);
            }

            return
                ((
                     DataStreamId == other.DataStreamId ||
                     DataStreamId != null &&
                     DataStreamId.Equals(other.DataStreamId)
                     ) &&
                 (
                     MqttTopic == other.MqttTopic ||
                     MqttTopic != null &&
                     MqttTopic.Equals(other.MqttTopic)
                 ) &&
                 (
                     MqttServer == other.MqttServer ||
                     MqttServer != null &&
                     MqttServer.Equals(other.MqttServer)
                 ) &&
                 (
                     ExternalId == other.ExternalId ||
                     ExternalId != null &&
                     ExternalId.Equals(other.ExternalId)
                 ) &&
                 (
                     Metadata == other.Metadata ||
                     Metadata != null &&
                     Metadata.Equals(other.Metadata)
                 ) &&
                 (
                     SensorType == other.SensorType ||
                     SensorType != null &&
                     SensorType.Equals(other.SensorType)
                 ) &&
                 (
                     UnitOfMeasurement == other.UnitOfMeasurement ||
                     UnitOfMeasurement != null &&
                     UnitOfMeasurement.Equals(other.UnitOfMeasurement)
                 ) &&
                 (
                     fixedLatitude == other.fixedLatitude ||
                     fixedLatitude != null &&
                     fixedLatitude.Equals(other.fixedLatitude)
                 ) && (
                     fixedLongitude == other.fixedLongitude ||
                     fixedLongitude != null &&
                     fixedLongitude.Equals(other.fixedLongitude)
                     ));
        }
Пример #3
0
        /// <summary>
        /// Returns true if Upload instances are equal
        /// </summary>
        /// <param name="other">Instance of Upload to be compared</param>
        /// <returns>Boolean</returns>
        public bool Equals(Upload other)
        {
            if (ReferenceEquals(null, other))
            {
                return(false);
            }
            if (ReferenceEquals(this, other))
            {
                return(true);
            }

            return
                ((
                     Id == other.Id ||
                     Id != null &&
                     Id.Equals(other.Id)
                     ) &&
                 (
                     IdStr == other.IdStr ||
                     IdStr != null &&
                     IdStr.Equals(other.IdStr)
                 ) &&
                 (
                     ExternalId == other.ExternalId ||
                     ExternalId != null &&
                     ExternalId.Equals(other.ExternalId)
                 ) &&
                 (
                     Error == other.Error ||
                     Error != null &&
                     Error.Equals(other.Error)
                 ) &&
                 (
                     Status == other.Status ||
                     Status != null &&
                     Status.Equals(other.Status)
                 ) &&
                 (
                     ActivityId == other.ActivityId ||
                     ActivityId != null &&
                     ActivityId.Equals(other.ActivityId)
                 ));
        }
Пример #4
0
 /// <summary>
 /// Equality method between two objects of the same type.
 /// Because the Equals method is strongly typed by generic constraints,
 /// it is not necessary to test for the correct object type.
 /// For safety we just want to match on business key value - in this case the fields
 /// that cannot be different between the two objects if they are supposedly equal.
 /// </summary>
 /// <param name="obj">The other object of this type that we are testing equality with</param>
 /// <returns></returns>
 public virtual bool Equals(DomainEntityBase <TIdType> obj)
 {
     if (obj != null)
     {
         // Transient objects are not considered as equal
         if (IsTransient() && obj.IsTransient())
         {
             return(false);
         }
         else
         {
             // For safe equality we need to match on business key equality.
             // Base domain entities are functionally equal if their key and metadata are equal.
             // Subclasses should extend to include their own enhanced equality checks, as required.
             return(Id.Equals(obj.Id) && Culture.Equals(obj.Culture) && ExternalId.Equals(obj.ExternalId) &&
                    IsActive.Equals(obj.IsActive) && IsDeleted.Equals(obj.IsDeleted));
         }
     }
     return(false);
 }
        public override bool Equals(object obj)
        {
            if (obj == null)
            {
                return(false);
            }

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

            return(obj is V1ListEmployeesRequest other &&
                   ((Order == null && other.Order == null) || (Order?.Equals(other.Order) == true)) &&
                   ((BeginUpdatedAt == null && other.BeginUpdatedAt == null) || (BeginUpdatedAt?.Equals(other.BeginUpdatedAt) == true)) &&
                   ((EndUpdatedAt == null && other.EndUpdatedAt == null) || (EndUpdatedAt?.Equals(other.EndUpdatedAt) == true)) &&
                   ((BeginCreatedAt == null && other.BeginCreatedAt == null) || (BeginCreatedAt?.Equals(other.BeginCreatedAt) == true)) &&
                   ((EndCreatedAt == null && other.EndCreatedAt == null) || (EndCreatedAt?.Equals(other.EndCreatedAt) == true)) &&
                   ((Status == null && other.Status == null) || (Status?.Equals(other.Status) == true)) &&
                   ((ExternalId == null && other.ExternalId == null) || (ExternalId?.Equals(other.ExternalId) == true)) &&
                   ((Limit == null && other.Limit == null) || (Limit?.Equals(other.Limit) == true)) &&
                   ((BatchToken == null && other.BatchToken == null) || (BatchToken?.Equals(other.BatchToken) == true)));
        }
Пример #6
0
        /// <summary>
        /// Returns true if SummaryActivity instances are equal
        /// </summary>
        /// <param name="other">Instance of SummaryActivity to be compared</param>
        /// <returns>Boolean</returns>
        public bool Equals(SummaryActivity other)
        {
            if (ReferenceEquals(null, other))
            {
                return(false);
            }
            if (ReferenceEquals(this, other))
            {
                return(true);
            }

            return
                ((
                     ExternalId == other.ExternalId ||
                     ExternalId != null &&
                     ExternalId.Equals(other.ExternalId)
                     ) &&
                 (
                     UploadId == other.UploadId ||
                     UploadId != null &&
                     UploadId.Equals(other.UploadId)
                 ) &&
                 (
                     Athlete == other.Athlete ||
                     Athlete != null &&
                     Athlete.Equals(other.Athlete)
                 ) &&
                 (
                     Name == other.Name ||
                     Name != null &&
                     Name.Equals(other.Name)
                 ) &&
                 (
                     Distance == other.Distance ||
                     Distance != null &&
                     Distance.Equals(other.Distance)
                 ) &&
                 (
                     MovingTime == other.MovingTime ||
                     MovingTime != null &&
                     MovingTime.Equals(other.MovingTime)
                 ) &&
                 (
                     ElapsedTime == other.ElapsedTime ||
                     ElapsedTime != null &&
                     ElapsedTime.Equals(other.ElapsedTime)
                 ) &&
                 (
                     TotalElevationGain == other.TotalElevationGain ||
                     TotalElevationGain != null &&
                     TotalElevationGain.Equals(other.TotalElevationGain)
                 ) &&
                 (
                     ElevHigh == other.ElevHigh ||
                     ElevHigh != null &&
                     ElevHigh.Equals(other.ElevHigh)
                 ) &&
                 (
                     ElevLow == other.ElevLow ||
                     ElevLow != null &&
                     ElevLow.Equals(other.ElevLow)
                 ) &&
                 (
                     Type == other.Type ||
                     Type != null &&
                     Type.Equals(other.Type)
                 ) &&
                 (
                     StartDate == other.StartDate ||
                     StartDate != null &&
                     StartDate.Equals(other.StartDate)
                 ) &&
                 (
                     StartDateLocal == other.StartDateLocal ||
                     StartDateLocal != null &&
                     StartDateLocal.Equals(other.StartDateLocal)
                 ) &&
                 (
                     Timezone == other.Timezone ||
                     Timezone != null &&
                     Timezone.Equals(other.Timezone)
                 ) &&
                 (
                     StartLatlng == other.StartLatlng ||
                     StartLatlng != null &&
                     StartLatlng.Equals(other.StartLatlng)
                 ) &&
                 (
                     EndLatlng == other.EndLatlng ||
                     EndLatlng != null &&
                     EndLatlng.Equals(other.EndLatlng)
                 ) &&
                 (
                     AchievementCount == other.AchievementCount ||
                     AchievementCount != null &&
                     AchievementCount.Equals(other.AchievementCount)
                 ) &&
                 (
                     KudosCount == other.KudosCount ||
                     KudosCount != null &&
                     KudosCount.Equals(other.KudosCount)
                 ) &&
                 (
                     CommentCount == other.CommentCount ||
                     CommentCount != null &&
                     CommentCount.Equals(other.CommentCount)
                 ) &&
                 (
                     AthleteCount == other.AthleteCount ||
                     AthleteCount != null &&
                     AthleteCount.Equals(other.AthleteCount)
                 ) &&
                 (
                     PhotoCount == other.PhotoCount ||
                     PhotoCount != null &&
                     PhotoCount.Equals(other.PhotoCount)
                 ) &&
                 (
                     TotalPhotoCount == other.TotalPhotoCount ||
                     TotalPhotoCount != null &&
                     TotalPhotoCount.Equals(other.TotalPhotoCount)
                 ) &&
                 (
                     Map == other.Map ||
                     Map != null &&
                     Map.Equals(other.Map)
                 ) &&
                 (
                     Trainer == other.Trainer ||
                     Trainer != null &&
                     Trainer.Equals(other.Trainer)
                 ) &&
                 (
                     Commute == other.Commute ||
                     Commute != null &&
                     Commute.Equals(other.Commute)
                 ) &&
                 (
                     Manual == other.Manual ||
                     Manual != null &&
                     Manual.Equals(other.Manual)
                 ) &&
                 (
                     _Private == other._Private ||
                     _Private != null &&
                     _Private.Equals(other._Private)
                 ) &&
                 (
                     Flagged == other.Flagged ||
                     Flagged != null &&
                     Flagged.Equals(other.Flagged)
                 ) &&
                 (
                     WorkoutType == other.WorkoutType ||
                     WorkoutType != null &&
                     WorkoutType.Equals(other.WorkoutType)
                 ) &&
                 (
                     UploadIdStr == other.UploadIdStr ||
                     UploadIdStr != null &&
                     UploadIdStr.Equals(other.UploadIdStr)
                 ) &&
                 (
                     AverageSpeed == other.AverageSpeed ||
                     AverageSpeed != null &&
                     AverageSpeed.Equals(other.AverageSpeed)
                 ) &&
                 (
                     MaxSpeed == other.MaxSpeed ||
                     MaxSpeed != null &&
                     MaxSpeed.Equals(other.MaxSpeed)
                 ) &&
                 (
                     HasKudoed == other.HasKudoed ||
                     HasKudoed != null &&
                     HasKudoed.Equals(other.HasKudoed)
                 ) &&
                 (
                     HideFromHome == other.HideFromHome ||
                     HideFromHome != null &&
                     HideFromHome.Equals(other.HideFromHome)
                 ) &&
                 (
                     GearId == other.GearId ||
                     GearId != null &&
                     GearId.Equals(other.GearId)
                 ) &&
                 (
                     Kilojoules == other.Kilojoules ||
                     Kilojoules != null &&
                     Kilojoules.Equals(other.Kilojoules)
                 ) &&
                 (
                     AverageWatts == other.AverageWatts ||
                     AverageWatts != null &&
                     AverageWatts.Equals(other.AverageWatts)
                 ) &&
                 (
                     DeviceWatts == other.DeviceWatts ||
                     DeviceWatts != null &&
                     DeviceWatts.Equals(other.DeviceWatts)
                 ) &&
                 (
                     MaxWatts == other.MaxWatts ||
                     MaxWatts != null &&
                     MaxWatts.Equals(other.MaxWatts)
                 ) &&
                 (
                     WeightedAverageWatts == other.WeightedAverageWatts ||
                     WeightedAverageWatts != null &&
                     WeightedAverageWatts.Equals(other.WeightedAverageWatts)
                 ));
        }
Пример #7
0
 public bool Equals(BicicletaEstacionTable other)
 {
     return(Nombre.Equals(other.Nombre) || ExternalId.Equals(other.ExternalId));
 }
Пример #8
0
        public override bool Equals(object ob)
        {
            if (ob == this)
            {
                return(true);
            }
            if (!(ob is DTDEntity))
            {
                return(false);
            }

            DTDEntity other = (DTDEntity)ob;

            if (Name == null)
            {
                if (other.Name != null)
                {
                    return(false);
                }
            }
            else
            {
                if (!Name.Equals(other.Name))
                {
                    return(false);
                }
            }

            if (IsParsed != other.IsParsed)
            {
                return(false);
            }


            if (Value == null)
            {
                if (other.Value != null)
                {
                    return(false);
                }
            }
            else
            {
                if (!Value.Equals(other.Value))
                {
                    return(false);
                }
            }

            if (ExternalId == null)
            {
                if (other.ExternalId != null)
                {
                    return(false);
                }
            }
            else
            {
                if (!ExternalId.Equals(other.ExternalId))
                {
                    return(false);
                }
            }

            if (Ndata == null)
            {
                if (other.Ndata != null)
                {
                    return(false);
                }
            }
            else
            {
                if (!Ndata.Equals(other.Ndata))
                {
                    return(false);
                }
            }

            return(true);
        }