internal static T GetFacetValue <T>(this TypeUsage type, string facetName) { DebugCheck.NotNull(type); return((T)type.Facets[facetName].Value); }
internal static int GetMaxLength(this TypeUsage type) { DebugCheck.NotNull(type); return(type.GetFacetValue <int>(DbProviderManifest.MaxLengthFacetName)); }
internal static bool IsSpatialType(this TypeUsage type) { DebugCheck.NotNull(type); return(type.EdmType.BuiltInTypeKind == BuiltInTypeKind.PrimitiveType && ((PrimitiveType)type.EdmType).IsSpatialType()); }
internal static bool MustFacetBeConstant(this TypeUsage type, string facetName) { DebugCheck.NotNull(type); return(((PrimitiveType)type.EdmType).FacetDescriptions.Single(f => f.FacetName == facetName).IsConstant); }
internal static byte GetScale(this TypeUsage type) { DebugCheck.NotNull(type); return(type.GetFacetValue <byte>(DbProviderManifest.ScaleFacetName)); }
internal static PrimitiveTypeKind GetPrimitiveTypeKind(this TypeUsage type) { DebugCheck.NotNull(type); return(((PrimitiveType)type.EdmType).PrimitiveTypeKind); }