Example #1
0
        private static bool IsSubTypeOf(PrimitiveType subPrimitiveType, PrimitiveType superPrimitiveType)
        {
            if (object.ReferenceEquals(subPrimitiveType, superPrimitiveType))
            {
                return(true);
            }

            if (Helper.AreSameSpatialUnionType(subPrimitiveType, superPrimitiveType))
            {
                return(true);
            }

            objectModel.ReadOnlyCollection <PrimitiveType> superTypes = EdmProviderManifest.Instance.GetPromotionTypes(subPrimitiveType);

            return(-1 != superTypes.IndexOf(superPrimitiveType));
        }