Пример #1
0
        /// <inheritdoc />
        public bool Equals([AllowNull] Rotation other)
        {
            if (other == null)
            {
                return(false);
            }
            if (ReferenceEquals(this, other))
            {
                return(true);
            }

            return
                ((
                     Lon == other.Lon ||
                     Lon != null &&
                     Lon.Equals(other.Lon)
                     ) &&
                 (
                     Lat == other.Lat ||
                     Lat != null &&
                     Lat.Equals(other.Lat)
                 ) &&
                 (
                     Roll == other.Roll ||
                     Roll != null &&
                     Roll.Equals(other.Roll)
                 ));
        }
Пример #2
0
        /// <summary>
        /// Returns true if Address instances are equal
        /// </summary>
        /// <param name="other">Instance of Address to be compared</param>
        /// <returns>Boolean</returns>
        public bool Equals(Location other)
        {
            // credit: http://stackoverflow.com/a/10454552/677735
            if (other == null)
            {
                return(false);
            }

            return
                ((
                     LocationId == other.LocationId ||
                     LocationId != null &&
                     LocationId.Equals(other.LocationId)
                     ) &&
                 (
                     Lon == other.Lon ||
                     Lon != null &&
                     Lon.Equals(other.Lon)
                 ) &&
                 (
                     Lat == other.Lat ||
                     Lat != null &&
                     Lat.Equals(other.Lat)
                 ));
        }
        /// <summary>
        /// Returns true if Address instances are equal
        /// </summary>
        /// <param name="input">Instance of Address to be compared</param>
        /// <returns>Boolean</returns>
        public bool Equals(Address input)
        {
            if (input == null)
            {
                return(false);
            }

            return
                ((
                     LocationId == input.LocationId ||
                     (LocationId != null &&
                      LocationId.Equals(input.LocationId))
                     ) &&
                 (
                     Name == input.Name ||
                     (Name != null &&
                      Name.Equals(input.Name))
                 ) &&
                 (
                     Lon == input.Lon ||
                     (Lon != null &&
                      Lon.Equals(input.Lon))
                 ) &&
                 (
                     Lat == input.Lat ||
                     (Lat != null &&
                      Lat.Equals(input.Lat))
                 ));
        }
Пример #4
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(FriendFinder other)
        {
            if (ReferenceEquals(null, other))
            {
                return(false);
            }
            if (ReferenceEquals(this, other))
            {
                return(true);
            }

            return
                ((
                     NickName == other.NickName ||
                     NickName != null &&
                     NickName.Equals(other.NickName)
                     ) &&
                 (
                     Lat == other.Lat ||
                     Lat != null &&
                     Lat.Equals(other.Lat)
                 ) &&
                 (
                     LastSeen == other.LastSeen ||
                     LastSeen != null &&
                     LastSeen.Equals(other.LastSeen)
                 ) &&
                 (
                     Lon == other.Lon ||
                     Lon != null &&
                     Lon.Equals(other.Lon)
                 ));
        }
        /// <summary>
        /// Returns true if ThingsWithObservation instances are equal
        /// </summary>
        /// <param name="other">Instance of ThingsWithObservation to be compared</param>
        /// <returns>Boolean</returns>
        public bool Equals(ThingsWithObservation other)
        {
            if (ReferenceEquals(null, other))
            {
                return(false);
            }
            if (ReferenceEquals(this, other))
            {
                return(true);
            }

            return
                ((
                     Id == other.Id ||
                     Id != null &&
                     Id.Equals(other.Id)
                     ) &&
                 (
                     Name == other.Name ||
                     Name != null &&
                     Name.Equals(other.Name)
                 ) &&
                 (
                     Description == other.Description ||
                     Description != null &&
                     Description.Equals(other.Description)
                 ) &&
                 (
                     ThingTemplate == other.ThingTemplate ||
                     ThingTemplate != null &&
                     ThingTemplate.Equals(other.ThingTemplate)
                 ) &&
                 (
                     Status == other.Status ||
                     Status != null &&
                     Status.Equals(other.Status)
                 ) &&
                 (
                     Lat == other.Lat ||
                     Lat != null &&
                     Lat.Equals(other.Lat)
                 ) &&
                 (
                     Lon == other.Lon ||
                     Lon != null &&
                     Lon.Equals(other.Lon)
                 ) &&
                 (
                     Ogcid == other.Ogcid ||
                     Ogcid != null &&
                     Ogcid.Equals(other.Ogcid)
                 ) &&
                 (
                     Observations == other.Observations ||
                     Observations != null &&
                     Observations.SequenceEqual(other.Observations)
                 ));
        }
        /// <summary>
        /// Returns true if PersonWithWearable instances are equal
        /// </summary>
        /// <param name="other">Instance of PersonWithWearable to be compared</param>
        /// <returns>Boolean</returns>
        public bool Equals(PersonWithWearable other)
        {
            if (ReferenceEquals(null, other))
            {
                return(false);
            }
            if (ReferenceEquals(this, other))
            {
                return(true);
            }

            return
                ((
                     PersonId == other.PersonId ||
                     PersonId != null &&
                     PersonId.Equals(other.PersonId)
                     ) &&
                 (
                     Name == other.Name ||
                     Name != null &&
                     Name.Equals(other.Name)
                 ) &&
                 (
                     Status == other.Status ||
                     Status != null &&
                     Status.Equals(other.Status)
                 ) &&
                 (
                     Role == other.Role ||
                     Role != null &&
                     Role.Equals(other.Role)
                 ) &&
                 (
                     RoleDescription == other.RoleDescription ||
                     RoleDescription != null &&
                     RoleDescription.Equals(other.RoleDescription)
                 ) &&
                 (
                     Lat == other.Lat ||
                     Lat != null &&
                     Lat.Equals(other.Lat)
                 ) &&
                 (
                     Lon == other.Lon ||
                     Lon != null &&
                     Lon.Equals(other.Lon)
                 ) &&
                 (
                     Timestamp == other.Timestamp ||
                     Timestamp != null &&
                     Timestamp.Equals(other.Timestamp)
                 ));
        }
