Пример #1
0
        public bool HasChangedSince(LocationState state)
        {
            if (state == null)
            {
                return(false);
            }

            if (!SimpleComparer.Equals(StarSystem, state.StarSystem))
            {
                return(true);
            }
            if (!SimpleComparer.Equals(Body, state.Body))
            {
                return(true);
            }
            if (!SimpleComparer.Equals(SurfaceLocation, state.SurfaceLocation))
            {
                return(true);
            }
            if (!SimpleComparer.Equals(Station, state.Station))
            {
                return(true);
            }
            if (!SimpleComparer.Equals(SignalSource, state.SignalSource))
            {
                return(true);
            }

            return(false);
        }
Пример #2
0
        public bool Equals(SignalSource other)
        {
            if (other == null)
            {
                return(false);
            }

            if (!SimpleComparer.Equals(Type, other.Type))
            {
                return(false);
            }
            if (Threat != other.Threat)
            {
                return(false);
            }

            return(true);
        }
Пример #3
0
        public bool Equals(StarSystem other)
        {
            if (other == null)
            {
                return(false);
            }

            if (!string.Equals(Name, other.Name))
            {
                return(false);
            }
            if (!SimpleComparer.SequenceEquals(Coords, other.Coords))
            {
                return(false);
            }

            return(true);
        }