コード例 #1
0
 public override bool Equals(object obj)
 {
     return(obj is Route route &&
            Airline.Equals(route.Airline) &&
            Origin.Equals(route.Origin) &&
            Destination.Equals(route.Destination));
 }
コード例 #2
0
ファイル: Ray.cs プロジェクト: irtheman/Ray-Tracer-Challenge
        public override bool Equals(object obj)
        {
            var other = obj as Ray;

            return((other != null) &&
                   Origin.Equals(other.Origin) &&
                   Direction.Equals(other.Direction));
        }
コード例 #3
0
        public bool Equals(Application input)
        {
            if (input == null)
            {
                return(false);
            }

            return
                ((
                     ApplicationId == input.ApplicationId ||
                     (ApplicationId.Equals(input.ApplicationId))
                     ) &&
                 (
                     Name == input.Name ||
                     (Name != null && Name.Equals(input.Name))
                 ) &&
                 (
                     RedirectUrl == input.RedirectUrl ||
                     (RedirectUrl != null && RedirectUrl.Equals(input.RedirectUrl))
                 ) &&
                 (
                     Link == input.Link ||
                     (Link != null && Link.Equals(input.Link))
                 ) &&
                 (
                     Scope == input.Scope ||
                     (Scope.Equals(input.Scope))
                 ) &&
                 (
                     Origin == input.Origin ||
                     (Origin != null && Origin.Equals(input.Origin))
                 ) &&
                 (
                     Status == input.Status ||
                     (Status != null && Status.Equals(input.Status))
                 ) &&
                 (
                     CreationDate == input.CreationDate ||
                     (CreationDate != null && CreationDate.Equals(input.CreationDate))
                 ) &&
                 (
                     StatusChanged == input.StatusChanged ||
                     (StatusChanged != null && StatusChanged.Equals(input.StatusChanged))
                 ) &&
                 (
                     FirstPublished == input.FirstPublished ||
                     (FirstPublished != null && FirstPublished.Equals(input.FirstPublished))
                 ) &&
                 (
                     Team == input.Team ||
                     (Team != null && Team.SequenceEqual(input.Team))
                 ) &&
                 (
                     OverrideAuthorizeViewName == input.OverrideAuthorizeViewName ||
                     (OverrideAuthorizeViewName != null && OverrideAuthorizeViewName.Equals(input.OverrideAuthorizeViewName))
                 ));
        }
コード例 #4
0
 ///<summary>
 /// Tests if this quadedge and another have the same line segment geometry
 /// with the same orientation.
 ///</summary>
 ///<param name="qe">a quadege</param>
 ///<returns>true if the quadedges are based on the same line segment</returns>
 public Boolean EqualsOriented(QuadEdge qe)
 {
     if (Origin.Equals(qe.Origin) &&
         Destination.Equals(qe.Destination))
     {
         return(true);
     }
     return(false);
 }
コード例 #5
0
        /// <summary>
        ///
        /// </summary>
        /// <param name="obj"></param>
        /// <returns></returns>
        protected override bool Equals(DesignScriptEntity obj)
        {
            var pln = obj as Plane;

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

            return(Origin.Equals(pln.Origin) && Normal.Equals(pln.Normal));
        }
コード例 #6
0
ファイル: Flight.cs プロジェクト: AlishaPrasad/Flights
 public bool Equals(Flight other)
 {
     if (other != null)
     {
         return(Origin.Equals(other.Origin) &&
                Destination.Equals(other.Destination) &&
                DepartureTime.Equals(other.DepartureTime) &&
                DestinationTime.Equals(other.DestinationTime) &&
                Price.Equals(other.Price));
     }
     return(false);
 }
コード例 #7
0
        public override bool Equals(Object obj)
        {
            if (obj.GetType() != typeof(FlightDetails))
            {
                return(false);
            }
            FlightDetails fd = (obj as FlightDetails);

            return(Origin.Equals(fd.Origin) &&
                   Destination.Equals(fd.Destination) &&
                   Price == fd.Price &&
                   DepartureTime.Equals(fd.DepartureTime) &&
                   DestinationTime.Equals(fd.DestinationTime));
        }
