Beispiel #1
0
        private bool Equals(GenericArgument other)
        {
            if (ReferenceEquals(null, other))
            {
                return(false);
            }

            if (ReferenceEquals(this, other))
            {
                return(true);
            }

            return(Equals(Type, other.Type) && GenericArguments.SequenceEqual(other.GenericArguments));
        }
        private bool Equals(TypeInstance <T> other)
        {
            if (ReferenceEquals(null, other))
            {
                return(false);
            }

            if (ReferenceEquals(this, other))
            {
                return(true);
            }

            return(Equals(Type, other.Type) && GenericArguments.SequenceEqual(other.GenericArguments) &&
                   Equals(IsArray, other.IsArray) && ArrayDimensions.SequenceEqual(other.ArrayDimensions));
        }
Beispiel #3
0
 /// <summary>
 /// Returns whether the generic arguments for this type and a given type match.
 /// </summary>
 /// <param name="t">Specifier for the type to check.</param>
 /// <returns>Whether the generic arguments for the types match.</returns>
 public bool GenericArgumentsEqual(TypeSpecifier t)
 {
     return(GenericArguments.SequenceEqual(t.GenericArguments));
 }