GetHashCode() public static method

public static GetHashCode ( ) : int
return int
Exemplo n.º 1
0
        public override int GetHashCode()
        {
            int hashCode = 0;

            unchecked {
                hashCode += 1000000007 * Scale1.GetHashCode();
                hashCode += 1000000009 * CameraHeight.GetHashCode();
                hashCode += 1000000021 * CameraAngle.GetHashCode();
                hashCode += 1000000033 * Background.GetHashCode();
                hashCode += 1000000087 * FogDistance.GetHashCode();
                hashCode += 1000000093 * MaxLightStrength.GetHashCode();
                hashCode += 1000000097 * Scale2.GetHashCode();
                hashCode += 1000000103 * ViewDistance.GetHashCode();
                if (Objects != null)
                {
                    hashCode += 1000000123 * Objects.GetHashCode();
                }
                if (Floors != null)
                {
                    hashCode += 1000000181 * Floors.GetHashCode();
                }
                if (ObjectInfos != null)
                {
                    hashCode += 1000000207 * ObjectInfos.GetHashCode();
                }
                if (Walls != null)
                {
                    hashCode += 1000000223 * Walls.GetHashCode();
                }
            }
            return(hashCode);
        }
Exemplo n.º 2
0
        public override int GetHashCode()
        {
            int hashCode = -2062011310;

            if (Context != null)
            {
                hashCode += Context.GetHashCode();
            }

            if (Errors != null)
            {
                hashCode += Errors.GetHashCode();
            }

            if (Objects != null)
            {
                hashCode += Objects.GetHashCode();
            }

            if (UpdatedAt != null)
            {
                hashCode += UpdatedAt.GetHashCode();
            }

            if (IdMappings != null)
            {
                hashCode += IdMappings.GetHashCode();
            }

            return(hashCode);
        }
Exemplo n.º 3
0
        public override int GetHashCode()
        {
            int hash = 1;

            if (Id != 0)
            {
                hash ^= Id.GetHashCode();
            }
            if (Score != 0)
            {
                hash ^= Score.GetHashCode();
            }
            if (RoadLength != 0)
            {
                hash ^= RoadLength.GetHashCode();
            }
            if (Objects.Length != 0)
            {
                hash ^= Objects.GetHashCode();
            }
            if (ToolClean != 0)
            {
                hash ^= ToolClean.GetHashCode();
            }
            if (ToolDouble != 0)
            {
                hash ^= ToolDouble.GetHashCode();
            }
            return(hash);
        }
        public override int GetHashCode()
        {
            int hashCode = 99974308;

            if (Context != null)
            {
                hashCode += Context.GetHashCode();
            }

            if (Errors != null)
            {
                hashCode += Errors.GetHashCode();
            }

            if (Objects != null)
            {
                hashCode += Objects.GetHashCode();
            }

            if (RelatedObjects != null)
            {
                hashCode += RelatedObjects.GetHashCode();
            }

            return(hashCode);
        }
Exemplo n.º 5
0
 private bool NonDeclaredYet(params object[] args)
 {
     lock (queuesDeclared)
     {
         long hashcode = Objects.GetHashCode(args);
         return(!queuesDeclared.Contains(hashcode) &&
                queuesDeclared.Add(hashcode));
     }
 }
Exemplo n.º 6
0
        public void GetHashCode_DifferentCases()
        {
            int code111 = Objects.GetHashCode(1, "Name1");
            int code112 = Objects.GetHashCode(1, "Name1");
            int code121 = Objects.GetHashCode(1, "Name2");
            int code211 = Objects.GetHashCode(2, "Name1");

            Assert.Equal(code111, code112);
            Assert.NotEqual(code111, code121);
            Assert.NotEqual(code111, code211);
        }
        public override int GetHashCode()
        {
            int hashCode = -544883463;

            if (Context != null)
            {
                hashCode += Context.GetHashCode();
            }

            if (Errors != null)
            {
                hashCode += Errors.GetHashCode();
            }

            if (Cursor != null)
            {
                hashCode += Cursor.GetHashCode();
            }

            if (Objects != null)
            {
                hashCode += Objects.GetHashCode();
            }

            if (RelatedObjects != null)
            {
                hashCode += RelatedObjects.GetHashCode();
            }

            if (LatestTime != null)
            {
                hashCode += LatestTime.GetHashCode();
            }

            return(hashCode);
        }
Exemplo n.º 8
0
 public override int GetHashCode()
 {
     return(Objects.GetHashCode(URI));
 }
 public override int GetHashCode()
 {
     return(Objects.GetHashCode(_requirementDescription));
 }
Exemplo n.º 10
0
 public bool EqualsId(ModelBase other)
 {
     return(other != null && this.GetType() == other.GetType() && Objects.GetHashCode(Id, Uuid) == Objects.GetHashCode(other.Id, other.Uuid));
 }
Exemplo n.º 11
0
 public override int GetHashCode()
 {
     return(Objects.GetHashCode(receiver));
 }