コード例 #8
0
        public override bool Equals(object obj)
        {
            var toCompareWith = obj as DummyProductRecipe;

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

            return(toCompareWith.Name == Name && toCompareWith.Revision == Revision &&
                   toCompareWith.State == State && toCompareWith.Classification == Classification &&
                   ((toCompareWith.Origin is null && Origin is null) || Origin.Equals(toCompareWith.Origin)) &&
                   ((toCompareWith.Product is null && Product is null) || Product.Equals(toCompareWith.Product)) &&
                   ((toCompareWith.Target is null && Target is null) || Target.Equals(toCompareWith.Target)));
        }
コード例 #9
0
        public bool Equals(Route other)
        {
            if (other == null)
            {
                return(false);
            }

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

            return(Origin.Equals(other.Origin) &&
                   Destination.Equals(other.Destination));
        }
コード例 #10
0
        /// <summary>
        /// Returns a boolean indicating whether the given Plane is equal to this Plane instance.<br/>
        /// The plane are equals if they have same origin and axises.
        /// </summary>
        /// <param name="other">The Plane to compare this instance to.</param>
        /// <returns>True if the other Plane is equal to this instance; False otherwise.</returns>
        public bool Equals(Plane other)
        {
            if (ReferenceEquals(null, other))
            {
                return(false);
            }

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

            return(Origin.Equals(other.Origin) &&
                   XAxis.Equals(other.XAxis) &&
                   YAxis.Equals(other.YAxis) &&
                   ZAxis.Equals(other.ZAxis));
        }
コード例 #11
0
        public override bool Equals(object obj)
        {
            if (obj is null)
            {
                return(false);
            }

            var compareTo = obj is Route ? (Route)obj : default;

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

            return(Origin.Equals(compareTo.Origin) &&
                   Destination.Equals(compareTo.Destination) &&
                   Price.Equals(compareTo.Price));
        }
コード例 #12
0
        public override bool Equals(object obj)
        {
            var other = obj as ColumnRelations;

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

            if (!Origin.Equals(other.Origin, StringComparison.OrdinalIgnoreCase))
            {
                return(false);
            }
            if (!Destiny.Equals(other.Destiny, StringComparison.OrdinalIgnoreCase))
            {
                return(false);
            }

            return(true);
        }
コード例 #13
0
ファイル: Error.cs プロジェクト: fabsenet/EESSI-AS4.NET
        /// <summary>
        /// Indicates whether the current object is equal to another object of the same type.
        /// </summary>
        /// <param name="other">An object to compare with this object.</param>
        /// <returns>true if the current object is equal to the <paramref name="other" /> parameter; otherwise, false.</returns>
        public bool Equals(ErrorLine other)
        {
            if (other is null)
            {
                return(false);
            }

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

            return(ErrorCode == other.ErrorCode &&
                   Severity == other.Severity &&
                   Origin.Equals(other.Origin) &&
                   Category.Equals(other.Category) &&
                   RefToMessageInError.Equals(other.RefToMessageInError) &&
                   ShortDescription == other.ShortDescription &&
                   Description.Equals(other.Description) &&
                   Detail.Equals(other.Detail));
        }
コード例 #14
0
        // used for both the "best path" and the final path
        private IList <T> BuildPath(T node)
        {
            if (Origin.Equals(node))
            {
                return(new T[0]);
            }

            // iterate from the 'node' back to the origin.
            // add them from the back to the front, so the
            // returned path starts at the origin.

            var cMeta     = GetMeta(node, true);
            var path      = new T[cMeta.PathLength];
            var pathIndex = cMeta.PathLength - 1;

            do
            {
                path[pathIndex--] = cMeta !.Node;
                Debug.Assert(cMeta.Parent != null, "cMeta.Parent should not be null while building path");
                Debug.Assert(!cMeta.Node.Equals(Origin));
                cMeta = cMeta.Parent;
            } while (pathIndex >= 0);
            return(path);
        }
