Пример #1
0
        public override bool Equals(object obj)
        {
            if (base.Equals(obj))
            {
                return(true);
            }

            COMCLSIDEntry right = obj as COMCLSIDEntry;

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

            if (Elevation != null)
            {
                if (!Elevation.Equals(right.Elevation))
                {
                    return(false);
                }
            }
            else if (right.Elevation != null)
            {
                return(false);
            }

            // We don't consider the loaded interfaces.
            return(Clsid == right.Clsid && Name == right.Name && TreatAs == right.TreatAs && AppID == right.AppID &&
                   TypeLib == right.TypeLib && Servers.Values.SequenceEqual(right.Servers.Values) &&
                   ActivatableFromApp == right.ActivatableFromApp && TrustedMarshaller == right.TrustedMarshaller &&
                   Source == right.Source && PackageId == right.PackageId);
        }
Пример #2
0
        public override bool Equals(object obj)
        {
            if (base.Equals(obj))
            {
                return(true);
            }

            COMCLSIDEntry right = obj as COMCLSIDEntry;

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

            if (Elevation != null)
            {
                if (!Elevation.Equals(right.Elevation))
                {
                    return(false);
                }
            }
            else if (right.Elevation != null)
            {
                return(false);
            }

            // We don't consider the loaded interfaces.
            return(Clsid == right.Clsid && Name == right.Name && TreatAs == right.TreatAs && AppID == right.AppID &&
                   TypeLib == right.TypeLib && Servers.Values.SequenceEqual(right.Servers.Values));
        }
Пример #3
0
        public override bool Equals(object obj, SpatialEqualityOptions options)
        {
            var other = obj as Coordinate;

            if (ReferenceEquals(null, other))
            {
                return(false);
            }

            var other2 = other as CoordinateZM;

            if (ReferenceEquals(null, other2))
            {
                return(false);
            }

            if (options.UseElevation && !Elevation.Equals(other2.Elevation))
            {
                return(false);
            }

            if (options.UseM && !Measure.Equals(other2.Measure))
            {
                return(false);
            }

            if (Latitude.Equals(other.Latitude))
            {
                if (options.PoleCoordiantesAreEqual && Latitude.Equals(90d) || Latitude.Equals(-90d))
                {
                    return(true);
                }

                if (Longitude.Equals(other.Longitude))
                {
                    return(true);
                }

                if (options.AntiMeridianCoordinatesAreEqual)
                {
                    if (Longitude.Equals(180) && other.Longitude.Equals(-180) ||
                        Longitude.Equals(-180) && other.Longitude.Equals(180))
                    {
                        return(true);
                    }
                }
            }

            return(false);
        }
Пример #4
0
 public bool Equals(InstallationEntity other)
 {
     if (ReferenceEquals(null, other))
     {
         return(false);
     }
     if (ReferenceEquals(this, other))
     {
         return(true);
     }
     return(Id == other.Id &&
            ExternalId == other.ExternalId &&
            IsAirly == other.IsAirly &&
            Latitude.Equals(other.Latitude) &&
            Longitude.Equals(other.Longitude) &&
            Elevation.Equals(other.Elevation) &&
            Equals(Address, other.Address) &&
            Equals(Sponsor, other.Sponsor));
 }
Пример #5
0
        /// <summary>
        /// Returns true if GeoCoordinates instances are equal
        /// </summary>
        /// <param name="other">Instance of GeoCoordinates to be compared</param>
        /// <returns>Boolean</returns>
        public bool Equals(GeoCoordinates other)
        {
            if (ReferenceEquals(null, other))
            {
                return(false);
            }
            if (ReferenceEquals(this, other))
            {
                return(true);
            }

            return
                ((
                     Elevation == other.Elevation ||
                     Elevation != null &&
                     Elevation.Equals(other.Elevation)
                     ) &&
                 (
                     Latitude == other.Latitude ||
                     Latitude != null &&
                     Latitude.Equals(other.Latitude)
                 ) &&
                 (
                     Longitude == other.Longitude ||
                     Longitude != null &&
                     Longitude.Equals(other.Longitude)
                 ) &&
                 (
                     Type == other.Type ||
                     Type != null &&
                     Type.Equals(other.Type)
                 ) &&
                 (
                     Name == other.Name ||
                     Name != null &&
                     Name.Equals(other.Name)
                 ));
        }
Пример #6
0
 /// <inheritdoc />
 protected bool Equals(TopocentricObservation other)
 {
     return(Azimuth.Equals(other.Azimuth) && Elevation.Equals(other.Elevation) && Range.Equals(other.Range) &&
            RangeRate.Equals(other.RangeRate));
 }
Пример #7
0
 public bool Equals(Waypoint other)
 {
     return(Position.Equals(other.Position) && Elevation.Equals(other.Elevation) && Arrival == other.Arrival &&
            Departure == other.Departure && Action == other.Action && Formation == other.Formation &&
            Flags == other.Flags && Speed == other.Speed && Target == other.Target);
 }
Пример #8
0
 public bool Equals(Station other)
 {
     return(Identifier.Equals(other.Identifier) && string.Equals(Name, other.Name) && string.Equals(Country, other.Country) && string.Equals(FIPSCountryId, other.FIPSCountryId) && string.Equals(State, other.State) && string.Equals(CallSign, other.CallSign) && Latitude.Equals(other.Latitude) && Longitude.Equals(other.Longitude) && Elevation.Equals(other.Elevation) && Begin.Equals(other.Begin) && End.Equals(other.End));
 }