public override int GetHashCode() { unchecked { int hash = Type.GetHashCode() * 397; hash = hash ^ (IsTypeNullable?.GetHashCode() ?? 0 * 11); hash = hash ^ (IsElementTypeNullable?.GetHashCode() ?? 0 * 13); return(hash); } }
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); }
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)); }