System.Data.Common.CommandTrees.ExpressionBuilder.Internal.ArgumentValidation.TryGetPrimitiveTypeKind(System.Type, out System.Data.Metadata.Edm.PrimitiveTypeKind)

Here are the examples of the csharp api class System.Data.Common.CommandTrees.ExpressionBuilder.Internal.ArgumentValidation.TryGetPrimitiveTypeKind(System.Type, out System.Data.Metadata.Edm.PrimitiveTypeKind) taken from open source projects. By voting up you can indicate which examples are most useful and appropriate.

3 Examples 7

1. Example

View license
internal static TypeUsage ValidateConstant(object value)
        {
            EntityUtil.CheckArgumentNull(value, "value");

            //
            // Check that typeof(value) is actually a valid constant (i.e. primitive) type
            //
            PrimitiveTypeKind primitiveTypeKind;
            if (!ArgumentValidation.TryGetPrimitiveTypeKind(value.GetType(), out primitiveTypeKind))
            {
                throw EntityUtil.Argument(System.Data.Entity.Strings.Cqt_Constant_InvalidType, "value");
            }

            return TypeHelpers.GetLiteralTypeUsage(primitiveTypeKind);
        }

2. Example

View license
private static bool ClrEdmEnumTypesMatch(EnumType edmEnumType, Type clrEnumType)
        {
         /n ..... /n //View Source file for more details /n }

3. Example

View license
internal static void ValidateConstant(TypeUsage constantType, object value)
        {
            ///n ..... /n //View Source file for more details /n }