Esempio n. 1
0
        public bool Equals(ISyntaxTypeReference other)
        {
            if (other is null)
            {
                return(false);
            }

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

            return(Type.IsEqualTo(other.Type) &&
                   Context == other.Context &&
                   IsTypeNullable.Equals(other.IsTypeNullable) &&
                   IsElementTypeNullable.Equals(other.IsElementTypeNullable));
        }
        public bool Equals(ISchemaTypeReference other)
        {
            if (other is null)
            {
                return(false);
            }

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

            if (Type == other.Type ||
                (Type is IType a && other.Type is IType b && a.IsEqualTo(b)))
            {
                return(Context == other.Context &&
                       IsTypeNullable.Equals(other.IsTypeNullable) &&
                       IsElementTypeNullable.Equals(other.IsElementTypeNullable));
            }

            return(false);
        }
Esempio n. 3
0
        public bool Equals(IClrTypeReference other)
        {
            if (other is null)
            {
                return(false);
            }

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

            if (Context != other.Context &&
                Context != TypeContext.None &&
                other.Context != TypeContext.None)
            {
                return(false);
            }

            return(Type.Equals(other.Type) &&
                   IsTypeNullable.Equals(other.IsTypeNullable) &&
                   IsElementTypeNullable.Equals(other.IsElementTypeNullable));
        }