Ejemplo n.º 1
0
 public override int GetHashCode()
 {
     unchecked
     {
         return(((EdgeKey != null ? EdgeKey.GetHashCode() : 0) * 397) ^ (TargetVertexKey != null ? TargetVertexKey.GetHashCode() : 0));
     }
 }
Ejemplo n.º 2
0
        public void TestEdgeKey()
        {
            EdgeKey first  = new EdgeKey("x", "y");
            EdgeKey second = new EdgeKey("x", "y");

            Assert.AreEqual(first, second);
            Assert.AreEqual(first.GetHashCode(), second.GetHashCode());
        }
Ejemplo n.º 3
0
 private void AddHashCodeFromSingleEdge(ref int myHashCode, EdgeKey aEdge)
 {
     myHashCode += (int)(aEdge.GetHashCode() >> 32);
 }
Ejemplo n.º 4
0
 private void AddHashCodeFromSingleEdge(ref int myHashCode, EdgeKey aEdge)
 {
     myHashCode += (int)(aEdge.GetHashCode() >> 32);
 }
Ejemplo n.º 5
0
 public override int GetHashCode()
 {
     return(_destination.GetHashCode() ^ _direction.GetHashCode());
 }