示例#1
0
        public override bool Equals(object obj)
        {
            if (ReferenceEquals(this, obj))
            {
                return(true);
            }

            if (ReferenceEquals(obj, null))
            {
                return(false);
            }

            AliasSymbol other = obj as AliasSymbol;

            return((object)other != null &&
                   Equals(this.Locations.FirstOrDefault(), other.Locations.FirstOrDefault()) &&
                   this.ContainingAssembly == other.ContainingAssembly);
        }
示例#2
0
        public override bool Equals(object obj)
        {
            if (ReferenceEquals(this, obj))
            {
                return(true);
            }

            if (ReferenceEquals(obj, null))
            {
                return(false);
            }

            AliasSymbol other = obj as AliasSymbol;

            return((object)other != null &&
                   Equals(this.Locations.FirstOrDefault(), other.Locations.FirstOrDefault()) &&
                   this.DeclaringCompilation == other.DeclaringCompilation);
        }