internal static bool IsSuperTypeOf(EdmType superType, EdmType subType)
 {
     for (EdmType edmType = subType; edmType != null; edmType = edmType.BaseType)
     {
         if (edmType.Equals((object)superType))
         {
             return(true);
         }
     }
     return(false);
 }
Example #2
0
        // effects: Returns true iff superType is an ancestor of subType in
        // the type hierarchy or superType and subType are the same
        internal static bool IsSuperTypeOf(EdmType superType, EdmType subType)
        {
            EdmType currentType = subType;

            while (currentType != null)
            {
                if (currentType.Equals(superType))
                {
                    return(true);
                }
                currentType = currentType.BaseType;
            }
            return(false);
        }