コード例 #15
0
 protected bool Equals(Volume2D <T> other)
 {
     return(DimX == other.DimX && DimY == other.DimY && DimXY == other.DimXY && SpacingX.Equals(other.SpacingX) && SpacingY.Equals(other.SpacingY) && Origin.Equals(other.Origin) && Equals(Direction, other.Direction) && Equals(PixelToPhysicalMatrix, other.PixelToPhysicalMatrix) && Equals(PhysicalToPixelMatrix, other.PhysicalToPixelMatrix));
 }
コード例 #16
0
ファイル: Ray.cs プロジェクト: AlyCrunch/RayTracerChallenge
 public override bool Equals(object obj)
 {
     return(obj is Ray ray &&
            Origin.Equals(ray.Origin) &&
            Direction.Equals(ray.Direction));
 }
コード例 #17
0
 public bool Equals(Nuid other)
 {
     return(Origin.Equals(other.Origin) && Unique.Equals(other.Unique));
 }
コード例 #18
0
ファイル: Track.cs プロジェクト: ruckbeard/Trains
 public bool IsAConnectionBetween(City origin, City destination)
 {
     return(Origin.Equals(origin) && Destination.Equals(destination));
 }
コード例 #19
0
 protected bool Equals(Inertial other)
 {
     return(Origin.Equals(other.Origin) && Mass.Equals(other.Mass) && Inertia.Equals(other.Inertia));
 }
コード例 #20
0
 protected override bool ThisEquals(EarleyItem other)
 {
     return(DottedRule.Equals(other.DottedRule) && Origin.Equals(other.Origin));
 }
コード例 #21
0
 protected bool Equals(Collision other)
 {
     return(Origin.Equals(other.Origin) && Geometry.Equals(other.Geometry));
 }
コード例 #22
0
 public bool Equals(Route obj) => Origin.Equals(obj.Origin) && Target.Equals(obj.Target);
コード例 #23
0
 protected bool Equals(ConnectionEdge other)
 {
     return(Next.Origin.Equals(other.Next.Origin) && Origin.Equals(other.Origin));
 }
コード例 #24
0
ファイル: Move.cs プロジェクト: vfridell/AmazonsGameLib
 public bool Equals(Move other) => Origin.Equals(other.Origin) && AmazonsPoint.Equals(other.AmazonsPoint) && ArrowPoint.Equals(other.ArrowPoint);
コード例 #25
0
 public bool Equals(TradeRoute rhs)
 {
     return(Origin.Equals(rhs.Origin) && Destination.Equals(rhs.Destination));
 }
コード例 #26
0
 public bool Equals(NumberMovedEvent other)
 => Number == other.Number &&
 Origin.Equals(other.Origin) &&
 Target.Equals(other.Target);
コード例 #27
0
 /// <summary>
 /// Checks for equality among <see cref="Ray"/> classes
 /// </summary>
 /// <param name="other">The other <see cref="Ray"/> to compare it to</param>
 /// <returns>True if equal</returns>
 public bool Equals(Ray other) => Origin.Equals(other.Origin) && Direction.Equals(other.Direction);
コード例 #28
0
 //
 // Summary:
 //     Determines if another plane has the same components as this plane.
 //
 // Parameters:
 //   plane:
 //     A plane.
 //
 // Returns:
 //     true if plane has the same components as this plane; false otherwise.
 public bool Equals(Plane3D plane)
 {
     return(Origin.Equals(plane.Origin) && XAxis.Equals(plane.XAxis) && YAxis.Equals(plane.YAxis) && ZAxis.Equals(plane.ZAxis));
 }
コード例 #29
0
 internal bool ArePointsChanged(Point origin, Point destination)
 {
     return(Origin.Equals(origin) is false || Destination.Equals(destination) is false);
 }
コード例 #30
0
 public bool Equals(Ray other)
 {
     return(Origin.Equals(other.Origin) &&
            Direction.Equals(other.Direction));
 }