Ejemplo n.º 1
0
 /// <summary>
 /// Equals
 /// </summary>
 /// <param name="item">Other item</param>
 /// <returns>Result</returns>
 public bool Equals(ScriptReferenceMeta item)
 {
     if (item == null)
     {
         return(false);
     }
     return(Src.Equals(item.Src) && DebugSrc.Equals(item.DebugSrc));
 }
Ejemplo n.º 2
0
        /// <summary>
        /// Determines value equality.
        /// </summary>
        /// <param name="other">The other object to compare against.</param>
        /// <returns>True if the objects are equal.</returns>
        protected virtual bool IsEqual(DefaultPath <V, E> other)
        {
            bool result = Src.Equals(other.Src) &&
                          Dst.Equals(other.Dst) &&
                          edges.SequenceEqual(other.edges) &&
                          // TODO: This is clunky, is there a better way?
                          (other.Cost?.Equals(Cost) ?? Cost is null);

            return(result);
        }
Ejemplo n.º 3
0
 /// <summary>
 /// Determines value equality.
 /// </summary>
 /// <param name="other">The other object to compare against.</param>
 /// <returns>True if the objects are equal.</returns>
 /// TODO: Should this be virtual?
 protected virtual bool IsEqual(AbstractEdge<V> other) => Src.Equals(other.Src) && Dst.Equals(other.Dst);
Ejemplo n.º 4
0
 private void ChangeUrl()
 {
     Src = Src.Equals(one) ? two : one;
 }
Ejemplo n.º 5
0
 protected bool Equals(MoveAction other)
 {
     return(Src.Equals(other.Src) && Dst.Equals(other.Dst));
 }