Exemplo n.º 1
0
 /// <summary>
 /// Compares two DataType instances for equivalence.
 /// </summary>
 /// <returns>True if the DataTypes are equivalent, false otherwise.</returns>
 /// <remarks>
 /// <para>
 /// Data type equivalence is looser than data type equality. So two data types
 /// are equivalent if they are equal, or, in the case of object types, if they
 /// have the same set of properties, by name and property type equivalence.
 /// </para>
 /// </remarks>
 public static bool Equivalent(DataType a, DataType b)
 {
     return a != null && b != null && a.EquivalentTo(b);
 }
Exemplo n.º 2
0
 public bool EquivalentTo(PropertyDef other)
 {
     return(other != null && _name == other.Name && _propertyType.EquivalentTo(other.PropertyType));
 }
Exemplo n.º 3
0
 /// <summary>
 /// Compares two DataType instances for equivalence.
 /// </summary>
 /// <returns>True if the DataTypes are equivalent, false otherwise.</returns>
 /// <remarks>
 /// <para>
 /// Data type equivalence is looser than data type equality. So two data types
 /// are equivalent if they are equal, or, in the case of object types, if they
 /// have the same set of properties, by name and property type equivalence.
 /// </para>
 /// </remarks>
 public static bool Equivalent(DataType a, DataType b)
 {
     return(a != null && b != null && a.EquivalentTo(b));
 }
Exemplo n.º 4
0
        public override bool EquivalentTo(DataType other)
        {
            var otherList = other as ListType;

            return(otherList != null && _elementType.EquivalentTo(otherList.ElementType));
        }