Exemplo n.º 1
0
        public bool Equals(EcmaDesc other)
        {
            if (other == null)
            {
                return(false);
            }

            if (NestedType == null ^ other.NestedType == null ||
                ArrayDimensions == null ^ other.ArrayDimensions == null ||
                GenericTypeArguments == null ^ other.GenericTypeArguments == null ||
                GenericMemberArguments == null ^ other.GenericMemberArguments == null ||
                MemberArguments == null ^ other.MemberArguments == null ||
                ExplicitImplMember == null ^ other.ExplicitImplMember == null)
            {
                return(false);
            }

            return(other != null &&
                   DescKind == other.DescKind &&
                   TypeName == other.TypeName &&
                   Namespace == other.Namespace &&
                   MemberName == other.MemberName &&
                   (NestedType == null || NestedType.Equals(other.NestedType)) &&
                   (ArrayDimensions == null || ArrayDimensions.SequenceEqual(other.ArrayDimensions)) &&
                   (GenericTypeArguments == null || GenericTypeArguments.SequenceEqual(other.GenericTypeArguments)) &&
                   (GenericMemberArguments == null || GenericMemberArguments.SequenceEqual(other.GenericMemberArguments)) &&
                   (MemberArguments == null || MemberArguments.SequenceEqual(other.MemberArguments)) &&
                   Etc == other.Etc &&
                   EtcFilter == other.EtcFilter &&
                   (ExplicitImplMember == null || ExplicitImplMember.Equals(other.ExplicitImplMember)));
        }
Exemplo n.º 2
0
 public bool Equals(StructuredType other)
 {
     if (ReferenceEquals(null, other))
     {
         return(false);
     }
     if (ReferenceEquals(this, other))
     {
         return(true);
     }
     if (!Equals(Name, other.Name))
     {
         return(false);
     }
     if (!ArrayDimensions.SequenceEqual(other.ArrayDimensions))
     {
         return(false);
     }
     return(GenericArguments.SequenceEqual(other.GenericArguments));
 }