예제 #1
0
        internal static T GetFacetValue <T>(this TypeUsage type, string facetName)
        {
            DebugCheck.NotNull(type);

            return((T)type.Facets[facetName].Value);
        }
예제 #2
0
        internal static int GetMaxLength(this TypeUsage type)
        {
            DebugCheck.NotNull(type);

            return(type.GetFacetValue <int>(DbProviderManifest.MaxLengthFacetName));
        }
예제 #3
0
        internal static bool IsSpatialType(this TypeUsage type)
        {
            DebugCheck.NotNull(type);

            return(type.EdmType.BuiltInTypeKind == BuiltInTypeKind.PrimitiveType && ((PrimitiveType)type.EdmType).IsSpatialType());
        }
예제 #4
0
        internal static bool MustFacetBeConstant(this TypeUsage type, string facetName)
        {
            DebugCheck.NotNull(type);

            return(((PrimitiveType)type.EdmType).FacetDescriptions.Single(f => f.FacetName == facetName).IsConstant);
        }
예제 #5
0
        internal static byte GetScale(this TypeUsage type)
        {
            DebugCheck.NotNull(type);

            return(type.GetFacetValue <byte>(DbProviderManifest.ScaleFacetName));
        }
예제 #6
0
        internal static PrimitiveTypeKind GetPrimitiveTypeKind(this TypeUsage type)
        {
            DebugCheck.NotNull(type);

            return(((PrimitiveType)type.EdmType).PrimitiveTypeKind);
        }