/// <summary> /// Compares two DataType instances for equality. /// </summary> /// <returns>True if the DataTypes are equal, false otherwise.</returns> /// <remarks> /// <para> /// Data type equality is based on the notion of names, not instances, meaning /// that two different instances of the ScalarType named Boolean will be considered /// equal. /// </para> /// <para> /// Two scalar types are equal if they have the same name. /// </para> /// <para> /// Two list types are equal if their element types are equal. /// </para> /// <para> /// Two interval types are equal if their point types are equal. /// </para> /// <para> /// Two object types are equal if they have the same name. /// </para> /// </remarks> public static bool Equal(DataType a, DataType b) { return a != null && b != null && a.Equals(b); }
public override bool Equals(object obj) { var other = obj as PropertyDef; return(other != null && _name == other.Name && _propertyType.Equals(other.PropertyType)); }
/// <summary> /// Compares two DataType instances for equality. /// </summary> /// <returns>True if the DataTypes are equal, false otherwise.</returns> /// <remarks> /// <para> /// Data type equality is based on the notion of names, not instances, meaning /// that two different instances of the ScalarType named Boolean will be considered /// equal. /// </para> /// <para> /// Two scalar types are equal if they have the same name. /// </para> /// <para> /// Two list types are equal if their element types are equal. /// </para> /// <para> /// Two interval types are equal if their point types are equal. /// </para> /// <para> /// Two object types are equal if they have the same name. /// </para> /// </remarks> public static bool Equal(DataType a, DataType b) { return(a != null && b != null && a.Equals(b)); }
public override bool Equals(object obj) { var other = obj as ListType; return(other != null && _elementType.Equals(other.ElementType)); }