예제 #1
0
 public override int GetHashCode()
 {
     unchecked
     {
         int result = (Matching != null ? Matching.GetHashCode() : 0);
         result = (result * 397) ^ (From != null ? From.GetHashCode() : 0);
         result = (result * 397) ^ (To != null ? To.GetHashCode() : 0);
         return(result);
     }
 }
예제 #2
0
        public override int GetHashCode()
        {
            unchecked
            {
                var hash = 17;

                hash = hash * 23 + Matching.GetHashCode();

                foreach (var type in types)
                {
                    if (type != null)
                    {
                        hash = hash * 23 + type.GetHashCode();
                    }
                }

                hash = hash * 23 + Value.GetHashCode();
                hash = hash * 23 + Reference.GetHashCode();
                hash = hash * 23 + Classes.GetHashCode();
                hash = hash * 23 + Interfaces.GetHashCode();
                hash = hash * 23 + Structs.GetHashCode();
                hash = hash * 23 + Enums.GetHashCode();
                hash = hash * 23 + Delegates.GetHashCode();
                hash = hash * 23 + Public.GetHashCode();
                hash = hash * 23 + NonPublic.GetHashCode();
                hash = hash * 23 + Abstract.GetHashCode();
                hash = hash * 23 + Generic.GetHashCode();
                hash = hash * 23 + OpenConstructedGeneric.GetHashCode();
                hash = hash * 23 + Static.GetHashCode();
                hash = hash * 23 + Sealed.GetHashCode();
                hash = hash * 23 + Nested.GetHashCode();
                hash = hash * 23 + Primitives.GetHashCode();
                hash = hash * 23 + Object.GetHashCode();
                hash = hash * 23 + NonSerializable.GetHashCode();
                hash = hash * 23 + Obsolete.GetHashCode();
                hash = hash * 23 + GenericParameterAttributeFlags.GetHashCode();

                return(hash);
            }
        }