Пример #7
0
        public bool Equals([AllowNull] Center other)
        {
            if (other == null)
            {
                return(false);
            }

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

            return((Lon == other.Lon && Lon != null && other.Lon != null && Lon.Equals(other.Lon)) && (Lat == other.Lat && Lat != null && other.Lat != null && Lat.Equals(other.Lat)));
        }
Пример #8
0
        /// <summary>
        /// Returns true if Event instances are equal
        /// </summary>
        /// <param name="other">Instance of Event to be compared</param>
        /// <returns>Boolean</returns>
        public bool Equals(Event other)
        {
            if (ReferenceEquals(null, other))
            {
                return(false);
            }
            if (ReferenceEquals(this, other))
            {
                return(true);
            }

            return
                ((
                     Name == other.Name ||
                     Name != null &&
                     Name.Equals(other.Name)
                     ) &&
                 (
                     City == other.City ||
                     City != null &&
                     City.Equals(other.City)
                 ) &&
                 (
                     Lat == other.Lat ||
                     Lat != null &&
                     Lat.Equals(other.Lat)
                 ) &&
                 (
                     Lon == other.Lon ||
                     Lon != null &&
                     Lon.Equals(other.Lon)
                 ) &&
                 (
                     Zoom == other.Zoom ||
                     Zoom != null &&
                     Zoom.Equals(other.Zoom)
                 ) &&
                 (
                     Start == other.Start ||
                     Start != null &&
                     Start.Equals(other.Start)
                 ) &&
                 (
                     End == other.End ||
                     End != null &&
                     End.Equals(other.End)
                 ));
        }
Пример #9
0
        /// <summary>
        /// Returns true if City instances are equal
        /// </summary>
        /// <param name="other">Instance of City to be compared</param>
        /// <returns>Boolean</returns>
        public bool Equals(City other)
        {
            if (ReferenceEquals(null, other))
            {
                return(false);
            }
            if (ReferenceEquals(this, other))
            {
                return(true);
            }

            return
                ((
                     Id == other.Id ||
                     Id != null &&
                     Id.Equals(other.Id)
                     ) &&
                 (
                     Name == other.Name ||
                     Name != null &&
                     Name.Equals(other.Name)
                 ) &&
                 (
                     Lat == other.Lat ||
                     Lat != null &&
                     Lat.Equals(other.Lat)
                 ) &&
                 (
                     Lon == other.Lon ||
                     Lon != null &&
                     Lon.Equals(other.Lon)
                 ) &&
                 (
                     Country == other.Country ||
                     Country != null &&
                     Country.Equals(other.Country)
                 ));
        }
Пример #10
0
 protected bool Equals(Node other)
 {
     return(Lat.Equals(other.Lat) && Lon.Equals(other.Lon));
 }