Exemplo n.º 1
0
 public bool Equals(TypeName other)
 {
     if (other is null)
     {
         return(false);
     }
     if (ReferenceEquals(this, other))
     {
         return(true);
     }
     return(FullNamespace == other.FullNamespace && Name == other.Name &&
            TypeArguments.SequenceEqual(other.TypeArguments));
 }
Exemplo n.º 2
0
 public bool Equals(StructTypeSyntax other)
 {
     if (ReferenceEquals(null, other))
     {
         return(false);
     }
     if (ReferenceEquals(this, other))
     {
         return(true);
     }
     return(string.Equals(FullName, other.FullName) &&
            TypeArguments.SequenceEqual(other.TypeArguments));
 }
Exemplo n.º 3
0
        /// <summary>
        /// Determines whether this instance of <see cref="GenericTypeId"/> refers to the same type as <paramref name="other"/>.
        /// </summary>
        public bool Equals(GenericTypeInstanceId?other)
        {
            if (ReferenceEquals(this, other))
            {
                return(true);
            }

            if (other == null)
            {
                return(false);
            }

            return(base.Equals(other) &&
                   TypeArguments.SequenceEqual(other.TypeArguments));
        }