Exemple #1
0
 public override int GetHashCode()
 {
     unchecked {
         var hashCode = Extent.GetHashCode();
         hashCode = (hashCode * 397) ^ StartLinePosition.GetHashCode();
         hashCode = (hashCode * 397) ^ EndLinePosition.GetHashCode();
         hashCode = (hashCode * 397) ^ (NormalizedFilePath?.GetHashCode() ?? 0);
         return(hashCode);
     }
 }
Exemple #2
0
        public bool Equals(Location other)
        {
            if (ReferenceEquals(null, other))
            {
                return(false);
            }

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

            return(Extent.Equals(other.Extent) &&
                   StartLinePosition.Equals(other.StartLinePosition) &&
                   EndLinePosition.Equals(other.EndLinePosition) &&
                   string.Equals(NormalizedFilePath, other.NormalizedFilePath));
        }