1501 references to PrimitiveTypeKind
System.Data.Entity (1455)
System\Data\Common\CommandTrees\AbstractExpressions.cs (15)
407return ExpressionBuilder.DbExpressionBuilder.CreatePrimitiveNullExpression(PrimitiveTypeKind.Binary); 426return ExpressionBuilder.DbExpressionBuilder.CreatePrimitiveNullExpression(PrimitiveTypeKind.Boolean); 445return ExpressionBuilder.DbExpressionBuilder.CreatePrimitiveNullExpression(PrimitiveTypeKind.Byte); 464return ExpressionBuilder.DbExpressionBuilder.CreatePrimitiveNullExpression(PrimitiveTypeKind.DateTime); 483return ExpressionBuilder.DbExpressionBuilder.CreatePrimitiveNullExpression(PrimitiveTypeKind.DateTimeOffset); 502return ExpressionBuilder.DbExpressionBuilder.CreatePrimitiveNullExpression(PrimitiveTypeKind.Decimal); 521return ExpressionBuilder.DbExpressionBuilder.CreatePrimitiveNullExpression(PrimitiveTypeKind.Double); 540return ExpressionBuilder.DbExpressionBuilder.CreatePrimitiveNullExpression(PrimitiveTypeKind.Geography); 559return ExpressionBuilder.DbExpressionBuilder.CreatePrimitiveNullExpression(PrimitiveTypeKind.Geometry); 578return ExpressionBuilder.DbExpressionBuilder.CreatePrimitiveNullExpression(PrimitiveTypeKind.Guid); 597return ExpressionBuilder.DbExpressionBuilder.CreatePrimitiveNullExpression(PrimitiveTypeKind.Int16); 616return ExpressionBuilder.DbExpressionBuilder.CreatePrimitiveNullExpression(PrimitiveTypeKind.Int32); 635return ExpressionBuilder.DbExpressionBuilder.CreatePrimitiveNullExpression(PrimitiveTypeKind.Int64); 669return ExpressionBuilder.DbExpressionBuilder.CreatePrimitiveNullExpression(PrimitiveTypeKind.Single); 688return ExpressionBuilder.DbExpressionBuilder.CreatePrimitiveNullExpression(PrimitiveTypeKind.String);
System\Data\Common\CommandTrees\ExpressionBuilder\DbExpressionBuilder.cs (37)
36private static readonly DbNullExpression _binaryNull = Null(EdmProviderManifest.Instance.GetCanonicalModelTypeUsage(PrimitiveTypeKind.Binary)); 37private static readonly DbNullExpression _boolNull = Null(EdmProviderManifest.Instance.GetCanonicalModelTypeUsage(PrimitiveTypeKind.Boolean)); 38private static readonly DbNullExpression _byteNull = Null(EdmProviderManifest.Instance.GetCanonicalModelTypeUsage(PrimitiveTypeKind.Byte)); 39private static readonly DbNullExpression _dateTimeNull = Null(EdmProviderManifest.Instance.GetCanonicalModelTypeUsage(PrimitiveTypeKind.DateTime)); 40private static readonly DbNullExpression _dateTimeOffsetNull = Null(EdmProviderManifest.Instance.GetCanonicalModelTypeUsage(PrimitiveTypeKind.DateTimeOffset)); 41private static readonly DbNullExpression _decimalNull = Null(EdmProviderManifest.Instance.GetCanonicalModelTypeUsage(PrimitiveTypeKind.Decimal)); 42private static readonly DbNullExpression _doubleNull = Null(EdmProviderManifest.Instance.GetCanonicalModelTypeUsage(PrimitiveTypeKind.Double)); 43private static readonly DbNullExpression _geographyNull = Null(EdmProviderManifest.Instance.GetCanonicalModelTypeUsage(PrimitiveTypeKind.Geography)); 44private static readonly DbNullExpression _geometryNull = Null(EdmProviderManifest.Instance.GetCanonicalModelTypeUsage(PrimitiveTypeKind.Geometry)); 45private static readonly DbNullExpression _guidNull = Null(EdmProviderManifest.Instance.GetCanonicalModelTypeUsage(PrimitiveTypeKind.Guid)); 46private static readonly DbNullExpression _int16Null = Null(EdmProviderManifest.Instance.GetCanonicalModelTypeUsage(PrimitiveTypeKind.Int16)); 47private static readonly DbNullExpression _int32Null = Null(EdmProviderManifest.Instance.GetCanonicalModelTypeUsage(PrimitiveTypeKind.Int32)); 48private static readonly DbNullExpression _int64Null = Null(EdmProviderManifest.Instance.GetCanonicalModelTypeUsage(PrimitiveTypeKind.Int64)); 49private static readonly DbNullExpression _sbyteNull = Null(EdmProviderManifest.Instance.GetCanonicalModelTypeUsage(PrimitiveTypeKind.SByte)); 50private static readonly DbNullExpression _singleNull = Null(EdmProviderManifest.Instance.GetCanonicalModelTypeUsage(PrimitiveTypeKind.Single)); 51private static readonly DbNullExpression _stringNull = Null(EdmProviderManifest.Instance.GetCanonicalModelTypeUsage(PrimitiveTypeKind.String)); 52private static readonly DbNullExpression _timeNull = Null(EdmProviderManifest.Instance.GetCanonicalModelTypeUsage(PrimitiveTypeKind.Time)); 1852PrimitiveTypeKind primitiveTypeKind; 2658internal static DbNullExpression CreatePrimitiveNullExpression(PrimitiveTypeKind primitiveType) 2662case PrimitiveTypeKind.Binary: 2664case PrimitiveTypeKind.Boolean: 2666case PrimitiveTypeKind.Byte: 2668case PrimitiveTypeKind.DateTime: 2670case PrimitiveTypeKind.DateTimeOffset: 2672case PrimitiveTypeKind.Decimal: 2674case PrimitiveTypeKind.Double: 2676case PrimitiveTypeKind.Geography: 2678case PrimitiveTypeKind.Geometry: 2680case PrimitiveTypeKind.Guid: 2682case PrimitiveTypeKind.Int16: 2684case PrimitiveTypeKind.Int32: 2686case PrimitiveTypeKind.Int64: 2688case PrimitiveTypeKind.SByte: 2690case PrimitiveTypeKind.Single: 2692case PrimitiveTypeKind.String: 2694case PrimitiveTypeKind.Time: 2698throw EntityUtil.InvalidEnumerationValue(typeof(PrimitiveTypeKind), (int)primitiveType);
System\Data\Common\CommandTrees\ExpressionBuilder\Internal\ArgumentValidation.cs (23)
24private static TypeUsage _booleanType = EdmProviderManifest.Instance.GetCanonicalModelTypeUsage(PrimitiveTypeKind.Boolean); 69private static void RequireCompatibleType(DbExpression expression, PrimitiveTypeKind requiredResultType, string argumentName) 74private static void RequireCompatibleType(DbExpression expression, PrimitiveTypeKind requiredResultType, string argumentName, int index) 78PrimitiveTypeKind valueTypeKind; 91Enum.GetName(typeof(PrimitiveTypeKind), valueTypeKind) 93Enum.GetName(typeof(PrimitiveTypeKind), requiredResultType) 381if (!TypeSemantics.IsPrimitiveType(key.ResultType, PrimitiveTypeKind.String)) 436RequireCompatibleType(predicate, PrimitiveTypeKind.Boolean, "predicate"); 542RequireCompatibleType(joinCondition, PrimitiveTypeKind.Boolean, "joinCondition"); 557RequireCompatibleType(predicate, PrimitiveTypeKind.Boolean, "predicate"); 737PrimitiveTypeKind primitiveTypeKind; 783PrimitiveTypeKind valueKind; 789if (!(Helper.IsGeographicType(primitiveType) && valueKind == PrimitiveTypeKind.Geography) 790&& !(Helper.IsGeometricType(primitiveType) && valueKind == PrimitiveTypeKind.Geometry)) 833if (null == resultType || !TypeSemantics.IsPrimitiveType(resultType, PrimitiveTypeKind.Boolean)) 844if (null == resultType || !TypeSemantics.IsPrimitiveType(resultType, PrimitiveTypeKind.Boolean)) 859if (!TypeSemantics.IsPrimitiveType(argument.ResultType, PrimitiveTypeKind.Boolean)) 982RequireCompatibleType(argument, PrimitiveTypeKind.String, "argument"); 983RequireCompatibleType(pattern, PrimitiveTypeKind.String, "pattern"); 993RequireCompatibleType(escape, PrimitiveTypeKind.String, "escape"); 1420RequireCompatibleType(exp, PrimitiveTypeKind.Boolean, "whenExpressions", idx); 2061private static bool TryGetPrimitiveTypeKind(Type clrType, out PrimitiveTypeKind primitiveTypeKind) 2096PrimitiveTypeKind clrEnumUnderlyingTypeKind;
System\Data\Common\CommandTrees\Internal\ExpressionKeyGen.cs (31)
196case PrimitiveTypeKind.Binary: 212case PrimitiveTypeKind.String: 226case PrimitiveTypeKind.Boolean: 227case PrimitiveTypeKind.Byte: 228case PrimitiveTypeKind.Decimal: 229case PrimitiveTypeKind.Double: 230case PrimitiveTypeKind.Guid: 231case PrimitiveTypeKind.Single: 232case PrimitiveTypeKind.SByte: 233case PrimitiveTypeKind.Int16: 234case PrimitiveTypeKind.Int32: 235case PrimitiveTypeKind.Int64: 236case PrimitiveTypeKind.Time: 240case PrimitiveTypeKind.DateTime: 244case PrimitiveTypeKind.DateTimeOffset: 248case PrimitiveTypeKind.Geometry: 249case PrimitiveTypeKind.GeometryPoint: 250case PrimitiveTypeKind.GeometryLineString: 251case PrimitiveTypeKind.GeometryPolygon: 252case PrimitiveTypeKind.GeometryMultiPoint: 253case PrimitiveTypeKind.GeometryMultiLineString: 254case PrimitiveTypeKind.GeometryMultiPolygon: 255case PrimitiveTypeKind.GeometryCollection: 266case PrimitiveTypeKind.Geography: 267case PrimitiveTypeKind.GeographyPoint: 268case PrimitiveTypeKind.GeographyLineString: 269case PrimitiveTypeKind.GeographyPolygon: 270case PrimitiveTypeKind.GeographyMultiPoint: 271case PrimitiveTypeKind.GeographyMultiLineString: 272case PrimitiveTypeKind.GeographyMultiPolygon: 273case PrimitiveTypeKind.GeographyCollection:
System\Data\Common\CommandTrees\OperatorExpressions.cs (6)
32Debug.Assert(TypeSemantics.IsPrimitiveType(booleanResultType, PrimitiveTypeKind.Boolean), "DbAndExpression requires a Boolean result type"); 62Debug.Assert(TypeSemantics.IsPrimitiveType(booleanResultType, PrimitiveTypeKind.Boolean), "DbOrExpression requires a Boolean result type"); 92Debug.Assert(TypeSemantics.IsPrimitiveType(booleanResultType, PrimitiveTypeKind.Boolean), "DbNotExpression requires a Boolean result type"); 496Debug.Assert(TypeSemantics.IsPrimitiveType(input.ResultType, PrimitiveTypeKind.String), "DbLikeExpression argument must have a string result type"); 497Debug.Assert(TypeSemantics.IsPrimitiveType(pattern.ResultType, PrimitiveTypeKind.String), "DbLikeExpression pattern must have a string result type"); 498Debug.Assert(TypeSemantics.IsPrimitiveType(escape.ResultType, PrimitiveTypeKind.String), "DbLikeExpression escape must have a string result type");
System\Data\Common\CommandTrees\RelationalExpressions.cs (3)
194Debug.Assert(TypeSemantics.IsPrimitiveType(predicate.ResultType, PrimitiveTypeKind.Boolean), "DbFilterExpression predicate must have a Boolean result type"); 527Debug.Assert(TypeSemantics.IsPrimitiveType(booleanResultType, PrimitiveTypeKind.Boolean), "DbQuantifierExpression must have a Boolean result type"); 528Debug.Assert(TypeSemantics.IsPrimitiveType(predicate.ResultType, PrimitiveTypeKind.Boolean), "DbQuantifierExpression predicate must have a Boolean result type");
System\Data\Common\CommandTrees\ValueExpressions.cs (1)
40&& primitiveType.PrimitiveTypeKind == PrimitiveTypeKind.Binary;
System\Data\Common\DbCommandDefinition.cs (15)
124case PrimitiveTypeKind.Binary: 127case PrimitiveTypeKind.Boolean: 130case PrimitiveTypeKind.Byte: 133case PrimitiveTypeKind.DateTime: 136case PrimitiveTypeKind.Time: 139case PrimitiveTypeKind.DateTimeOffset: 142case PrimitiveTypeKind.Decimal: 145case PrimitiveTypeKind.Double: 148case PrimitiveTypeKind.Guid: 151case PrimitiveTypeKind.Single: 154case PrimitiveTypeKind.SByte: 157case PrimitiveTypeKind.Int16: 160case PrimitiveTypeKind.Int32: 163case PrimitiveTypeKind.Int64: 166case PrimitiveTypeKind.String:
System\Data\Common\EntitySql\SemanticAnalyzer.cs (5)
2028if (!TypeSemantics.IsNumericType(operands.Left.ResultType) && !TypeSemantics.IsPrimitiveType(operands.Left.ResultType, PrimitiveTypeKind.String)) 2033if (!TypeSemantics.IsNumericType(operands.Right.ResultType) && !TypeSemantics.IsPrimitiveType(operands.Right.ResultType, PrimitiveTypeKind.String)) 2411if (primitiveType == null || primitiveType.PrimitiveTypeKind != PrimitiveTypeKind.Decimal) 4326return TypeSemantics.IsPrimitiveType(type, PrimitiveTypeKind.String); 4331return TypeSemantics.IsPrimitiveType(type, PrimitiveTypeKind.Boolean);
System\Data\Common\EntitySql\TypeResolver.cs (6)
218/// Returns <see cref="TypeUsage"/> for <see cref="PrimitiveTypeKind.String"/>. 222get { return _perspective.MetadataWorkspace.GetCanonicalModelTypeUsage(PrimitiveTypeKind.String); } 226/// Returns <see cref="TypeUsage"/> for <see cref="PrimitiveTypeKind.Boolean"/>. 230get { return _perspective.MetadataWorkspace.GetCanonicalModelTypeUsage(PrimitiveTypeKind.Boolean); } 234/// Returns <see cref="TypeUsage"/> for <see cref="PrimitiveTypeKind.Int64"/>. 238get { return _perspective.MetadataWorkspace.GetCanonicalModelTypeUsage(PrimitiveTypeKind.Int64); }
System\Data\Common\Internal\DbTypeMap.cs (24)
25internal static readonly TypeUsage AnsiString = CreateType(PrimitiveTypeKind.String, new FacetValues { Unicode = false, FixedLength = false, MaxLength = (int?)null }); 26internal static readonly TypeUsage AnsiStringFixedLength = CreateType(PrimitiveTypeKind.String, new FacetValues { Unicode = false, FixedLength = true, MaxLength = (int?)null }); 27internal static readonly TypeUsage String = CreateType(PrimitiveTypeKind.String, new FacetValues { Unicode = true, FixedLength = false, MaxLength = (int?)null }); 28internal static readonly TypeUsage StringFixedLength = CreateType(PrimitiveTypeKind.String, new FacetValues { Unicode = true, FixedLength = true, MaxLength = (int?)null }); 31internal static readonly TypeUsage Xml = CreateType(PrimitiveTypeKind.String, new FacetValues { Unicode = true, FixedLength = false, MaxLength = (int?)null }); 32internal static readonly TypeUsage Binary = CreateType(PrimitiveTypeKind.Binary , new FacetValues { MaxLength = (int?)null }); 33internal static readonly TypeUsage Boolean = CreateType(PrimitiveTypeKind.Boolean); 34internal static readonly TypeUsage Byte = CreateType(PrimitiveTypeKind.Byte); 35internal static readonly TypeUsage DateTime = CreateType(PrimitiveTypeKind.DateTime); 36internal static readonly TypeUsage Date = CreateType(PrimitiveTypeKind.DateTime); 37internal static readonly TypeUsage DateTime2 = CreateType(PrimitiveTypeKind.DateTime, new FacetValues { Precision = (byte?)null }); 38internal static readonly TypeUsage Time = CreateType(PrimitiveTypeKind.Time, new FacetValues { Precision = (byte?)null }); 39internal static readonly TypeUsage DateTimeOffset = CreateType(PrimitiveTypeKind.DateTimeOffset, new FacetValues { Precision = (byte?)null }); 42internal static readonly TypeUsage Decimal = CreateType(PrimitiveTypeKind.Decimal, new FacetValues { Precision = (byte?)null, Scale = (byte?)null }); 44internal static readonly TypeUsage Currency = CreateType(PrimitiveTypeKind.Decimal, new FacetValues { Precision = (byte?)null, Scale = (byte?)null }); 45internal static readonly TypeUsage Double = CreateType(PrimitiveTypeKind.Double); 46internal static readonly TypeUsage Guid = CreateType(PrimitiveTypeKind.Guid); 47internal static readonly TypeUsage Int16 = CreateType(PrimitiveTypeKind.Int16); 48internal static readonly TypeUsage Int32 = CreateType(PrimitiveTypeKind.Int32); 49internal static readonly TypeUsage Int64 = CreateType(PrimitiveTypeKind.Int64); 50internal static readonly TypeUsage Single = CreateType(PrimitiveTypeKind.Single); 51internal static readonly TypeUsage SByte = CreateType(PrimitiveTypeKind.SByte); 157private static TypeUsage CreateType(PrimitiveTypeKind type) 162private static TypeUsage CreateType(PrimitiveTypeKind type, FacetValues facets)
System\Data\Common\Internal\Materialization\Shaper.cs (5)
617public TColumn GetSpatialColumnValueWithErrorHandling<TColumn>(int ordinal, PrimitiveTypeKind spatialTypeKind) 619Debug.Assert(spatialTypeKind == PrimitiveTypeKind.Geography || spatialTypeKind == PrimitiveTypeKind.Geometry, "Spatial primitive type kind is not geography or geometry?"); 622if (spatialTypeKind == PrimitiveTypeKind.Geography) 639public TProperty GetSpatialPropertyValueWithErrorHandling<TProperty>(int ordinal, string propertyName, string typeName, PrimitiveTypeKind spatialTypeKind)
System\Data\Common\Internal\Materialization\Translator.cs (7)
1050PrimitiveTypeKind primitiveColumnType; 1054Expression.Constant(ordinal), Expression.Constant(propertyName), Expression.Constant(typeName), Expression.Constant(primitiveColumnType, typeof(PrimitiveTypeKind))); 1070PrimitiveTypeKind primitiveColumnType; 1073primitiveColumnType = Helper.IsGeographicType((PrimitiveType)columnType.EdmType) ? PrimitiveTypeKind.Geography : PrimitiveTypeKind.Geometry; 1074result = Expression.Call(Shaper_Parameter, Shaper_GetSpatialColumnValueWithErrorHandling.MakeGenericMethod(resultType), Expression.Constant(ordinal), Expression.Constant(primitiveColumnType, typeof(PrimitiveTypeKind))); 2074PrimitiveTypeKind typeKind;
System\Data\Common\QueryCache\EntityClientCacheKey.cs (2)
130Debug.Assert(TypeSemantics.IsPrimitiveType(type, PrimitiveTypeKind.String), "Update GetTypeUsageToken to return 'Xml' for Xml parameters"); 143Debug.Assert(!TypeSemantics.IsPrimitiveType(type, PrimitiveTypeKind.String), "String TypeUsage not derived from DbType.AnsiString, AnsiString, String, StringFixedLength or Xml?");
System\Data\Common\Utils\MetadataHelper.cs (4)
123spatialNormalizedEdmType = PrimitiveType.GetEdmPrimitiveType(isGeographic ? PrimitiveTypeKind.Geography : PrimitiveTypeKind.Geometry); 214return primitiveType != null && primitiveType.PrimitiveTypeKind == PrimitiveTypeKind.Boolean; 686internal static PrimitiveTypeKind GetPrimitiveTypeKind(TypeUsage typeUsage)
System\Data\EntityClient\EntityCommandDefinition.cs (1)
344PrimitiveTypeKind primitiveTypeKind;
System\Data\EntityModel\SchemaObjectModel\BooleanFacetDescriptionElement.cs (1)
27get { return MetadataItem.EdmProviderManifest.GetPrimitiveType(PrimitiveTypeKind.Boolean); }
System\Data\EntityModel\SchemaObjectModel\ByteFacetDescriptionElement.cs (1)
27get { return MetadataItem.EdmProviderManifest.GetPrimitiveType(PrimitiveTypeKind.Byte); }
System\Data\EntityModel\SchemaObjectModel\EntityKeyElement.cs (2)
139if ((primitivePropertyType.PrimitiveTypeKind == PrimitiveTypeKind.Binary && Schema.SchemaVersion < XmlConstants.EdmVersionForV2) || 152if ((primitivePropertyType.PrimitiveTypeKind == PrimitiveTypeKind.Binary && Schema.SchemaVersion < XmlConstants.StoreVersionForV2) ||
System\Data\EntityModel\SchemaObjectModel\IntegerFacetDescriptionElement.cs (1)
27get { return MetadataItem.EdmProviderManifest.GetPrimitiveType(PrimitiveTypeKind.Int32); }
System\Data\EntityModel\SchemaObjectModel\ScalarType.cs (16)
59case PrimitiveTypeKind.Binary: 61case PrimitiveTypeKind.Boolean: 63case PrimitiveTypeKind.Byte: 65case PrimitiveTypeKind.DateTime: 67case PrimitiveTypeKind.Time: 69case PrimitiveTypeKind.DateTimeOffset: 71case PrimitiveTypeKind.Decimal: 73case PrimitiveTypeKind.Double: 75case PrimitiveTypeKind.Guid: 77case PrimitiveTypeKind.Int16: 79case PrimitiveTypeKind.Int32: 81case PrimitiveTypeKind.Int64: 83case PrimitiveTypeKind.Single: 85case PrimitiveTypeKind.String: 87case PrimitiveTypeKind.SByte: 97public PrimitiveTypeKind TypeKind
System\Data\EntityModel\SchemaObjectModel\Schema.cs (1)
576EdmProviderManifest.Instance.GetPrimitiveType(PrimitiveTypeKind.String),
System\Data\EntityModel\SchemaObjectModel\SchemaElement.cs (1)
725TypeUsage.Create(EdmProviderManifest.Instance.GetPrimitiveType(PrimitiveTypeKind.String)),
System\Data\EntityModel\SchemaObjectModel\SchemaEnumType.cs (1)
203.Single(t => t is ScalarType && ((ScalarType)t).TypeKind == PrimitiveTypeKind.Int32);
System\Data\EntityModel\SchemaObjectModel\SridFacetDescriptionElement.cs (1)
27get { return MetadataItem.EdmProviderManifest.GetPrimitiveType(PrimitiveTypeKind.Int32); }
System\Data\EntityModel\SchemaObjectModel\TypeElement.cs (3)
199_primitiveType.PrimitiveTypeKind = (PrimitiveTypeKind)Enum.Parse(typeof(PrimitiveTypeKind), value); 280if (PrimitiveType.PrimitiveTypeKind == PrimitiveTypeKind.Decimal)
System\Data\EntityModel\SchemaObjectModel\TypeUsageBuilder.cs (52)
167else if (edmType is PrimitiveType && (edmType as PrimitiveType).PrimitiveTypeKind == PrimitiveTypeKind.String && 223case PrimitiveTypeKind.Binary: 226case PrimitiveTypeKind.String: 229case PrimitiveTypeKind.Decimal: 232case PrimitiveTypeKind.DateTime: 233case PrimitiveTypeKind.Time: 234case PrimitiveTypeKind.DateTimeOffset: 237case PrimitiveTypeKind.Int16: 238case PrimitiveTypeKind.Int32: 239case PrimitiveTypeKind.Int64: 240case PrimitiveTypeKind.Boolean: 241case PrimitiveTypeKind.Byte: 242case PrimitiveTypeKind.SByte: 243case PrimitiveTypeKind.Double: 244case PrimitiveTypeKind.Guid: 245case PrimitiveTypeKind.Single: 247case PrimitiveTypeKind.Geography: 248case PrimitiveTypeKind.GeographyPoint: 249case PrimitiveTypeKind.GeographyLineString: 250case PrimitiveTypeKind.GeographyPolygon: 251case PrimitiveTypeKind.GeographyMultiPoint: 252case PrimitiveTypeKind.GeographyMultiLineString: 253case PrimitiveTypeKind.GeographyMultiPolygon: 254case PrimitiveTypeKind.GeographyCollection: 255case PrimitiveTypeKind.Geometry: 256case PrimitiveTypeKind.GeometryPoint: 257case PrimitiveTypeKind.GeometryLineString: 258case PrimitiveTypeKind.GeometryPolygon: 259case PrimitiveTypeKind.GeometryMultiPoint: 260case PrimitiveTypeKind.GeometryMultiLineString: 261case PrimitiveTypeKind.GeometryMultiPolygon: 262case PrimitiveTypeKind.GeometryCollection: 374Debug.Assert(primitiveType.PrimitiveTypeKind == PrimitiveTypeKind.Decimal, "Expected decimal type"); 431Debug.Assert( (primitiveType.PrimitiveTypeKind == PrimitiveTypeKind.DateTime) ||(primitiveType.PrimitiveTypeKind == PrimitiveTypeKind.DateTimeOffset)||(primitiveType.PrimitiveTypeKind == PrimitiveTypeKind.Time)) ; 464Debug.Assert(primitiveType.PrimitiveTypeKind == PrimitiveTypeKind.Binary || 465primitiveType.PrimitiveTypeKind == PrimitiveTypeKind.String, "Expected binary or string type"); 706case PrimitiveTypeKind.Binary: 710case PrimitiveTypeKind.Boolean: 714case PrimitiveTypeKind.Byte: 718case PrimitiveTypeKind.DateTime: 722case PrimitiveTypeKind.Time: 726case PrimitiveTypeKind.DateTimeOffset: 731case PrimitiveTypeKind.Decimal: 735case PrimitiveTypeKind.Double: 739case PrimitiveTypeKind.Guid: 743case PrimitiveTypeKind.Int16: 747case PrimitiveTypeKind.Int32: 751case PrimitiveTypeKind.Int64: 755case PrimitiveTypeKind.Single: 759case PrimitiveTypeKind.String:
System\Data\Mapping\FunctionImportMappingNonComposable.cs (1)
221TypeUsage type = TypeUsage.CreateStringTypeUsage(workspace.GetModelPrimitiveType(PrimitiveTypeKind.String), true, false);
System\Data\Mapping\StorageMappingItemLoader.cs (17)
3261PrimitiveTypeKind primitiveTypeKind = memberType.PrimitiveTypeKind; 3324internal static bool IsTypeSupportedForCondition(PrimitiveTypeKind primitiveTypeKind) 3328case PrimitiveTypeKind.Boolean: 3329case PrimitiveTypeKind.Byte: 3330case PrimitiveTypeKind.Int16: 3331case PrimitiveTypeKind.Int32: 3332case PrimitiveTypeKind.Int64: 3333case PrimitiveTypeKind.String: 3334case PrimitiveTypeKind.SByte: 3336case PrimitiveTypeKind.Binary: 3337case PrimitiveTypeKind.DateTime: 3338case PrimitiveTypeKind.Time: 3339case PrimitiveTypeKind.DateTimeOffset: 3340case PrimitiveTypeKind.Double: 3341case PrimitiveTypeKind.Guid: 3342case PrimitiveTypeKind.Single: 3343case PrimitiveTypeKind.Decimal:
System\Data\Mapping\Update\Internal\Propagator.ExtentPlaceholderCreator.cs (37)
40static private Dictionary<PrimitiveTypeKind, object> s_typeDefaultMap = InitializeTypeDefaultMap(); 49private static Dictionary<PrimitiveTypeKind, object> InitializeTypeDefaultMap() 51Dictionary<PrimitiveTypeKind, object> typeDefaultMap = new Dictionary<PrimitiveTypeKind, object>( 52EqualityComparer<PrimitiveTypeKind>.Default); 56typeDefaultMap[PrimitiveTypeKind.Binary] = new Byte[0]; 57typeDefaultMap[PrimitiveTypeKind.Boolean] = default(Boolean); 58typeDefaultMap[PrimitiveTypeKind.Byte] = default(Byte); 59typeDefaultMap[PrimitiveTypeKind.DateTime] = default(DateTime); 60typeDefaultMap[PrimitiveTypeKind.Time] = default(TimeSpan); 61typeDefaultMap[PrimitiveTypeKind.DateTimeOffset] = default(DateTimeOffset); 62typeDefaultMap[PrimitiveTypeKind.Decimal] = default(Decimal); 63typeDefaultMap[PrimitiveTypeKind.Double] = default(Double); 64typeDefaultMap[PrimitiveTypeKind.Guid] = default(Guid); 65typeDefaultMap[PrimitiveTypeKind.Int16] = default(Int16); 66typeDefaultMap[PrimitiveTypeKind.Int32] = default(Int32); 67typeDefaultMap[PrimitiveTypeKind.Int64] = default(Int64); 68typeDefaultMap[PrimitiveTypeKind.Single] = default(Single); 69typeDefaultMap[PrimitiveTypeKind.SByte] = default(SByte); 70typeDefaultMap[PrimitiveTypeKind.String] = String.Empty; 72typeDefaultMap[PrimitiveTypeKind.Geometry] = DbGeometry.FromText("POINT EMPTY"); 73typeDefaultMap[PrimitiveTypeKind.GeometryPoint] = DbGeometry.FromText("POINT EMPTY"); 74typeDefaultMap[PrimitiveTypeKind.GeometryLineString] = DbGeometry.FromText("LINESTRING EMPTY"); 75typeDefaultMap[PrimitiveTypeKind.GeometryPolygon] = DbGeometry.FromText("POLYGON EMPTY"); 76typeDefaultMap[PrimitiveTypeKind.GeometryMultiPoint] = DbGeometry.FromText("MULTIPOINT EMPTY"); 77typeDefaultMap[PrimitiveTypeKind.GeometryMultiLineString] = DbGeometry.FromText("MULTILINESTRING EMPTY"); 78typeDefaultMap[PrimitiveTypeKind.GeometryMultiPolygon] = DbGeometry.FromText("MULTIPOLYGON EMPTY"); 79typeDefaultMap[PrimitiveTypeKind.GeometryCollection] = DbGeometry.FromText("GEOMETRYCOLLECTION EMPTY"); 81typeDefaultMap[PrimitiveTypeKind.Geography] = DbGeography.FromText("POINT EMPTY"); 82typeDefaultMap[PrimitiveTypeKind.GeographyPoint] = DbGeography.FromText("POINT EMPTY"); 83typeDefaultMap[PrimitiveTypeKind.GeographyLineString] = DbGeography.FromText("LINESTRING EMPTY"); 84typeDefaultMap[PrimitiveTypeKind.GeographyPolygon] = DbGeography.FromText("POLYGON EMPTY"); 85typeDefaultMap[PrimitiveTypeKind.GeographyMultiPoint] = DbGeography.FromText("MULTIPOINT EMPTY"); 86typeDefaultMap[PrimitiveTypeKind.GeographyMultiLineString] = DbGeography.FromText("MULTILINESTRING EMPTY"); 87typeDefaultMap[PrimitiveTypeKind.GeographyMultiPolygon] = DbGeography.FromText("MULTIPOLYGON EMPTY"); 88typeDefaultMap[PrimitiveTypeKind.GeographyCollection] = DbGeography.FromText("GEOMETRYCOLLECTION EMPTY"); 243PrimitiveTypeKind primitiveTypeKind = primitiveType.PrimitiveTypeKind;
System\Data\Mapping\ViewGeneration\CellCreator.cs (1)
502return (primitive != null && primitive.PrimitiveTypeKind == PrimitiveTypeKind.Boolean);
System\Data\Mapping\ViewGeneration\Structures\Domain.cs (1)
139Debug.Assert(Helper.AsPrimitive(type).PrimitiveTypeKind == PrimitiveTypeKind.Boolean, "Only boolean type has discrete domain.");
System\Data\Mapping\ViewGeneration\Structures\ScalarConstant.cs (3)
82PrimitiveTypeKind primitiveTypeKind = ((PrimitiveType)modelType).PrimitiveTypeKind; 83if (primitiveTypeKind == PrimitiveTypeKind.Boolean) 91else if (primitiveTypeKind == PrimitiveTypeKind.String)
System\Data\Metadata\CacheForPrimitiveTypes.cs (3)
71internal bool TryGetType(PrimitiveTypeKind primitiveTypeKind, IEnumerable<Facet> facets, out PrimitiveType type) 104if ((primitiveTypeKind == PrimitiveTypeKind.String || 105primitiveTypeKind == PrimitiveTypeKind.Binary) &&
System\Data\Metadata\Converter.cs (5)
37underlyingType: PrimitiveType.GetEdmPrimitiveType(PrimitiveTypeKind.Int32), 53underlyingType: PrimitiveType.GetEdmPrimitiveType(PrimitiveTypeKind.Int32), 78MetadataItem.EdmProviderManifest.GetPrimitiveType(PrimitiveTypeKind.String), 1374if (primitiveType.PrimitiveTypeKind == PrimitiveTypeKind.String || 1375primitiveType.PrimitiveTypeKind == PrimitiveTypeKind.Binary)
System\Data\Metadata\Edm\AssociationSetEnd.cs (2)
81[MetadataProperty(PrimitiveTypeKind.String, false)] 95[MetadataProperty(PrimitiveTypeKind.String, false)]
System\Data\Metadata\Edm\AssociationType.cs (1)
88[MetadataProperty(PrimitiveTypeKind.Boolean, false)]
System\Data\Metadata\Edm\EdmConstants.cs (1)
21internal const int NumPrimitiveTypes = (int)System.Data.Metadata.Edm.PrimitiveTypeKind.GeographyCollection + 1;
System\Data\Metadata\Edm\EdmFunction.cs (8)
206[MetadataProperty(PrimitiveTypeKind.String, false)] 219[MetadataProperty(PrimitiveTypeKind.Boolean, false)] 228[MetadataProperty(PrimitiveTypeKind.Boolean, false)] 237[MetadataProperty(PrimitiveTypeKind.Boolean, false)] 246[MetadataProperty(PrimitiveTypeKind.Boolean, false)] 256[MetadataProperty(PrimitiveTypeKind.Boolean, false)] 265[MetadataProperty(PrimitiveTypeKind.String, false)] 298[MetadataProperty(PrimitiveTypeKind.String, false)]
System\Data\Metadata\Edm\EdmMember.cs (1)
54[MetadataProperty(PrimitiveTypeKind.String, false)]
System\Data\Metadata\Edm\EdmType.cs (3)
105[MetadataProperty(PrimitiveTypeKind.String, false)] 122[MetadataProperty(PrimitiveTypeKind.String, false)] 140[MetadataProperty(PrimitiveTypeKind.Boolean, false)]
System\Data\Metadata\Edm\EntityContainer.cs (1)
68[MetadataProperty(PrimitiveTypeKind.String, false)]
System\Data\Metadata\Edm\EntitySetBase.cs (4)
102[MetadataProperty(PrimitiveTypeKind.String, false)] 125[MetadataProperty(PrimitiveTypeKind.String, false)] 167[MetadataProperty(PrimitiveTypeKind.String, false)] 176[MetadataProperty(PrimitiveTypeKind.String, false)]
System\Data\Metadata\Edm\EnumMember.cs (1)
72[MetadataProperty(PrimitiveTypeKind.String, false)]
System\Data\Metadata\Edm\EnumType.cs (2)
47_underlyingType = PrimitiveType.GetEdmPrimitiveType(PrimitiveTypeKind.Int32); 130[MetadataProperty(PrimitiveTypeKind.Boolean, false)]
System\Data\Metadata\Edm\Facet.cs (1)
136[MetadataProperty(PrimitiveTypeKind.String, false)]
System\Data\Metadata\Edm\FacetDescription.cs (4)
281return primitiveType.PrimitiveTypeKind == PrimitiveTypeKind.Byte || 282primitiveType.PrimitiveTypeKind == PrimitiveTypeKind.SByte || 283primitiveType.PrimitiveTypeKind == PrimitiveTypeKind.Int16 || 284primitiveType.PrimitiveTypeKind == PrimitiveTypeKind.Int32;
System\Data\Metadata\Edm\FunctionParameter.cs (1)
83[MetadataProperty(PrimitiveTypeKind.String, false)]
System\Data\Metadata\Edm\ItemCollection.cs (1)
470internal virtual PrimitiveType GetMappedPrimitiveType(PrimitiveTypeKind primitiveTypeKind)
System\Data\Metadata\Edm\MetadataItem_Static.cs (4)
282Enum.GetNames(typeof(PrimitiveTypeKind))); 292EdmProviderManifest.GetPrimitiveType(PrimitiveTypeKind.Boolean), 315TypeUsage stringTypeUsage = TypeUsage.Create(EdmProviderManifest.GetPrimitiveType(PrimitiveTypeKind.String)); 316TypeUsage booleanTypeUsage = TypeUsage.Create(EdmProviderManifest.GetPrimitiveType(PrimitiveTypeKind.Boolean));
System\Data\Metadata\Edm\MetadataProperty.cs (1)
93[MetadataProperty(PrimitiveTypeKind.String, false)]
System\Data\Metadata\Edm\MetadataPropertyAttribute.cs (1)
38internal MetadataPropertyAttribute(PrimitiveTypeKind primitiveTypeKind, bool isCollectionType)
System\Data\Metadata\Edm\PrimitiveType.cs (35)
77private PrimitiveTypeKind _primitiveTypeKind; 100public PrimitiveTypeKind PrimitiveTypeKind 151case PrimitiveTypeKind.Binary: 153case PrimitiveTypeKind.Boolean: 155case PrimitiveTypeKind.Byte: 157case PrimitiveTypeKind.DateTime: 159case PrimitiveTypeKind.Time: 161case PrimitiveTypeKind.DateTimeOffset: 163case PrimitiveTypeKind.Decimal: 165case PrimitiveTypeKind.Double: 167case PrimitiveTypeKind.Geography: 168case PrimitiveTypeKind.GeographyPoint: 169case PrimitiveTypeKind.GeographyLineString: 170case PrimitiveTypeKind.GeographyPolygon: 171case PrimitiveTypeKind.GeographyMultiPoint: 172case PrimitiveTypeKind.GeographyMultiLineString: 173case PrimitiveTypeKind.GeographyMultiPolygon: 174case PrimitiveTypeKind.GeographyCollection: 176case PrimitiveTypeKind.Geometry: 177case PrimitiveTypeKind.GeometryPoint: 178case PrimitiveTypeKind.GeometryLineString: 179case PrimitiveTypeKind.GeometryPolygon: 180case PrimitiveTypeKind.GeometryMultiPoint: 181case PrimitiveTypeKind.GeometryMultiLineString: 182case PrimitiveTypeKind.GeometryMultiPolygon: 183case PrimitiveTypeKind.GeometryCollection: 185case PrimitiveTypeKind.Guid: 187case PrimitiveTypeKind.Single: 189case PrimitiveTypeKind.SByte: 191case PrimitiveTypeKind.Int16: 193case PrimitiveTypeKind.Int32: 195case PrimitiveTypeKind.Int64: 197case PrimitiveTypeKind.String: 221PrimitiveTypeKind primitiveTypeKind, 253public static PrimitiveType GetEdmPrimitiveType(PrimitiveTypeKind primitiveTypeKind)
System\Data\Metadata\Edm\Provider\ClrProviderManifest.cs (57)
61PrimitiveTypeKind resolvedTypeKind; 73/// Returns the <see cref="PrimitiveTypeKind"/> corresponding to the given CLR type 78internal bool TryGetPrimitiveTypeKind(Type clrType, out PrimitiveTypeKind resolvedPrimitiveTypeKind) 80PrimitiveTypeKind? primitiveTypeKind = null; 88primitiveTypeKind = PrimitiveTypeKind.Boolean; 91primitiveTypeKind = PrimitiveTypeKind.Byte; 94primitiveTypeKind = PrimitiveTypeKind.DateTime; 98primitiveTypeKind = PrimitiveTypeKind.Decimal; 101primitiveTypeKind = PrimitiveTypeKind.Double; 107primitiveTypeKind = PrimitiveTypeKind.Int16; 110primitiveTypeKind = PrimitiveTypeKind.Int32; 113primitiveTypeKind = PrimitiveTypeKind.Int64; 116primitiveTypeKind = PrimitiveTypeKind.SByte; 119primitiveTypeKind = PrimitiveTypeKind.Single; 122primitiveTypeKind = PrimitiveTypeKind.String; 129primitiveTypeKind = PrimitiveTypeKind.Binary; 133primitiveTypeKind = PrimitiveTypeKind.DateTimeOffset; 138primitiveTypeKind = PrimitiveTypeKind.Geography; 142primitiveTypeKind = PrimitiveTypeKind.Geometry; 146primitiveTypeKind = PrimitiveTypeKind.Guid; 150primitiveTypeKind = PrimitiveTypeKind.Time; 164resolvedPrimitiveTypeKind = default(PrimitiveTypeKind); 206primitiveTypes[(int)PrimitiveTypeKind.Binary] = CreatePrimitiveType(typeof(Byte[]), PrimitiveTypeKind.Binary); 207primitiveTypes[(int)PrimitiveTypeKind.Boolean] = CreatePrimitiveType(typeof(Boolean), PrimitiveTypeKind.Boolean); 208primitiveTypes[(int)PrimitiveTypeKind.Byte] = CreatePrimitiveType(typeof(Byte), PrimitiveTypeKind.Byte); 209primitiveTypes[(int)PrimitiveTypeKind.DateTime] = CreatePrimitiveType(typeof(DateTime), PrimitiveTypeKind.DateTime); 210primitiveTypes[(int)PrimitiveTypeKind.Time] = CreatePrimitiveType(typeof(TimeSpan), PrimitiveTypeKind.Time); 211primitiveTypes[(int)PrimitiveTypeKind.DateTimeOffset] = CreatePrimitiveType(typeof(DateTimeOffset), PrimitiveTypeKind.DateTimeOffset); 212primitiveTypes[(int)PrimitiveTypeKind.Decimal] = CreatePrimitiveType(typeof(Decimal), PrimitiveTypeKind.Decimal); 213primitiveTypes[(int)PrimitiveTypeKind.Double] = CreatePrimitiveType(typeof(Double), PrimitiveTypeKind.Double); 214primitiveTypes[(int)PrimitiveTypeKind.Geography] = CreatePrimitiveType(typeof(DbGeography), PrimitiveTypeKind.Geography); 215primitiveTypes[(int)PrimitiveTypeKind.Geometry] = CreatePrimitiveType(typeof(DbGeometry), PrimitiveTypeKind.Geometry); 216primitiveTypes[(int)PrimitiveTypeKind.Guid] = CreatePrimitiveType(typeof(Guid), PrimitiveTypeKind.Guid); 217primitiveTypes[(int)PrimitiveTypeKind.Int16] = CreatePrimitiveType(typeof(Int16), PrimitiveTypeKind.Int16); 218primitiveTypes[(int)PrimitiveTypeKind.Int32] = CreatePrimitiveType(typeof(Int32), PrimitiveTypeKind.Int32); 219primitiveTypes[(int)PrimitiveTypeKind.Int64] = CreatePrimitiveType(typeof(Int64), PrimitiveTypeKind.Int64); 220primitiveTypes[(int)PrimitiveTypeKind.SByte] = CreatePrimitiveType(typeof(SByte), PrimitiveTypeKind.SByte); 221primitiveTypes[(int)PrimitiveTypeKind.Single] = CreatePrimitiveType(typeof(Single), PrimitiveTypeKind.Single); 222primitiveTypes[(int)PrimitiveTypeKind.String] = CreatePrimitiveType(typeof(String), PrimitiveTypeKind.String); 235private PrimitiveType CreatePrimitiveType(Type clrType, PrimitiveTypeKind primitiveTypeKind)
System\Data\Metadata\Edm\Provider\EdmProviderManifest.cs (386)
108public PrimitiveType GetPrimitiveType(PrimitiveTypeKind primitiveTypeKind) 125primitiveTypes[(int)PrimitiveTypeKind.Binary] = new PrimitiveType(); 126primitiveTypes[(int)PrimitiveTypeKind.Boolean] = new PrimitiveType(); 127primitiveTypes[(int)PrimitiveTypeKind.Byte] = new PrimitiveType(); 128primitiveTypes[(int)PrimitiveTypeKind.DateTime] = new PrimitiveType(); 129primitiveTypes[(int)PrimitiveTypeKind.Decimal] = new PrimitiveType(); 130primitiveTypes[(int)PrimitiveTypeKind.Double] = new PrimitiveType(); 131primitiveTypes[(int)PrimitiveTypeKind.Single] = new PrimitiveType(); 132primitiveTypes[(int)PrimitiveTypeKind.Guid] = new PrimitiveType(); 133primitiveTypes[(int)PrimitiveTypeKind.Int16] = new PrimitiveType(); 134primitiveTypes[(int)PrimitiveTypeKind.Int32] = new PrimitiveType(); 135primitiveTypes[(int)PrimitiveTypeKind.Int64] = new PrimitiveType(); 136primitiveTypes[(int)PrimitiveTypeKind.SByte] = new PrimitiveType(); 137primitiveTypes[(int)PrimitiveTypeKind.String] = new PrimitiveType(); 138primitiveTypes[(int)PrimitiveTypeKind.Time] = new PrimitiveType(); 139primitiveTypes[(int)PrimitiveTypeKind.DateTimeOffset] = new PrimitiveType(); 140primitiveTypes[(int)PrimitiveTypeKind.Geometry] = new PrimitiveType(); 141primitiveTypes[(int)PrimitiveTypeKind.GeometryPoint] = new PrimitiveType(); 142primitiveTypes[(int)PrimitiveTypeKind.GeometryLineString] = new PrimitiveType(); 143primitiveTypes[(int)PrimitiveTypeKind.GeometryPolygon] = new PrimitiveType(); 144primitiveTypes[(int)PrimitiveTypeKind.GeometryMultiPoint] = new PrimitiveType(); 145primitiveTypes[(int)PrimitiveTypeKind.GeometryMultiLineString] = new PrimitiveType(); 146primitiveTypes[(int)PrimitiveTypeKind.GeometryMultiPolygon] = new PrimitiveType(); 147primitiveTypes[(int)PrimitiveTypeKind.GeometryCollection] = new PrimitiveType(); 148primitiveTypes[(int)PrimitiveTypeKind.Geography] = new PrimitiveType(); 149primitiveTypes[(int)PrimitiveTypeKind.GeographyPoint] = new PrimitiveType(); 150primitiveTypes[(int)PrimitiveTypeKind.GeographyLineString] = new PrimitiveType(); 151primitiveTypes[(int)PrimitiveTypeKind.GeographyPolygon] = new PrimitiveType(); 152primitiveTypes[(int)PrimitiveTypeKind.GeographyMultiPoint] = new PrimitiveType(); 153primitiveTypes[(int)PrimitiveTypeKind.GeographyMultiLineString] = new PrimitiveType(); 154primitiveTypes[(int)PrimitiveTypeKind.GeographyMultiPolygon] = new PrimitiveType(); 155primitiveTypes[(int)PrimitiveTypeKind.GeographyCollection] = new PrimitiveType(); 157InitializePrimitiveType(primitiveTypes[(int)PrimitiveTypeKind.Binary], PrimitiveTypeKind.Binary, EdmConstants.Binary, typeof(Byte[])); 158InitializePrimitiveType(primitiveTypes[(int)PrimitiveTypeKind.Boolean], PrimitiveTypeKind.Boolean, EdmConstants.Boolean, typeof(Boolean)); 159InitializePrimitiveType(primitiveTypes[(int)PrimitiveTypeKind.Byte], PrimitiveTypeKind.Byte, EdmConstants.Byte, typeof(Byte)); 160InitializePrimitiveType(primitiveTypes[(int)PrimitiveTypeKind.DateTime], PrimitiveTypeKind.DateTime, EdmConstants.DateTime, typeof(DateTime)); 161InitializePrimitiveType(primitiveTypes[(int)PrimitiveTypeKind.Decimal], PrimitiveTypeKind.Decimal, EdmConstants.Decimal, typeof(Decimal)); 162InitializePrimitiveType(primitiveTypes[(int)PrimitiveTypeKind.Double], PrimitiveTypeKind.Double, EdmConstants.Double, typeof(Double)); 163InitializePrimitiveType(primitiveTypes[(int)PrimitiveTypeKind.Single], PrimitiveTypeKind.Single, EdmConstants.Single, typeof(Single)); 164InitializePrimitiveType(primitiveTypes[(int)PrimitiveTypeKind.Guid], PrimitiveTypeKind.Guid, EdmConstants.Guid, typeof(Guid)); 165InitializePrimitiveType(primitiveTypes[(int)PrimitiveTypeKind.Int16], PrimitiveTypeKind.Int16, EdmConstants.Int16, typeof(Int16)); 166InitializePrimitiveType(primitiveTypes[(int)PrimitiveTypeKind.Int32], PrimitiveTypeKind.Int32, EdmConstants.Int32, typeof(Int32)); 167InitializePrimitiveType(primitiveTypes[(int)PrimitiveTypeKind.Int64], PrimitiveTypeKind.Int64, EdmConstants.Int64, typeof(Int64)); 168InitializePrimitiveType(primitiveTypes[(int)PrimitiveTypeKind.SByte], PrimitiveTypeKind.SByte, EdmConstants.SByte, typeof(SByte)); 169InitializePrimitiveType(primitiveTypes[(int)PrimitiveTypeKind.String], PrimitiveTypeKind.String, EdmConstants.String, typeof(String)); 170InitializePrimitiveType(primitiveTypes[(int)PrimitiveTypeKind.Time], PrimitiveTypeKind.Time, EdmConstants.Time, typeof(TimeSpan)); 171InitializePrimitiveType(primitiveTypes[(int)PrimitiveTypeKind.DateTimeOffset], PrimitiveTypeKind.DateTimeOffset, EdmConstants.DateTimeOffset, typeof(DateTimeOffset)); 172InitializePrimitiveType(primitiveTypes[(int)PrimitiveTypeKind.Geography], PrimitiveTypeKind.Geography, EdmConstants.Geography, typeof(DbGeography)); 173InitializePrimitiveType(primitiveTypes[(int)PrimitiveTypeKind.GeographyPoint], PrimitiveTypeKind.GeographyPoint, EdmConstants.GeographyPoint, typeof(DbGeography)); 174InitializePrimitiveType(primitiveTypes[(int)PrimitiveTypeKind.GeographyLineString], PrimitiveTypeKind.GeographyLineString, EdmConstants.GeographyLineString, typeof(DbGeography)); 175InitializePrimitiveType(primitiveTypes[(int)PrimitiveTypeKind.GeographyPolygon], PrimitiveTypeKind.GeographyPolygon, EdmConstants.GeographyPolygon, typeof(DbGeography)); 176InitializePrimitiveType(primitiveTypes[(int)PrimitiveTypeKind.GeographyMultiPoint], PrimitiveTypeKind.GeographyMultiPoint, EdmConstants.GeographyMultiPoint, typeof(DbGeography)); 177InitializePrimitiveType(primitiveTypes[(int)PrimitiveTypeKind.GeographyMultiLineString], PrimitiveTypeKind.GeographyMultiLineString, EdmConstants.GeographyMultiLineString, typeof(DbGeography)); 178InitializePrimitiveType(primitiveTypes[(int)PrimitiveTypeKind.GeographyMultiPolygon], PrimitiveTypeKind.GeographyMultiPolygon, EdmConstants.GeographyMultiPolygon, typeof(DbGeography)); 179InitializePrimitiveType(primitiveTypes[(int)PrimitiveTypeKind.GeographyCollection], PrimitiveTypeKind.GeographyCollection, EdmConstants.GeographyCollection, typeof(DbGeography)); 180InitializePrimitiveType(primitiveTypes[(int)PrimitiveTypeKind.Geometry], PrimitiveTypeKind.Geometry, EdmConstants.Geometry, typeof(DbGeometry)); 181InitializePrimitiveType(primitiveTypes[(int)PrimitiveTypeKind.GeometryPoint], PrimitiveTypeKind.GeometryPoint, EdmConstants.GeometryPoint, typeof(DbGeometry)); 182InitializePrimitiveType(primitiveTypes[(int)PrimitiveTypeKind.GeometryLineString], PrimitiveTypeKind.GeometryLineString, EdmConstants.GeometryLineString, typeof(DbGeometry)); 183InitializePrimitiveType(primitiveTypes[(int)PrimitiveTypeKind.GeometryPolygon], PrimitiveTypeKind.GeometryPolygon, EdmConstants.GeometryPolygon, typeof(DbGeometry)); 184InitializePrimitiveType(primitiveTypes[(int)PrimitiveTypeKind.GeometryMultiPoint], PrimitiveTypeKind.GeometryMultiPoint, EdmConstants.GeometryMultiPoint, typeof(DbGeometry)); 185InitializePrimitiveType(primitiveTypes[(int)PrimitiveTypeKind.GeometryMultiLineString], PrimitiveTypeKind.GeometryMultiLineString, EdmConstants.GeometryMultiLineString, typeof(DbGeometry)); 186InitializePrimitiveType(primitiveTypes[(int)PrimitiveTypeKind.GeometryMultiPolygon], PrimitiveTypeKind.GeometryMultiPolygon, EdmConstants.GeometryMultiPolygon, typeof(DbGeometry)); 187InitializePrimitiveType(primitiveTypes[(int)PrimitiveTypeKind.GeometryCollection], PrimitiveTypeKind.GeometryCollection, EdmConstants.GeometryCollection, typeof(DbGeometry)); 210PrimitiveTypeKind primitiveTypeKind, 244FacetDescription[] list = EdmProviderManifest.GetInitialFacetDescriptions(PrimitiveTypeKind.String); 245PrimitiveType applicableType = _primitiveTypes[(int)PrimitiveTypeKind.String]; 249list = EdmProviderManifest.GetInitialFacetDescriptions(PrimitiveTypeKind.Binary); 250applicableType = _primitiveTypes[(int)PrimitiveTypeKind.Binary]; 254list = EdmProviderManifest.GetInitialFacetDescriptions(PrimitiveTypeKind.DateTime); 255applicableType = _primitiveTypes[(int)PrimitiveTypeKind.DateTime]; 259list = EdmProviderManifest.GetInitialFacetDescriptions(PrimitiveTypeKind.Time); 260applicableType = _primitiveTypes[(int)PrimitiveTypeKind.Time]; 264list = EdmProviderManifest.GetInitialFacetDescriptions(PrimitiveTypeKind.DateTimeOffset); 265applicableType = _primitiveTypes[(int)PrimitiveTypeKind.DateTimeOffset]; 270list = EdmProviderManifest.GetInitialFacetDescriptions(PrimitiveTypeKind.Decimal); 271applicableType = _primitiveTypes[(int)PrimitiveTypeKind.Decimal]; 275list = EdmProviderManifest.GetInitialFacetDescriptions(PrimitiveTypeKind.Geography); 276applicableType = _primitiveTypes[(int)PrimitiveTypeKind.Geography]; 279list = EdmProviderManifest.GetInitialFacetDescriptions(PrimitiveTypeKind.GeographyPoint); 280applicableType = _primitiveTypes[(int)PrimitiveTypeKind.GeographyPoint]; 283list = EdmProviderManifest.GetInitialFacetDescriptions(PrimitiveTypeKind.GeographyLineString); 284applicableType = _primitiveTypes[(int)PrimitiveTypeKind.GeographyLineString]; 287list = EdmProviderManifest.GetInitialFacetDescriptions(PrimitiveTypeKind.GeographyPolygon); 288applicableType = _primitiveTypes[(int)PrimitiveTypeKind.GeographyPolygon]; 291list = EdmProviderManifest.GetInitialFacetDescriptions(PrimitiveTypeKind.GeographyMultiPoint); 292applicableType = _primitiveTypes[(int)PrimitiveTypeKind.GeographyMultiPoint]; 295list = EdmProviderManifest.GetInitialFacetDescriptions(PrimitiveTypeKind.GeographyMultiLineString); 296applicableType = _primitiveTypes[(int)PrimitiveTypeKind.GeographyMultiLineString]; 299list = EdmProviderManifest.GetInitialFacetDescriptions(PrimitiveTypeKind.GeographyMultiPolygon); 300applicableType = _primitiveTypes[(int)PrimitiveTypeKind.GeographyMultiPolygon]; 303list = EdmProviderManifest.GetInitialFacetDescriptions(PrimitiveTypeKind.GeographyCollection); 304applicableType = _primitiveTypes[(int)PrimitiveTypeKind.GeographyCollection]; 307list = EdmProviderManifest.GetInitialFacetDescriptions(PrimitiveTypeKind.Geometry); 308applicableType = _primitiveTypes[(int)PrimitiveTypeKind.Geometry]; 311list = EdmProviderManifest.GetInitialFacetDescriptions(PrimitiveTypeKind.GeometryPoint); 312applicableType = _primitiveTypes[(int)PrimitiveTypeKind.GeometryPoint]; 315list = EdmProviderManifest.GetInitialFacetDescriptions(PrimitiveTypeKind.GeometryLineString); 316applicableType = _primitiveTypes[(int)PrimitiveTypeKind.GeometryLineString]; 319list = EdmProviderManifest.GetInitialFacetDescriptions(PrimitiveTypeKind.GeometryPolygon); 320applicableType = _primitiveTypes[(int)PrimitiveTypeKind.GeometryPolygon]; 323list = EdmProviderManifest.GetInitialFacetDescriptions(PrimitiveTypeKind.GeometryMultiPoint); 324applicableType = _primitiveTypes[(int)PrimitiveTypeKind.GeometryMultiPoint]; 327list = EdmProviderManifest.GetInitialFacetDescriptions(PrimitiveTypeKind.GeometryMultiLineString); 328applicableType = _primitiveTypes[(int)PrimitiveTypeKind.GeometryMultiLineString]; 331list = EdmProviderManifest.GetInitialFacetDescriptions(PrimitiveTypeKind.GeometryMultiPolygon); 332applicableType = _primitiveTypes[(int)PrimitiveTypeKind.GeometryMultiPolygon]; 335list = EdmProviderManifest.GetInitialFacetDescriptions(PrimitiveTypeKind.GeometryCollection); 336applicableType = _primitiveTypes[(int)PrimitiveTypeKind.GeometryCollection]; 345internal static FacetDescription[] GetInitialFacetDescriptions(PrimitiveTypeKind primitiveTypeKind) 351case PrimitiveTypeKind.String: 356MetadataItem.EdmProviderManifest.GetPrimitiveType(PrimitiveTypeKind.Int32), 361MetadataItem.EdmProviderManifest.GetPrimitiveType(PrimitiveTypeKind.Boolean), 366MetadataItem.EdmProviderManifest.GetPrimitiveType(PrimitiveTypeKind.Boolean), 374case PrimitiveTypeKind.Binary: 379MetadataItem.EdmProviderManifest.GetPrimitiveType(PrimitiveTypeKind.Int32), 384MetadataItem.EdmProviderManifest.GetPrimitiveType(PrimitiveTypeKind.Boolean), 391case PrimitiveTypeKind.DateTime: 396MetadataItem.EdmProviderManifest.GetPrimitiveType(PrimitiveTypeKind.Byte), 401case PrimitiveTypeKind.Time: 406MetadataItem.EdmProviderManifest.GetPrimitiveType(PrimitiveTypeKind.Byte), 411case PrimitiveTypeKind.DateTimeOffset: 415MetadataItem.EdmProviderManifest.GetPrimitiveType(PrimitiveTypeKind.Byte), 420case PrimitiveTypeKind.Decimal: 425MetadataItem.EdmProviderManifest.GetPrimitiveType(PrimitiveTypeKind.Byte), 430MetadataItem.EdmProviderManifest.GetPrimitiveType(PrimitiveTypeKind.Byte), 436case PrimitiveTypeKind.Geometry: 437case PrimitiveTypeKind.GeometryPoint: 438case PrimitiveTypeKind.GeometryLineString: 439case PrimitiveTypeKind.GeometryPolygon: 440case PrimitiveTypeKind.GeometryMultiPoint: 441case PrimitiveTypeKind.GeometryMultiLineString: 442case PrimitiveTypeKind.GeometryMultiPolygon: 443case PrimitiveTypeKind.GeometryCollection: 448MetadataItem.EdmProviderManifest.GetPrimitiveType(PrimitiveTypeKind.Int32), 453MetadataItem.EdmProviderManifest.GetPrimitiveType(PrimitiveTypeKind.Boolean), 459case PrimitiveTypeKind.Geography: 460case PrimitiveTypeKind.GeographyPoint: 461case PrimitiveTypeKind.GeographyLineString: 462case PrimitiveTypeKind.GeographyPolygon: 463case PrimitiveTypeKind.GeographyMultiPoint: 464case PrimitiveTypeKind.GeographyMultiLineString: 465case PrimitiveTypeKind.GeographyMultiPolygon: 466case PrimitiveTypeKind.GeographyCollection: 471MetadataItem.EdmProviderManifest.GetPrimitiveType(PrimitiveTypeKind.Int32), 476MetadataItem.EdmProviderManifest.GetPrimitiveType(PrimitiveTypeKind.Boolean), 501PrimitiveTypeKind[] parameterTypes; 506parameterTypes = new[] { PrimitiveTypeKind.Byte, 507PrimitiveTypeKind.DateTime, 508PrimitiveTypeKind.Decimal, 509PrimitiveTypeKind.Double, 510PrimitiveTypeKind.Int16, 511PrimitiveTypeKind.Int32, 512PrimitiveTypeKind.Int64, 513PrimitiveTypeKind.SByte, 514PrimitiveTypeKind.Single, 515PrimitiveTypeKind.String, 516PrimitiveTypeKind.Binary, 517PrimitiveTypeKind.Time, 518PrimitiveTypeKind.DateTimeOffset }; 524parameterTypes = new[] { PrimitiveTypeKind.Decimal, 525PrimitiveTypeKind.Double, 526PrimitiveTypeKind.Int32, 527PrimitiveTypeKind.Int64 }; 533parameterTypes = new[] { PrimitiveTypeKind.Decimal, 534PrimitiveTypeKind.Double, 535PrimitiveTypeKind.Int32, 536PrimitiveTypeKind.Int64}; 538functions.ForTypes(parameterTypes, type => functions.AddAggregate(PrimitiveTypeKind.Double, "StDev", type)); 539functions.ForTypes(parameterTypes, type => functions.AddAggregate(PrimitiveTypeKind.Double, "StDevP", type)); 540functions.ForTypes(parameterTypes, type => functions.AddAggregate(PrimitiveTypeKind.Double, "Var", type)); 541functions.ForTypes(parameterTypes, type => functions.AddAggregate(PrimitiveTypeKind.Double, "VarP", type)); 544functions.ForAllBasePrimitiveTypes(type => functions.AddAggregate(PrimitiveTypeKind.Int32, "Count", type)); 545functions.ForAllBasePrimitiveTypes(type => functions.AddAggregate(PrimitiveTypeKind.Int64, "BigCount", type)); 551functions.AddFunction(PrimitiveTypeKind.String, "Trim", PrimitiveTypeKind.String, "stringArgument"); 552functions.AddFunction(PrimitiveTypeKind.String, "RTrim", PrimitiveTypeKind.String, "stringArgument"); 553functions.AddFunction(PrimitiveTypeKind.String, "LTrim", PrimitiveTypeKind.String, "stringArgument"); 554functions.AddFunction(PrimitiveTypeKind.String, "Concat", PrimitiveTypeKind.String, "string1", PrimitiveTypeKind.String, "string2"); 555functions.AddFunction(PrimitiveTypeKind.Int32, "Length", PrimitiveTypeKind.String, "stringArgument"); 558parameterTypes = new[] { PrimitiveTypeKind.Byte, 559PrimitiveTypeKind.Int16, 560PrimitiveTypeKind.Int32, 561PrimitiveTypeKind.Int64, 562PrimitiveTypeKind.SByte }; 564functions.ForTypes(parameterTypes, type => functions.AddFunction(PrimitiveTypeKind.String, "Substring", PrimitiveTypeKind.String, "stringArgument", type, "start", type, "length")); 565functions.ForTypes(parameterTypes, type => functions.AddFunction(PrimitiveTypeKind.String, "Left", PrimitiveTypeKind.String, "stringArgument", type, "length")); 566functions.ForTypes(parameterTypes, type => functions.AddFunction(PrimitiveTypeKind.String, "Right", PrimitiveTypeKind.String, "stringArgument", type, "length")); 568functions.AddFunction(PrimitiveTypeKind.String, "Replace", PrimitiveTypeKind.String, "stringArgument", PrimitiveTypeKind.String, "toReplace", PrimitiveTypeKind.String, "replacement"); 569functions.AddFunction(PrimitiveTypeKind.Int32, "IndexOf", PrimitiveTypeKind.String, "searchString", PrimitiveTypeKind.String, "stringToFind"); 570functions.AddFunction(PrimitiveTypeKind.String, "ToUpper", PrimitiveTypeKind.String, "stringArgument"); 571functions.AddFunction(PrimitiveTypeKind.String, "ToLower", PrimitiveTypeKind.String, "stringArgument"); 572functions.AddFunction(PrimitiveTypeKind.String, "Reverse", PrimitiveTypeKind.String, "stringArgument"); 573functions.AddFunction(PrimitiveTypeKind.Boolean, "Contains", PrimitiveTypeKind.String, "searchedString", PrimitiveTypeKind.String, "searchedForString"); 574functions.AddFunction(PrimitiveTypeKind.Boolean, "StartsWith", PrimitiveTypeKind.String, "stringArgument", PrimitiveTypeKind.String, "prefix"); 575functions.AddFunction(PrimitiveTypeKind.Boolean, "EndsWith", PrimitiveTypeKind.String, "stringArgument", PrimitiveTypeKind.String, "suffix"); 581PrimitiveTypeKind[] dateTimeParameterTypes = { PrimitiveTypeKind.DateTimeOffset, 582PrimitiveTypeKind.DateTime }; 583functions.ForTypes(dateTimeParameterTypes, type => functions.AddFunction(PrimitiveTypeKind.Int32, "Year", type, "dateValue")); 584functions.ForTypes(dateTimeParameterTypes, type => functions.AddFunction(PrimitiveTypeKind.Int32, "Month", type, "dateValue")); 585functions.ForTypes(dateTimeParameterTypes, type => functions.AddFunction(PrimitiveTypeKind.Int32, "Day", type, "dateValue")); 586functions.ForTypes(dateTimeParameterTypes, type => functions.AddFunction(PrimitiveTypeKind.Int32, "DayOfYear", type, "dateValue")); 588PrimitiveTypeKind[] timeParameterTypes = { PrimitiveTypeKind.DateTimeOffset, 589PrimitiveTypeKind.DateTime, 590PrimitiveTypeKind.Time }; 591functions.ForTypes(timeParameterTypes, type => functions.AddFunction(PrimitiveTypeKind.Int32, "Hour", type, "timeValue")); 592functions.ForTypes(timeParameterTypes, type => functions.AddFunction(PrimitiveTypeKind.Int32, "Minute", type, "timeValue")); 593functions.ForTypes(timeParameterTypes, type => functions.AddFunction(PrimitiveTypeKind.Int32, "Second", type, "timeValue")); 594functions.ForTypes(timeParameterTypes, type => functions.AddFunction(PrimitiveTypeKind.Int32, "Millisecond", type, "timeValue")); 596functions.AddFunction(PrimitiveTypeKind.DateTime, "CurrentDateTime"); 597functions.AddFunction(PrimitiveTypeKind.DateTimeOffset, "CurrentDateTimeOffset"); 598functions.AddFunction(PrimitiveTypeKind.Int32, "GetTotalOffsetMinutes", PrimitiveTypeKind.DateTimeOffset, "dateTimeOffsetArgument"); 599functions.AddFunction(PrimitiveTypeKind.DateTime, "CurrentUtcDateTime"); 605functions.AddFunction(PrimitiveTypeKind.DateTime, "CreateDateTime", PrimitiveTypeKind.Int32, "year", 606PrimitiveTypeKind.Int32, "month", 607PrimitiveTypeKind.Int32, "day", 608PrimitiveTypeKind.Int32, "hour", 609PrimitiveTypeKind.Int32, "minute", 610PrimitiveTypeKind.Double, "second"); 614functions.AddFunction(PrimitiveTypeKind.DateTimeOffset, "CreateDateTimeOffset", PrimitiveTypeKind.Int32, "year", 615PrimitiveTypeKind.Int32, "month", 616PrimitiveTypeKind.Int32, "day", 617PrimitiveTypeKind.Int32, "hour", 618PrimitiveTypeKind.Int32, "minute", 619PrimitiveTypeKind.Double, "second", 620PrimitiveTypeKind.Int32, "timeZoneOffset"); 623functions.AddFunction(PrimitiveTypeKind.Time, "CreateTime", PrimitiveTypeKind.Int32, "hour", PrimitiveTypeKind.Int32, "minute", PrimitiveTypeKind.Double, "second"); 626functions.ForTypes(dateTimeParameterTypes, type => functions.AddFunction(type, "AddYears", type, "dateValue", PrimitiveTypeKind.Int32, "addValue")); 627functions.ForTypes(dateTimeParameterTypes, type => functions.AddFunction(type, "AddMonths", type, "dateValue", PrimitiveTypeKind.Int32, "addValue")); 628functions.ForTypes(dateTimeParameterTypes, type => functions.AddFunction(type, "AddDays", type, "dateValue", PrimitiveTypeKind.Int32, "addValue")); 630functions.ForTypes(timeParameterTypes, type => functions.AddFunction(type, "AddHours", type, "timeValue", PrimitiveTypeKind.Int32, "addValue")); 631functions.ForTypes(timeParameterTypes, type => functions.AddFunction(type, "AddMinutes", type, "timeValue", PrimitiveTypeKind.Int32, "addValue")); 632functions.ForTypes(timeParameterTypes, type => functions.AddFunction(type, "AddSeconds", type, "timeValue", PrimitiveTypeKind.Int32, "addValue")); 633functions.ForTypes(timeParameterTypes, type => functions.AddFunction(type, "AddMilliseconds", type, "timeValue", PrimitiveTypeKind.Int32, "addValue")); 634functions.ForTypes(timeParameterTypes, type => functions.AddFunction(type, "AddMicroseconds", type, "timeValue", PrimitiveTypeKind.Int32, "addValue")); 635functions.ForTypes(timeParameterTypes, type => functions.AddFunction(type, "AddNanoseconds", type, "timeValue", PrimitiveTypeKind.Int32, "addValue")); 638functions.ForTypes(dateTimeParameterTypes, type => functions.AddFunction(PrimitiveTypeKind.Int32, "DiffYears", type, "dateValue1", type, "dateValue2")); 639functions.ForTypes(dateTimeParameterTypes, type => functions.AddFunction(PrimitiveTypeKind.Int32, "DiffMonths", type, "dateValue1", type, "dateValue2")); 640functions.ForTypes(dateTimeParameterTypes, type => functions.AddFunction(PrimitiveTypeKind.Int32, "DiffDays", type, "dateValue1", type, "dateValue2")); 642functions.ForTypes(timeParameterTypes, type => functions.AddFunction(PrimitiveTypeKind.Int32, "DiffHours", type, "timeValue1", type, "timeValue2")); 643functions.ForTypes(timeParameterTypes, type => functions.AddFunction(PrimitiveTypeKind.Int32, "DiffMinutes", type, "timeValue1", type, "timeValue2")); 644functions.ForTypes(timeParameterTypes, type => functions.AddFunction(PrimitiveTypeKind.Int32, "DiffSeconds", type, "timeValue1", type, "timeValue2")); 645functions.ForTypes(timeParameterTypes, type => functions.AddFunction(PrimitiveTypeKind.Int32, "DiffMilliseconds", type, "timeValue1", type, "timeValue2")); 646functions.ForTypes(timeParameterTypes, type => functions.AddFunction(PrimitiveTypeKind.Int32, "DiffMicroseconds", type, "timeValue1", type, "timeValue2")); 647functions.ForTypes(timeParameterTypes, type => functions.AddFunction(PrimitiveTypeKind.Int32, "DiffNanoseconds", type, "timeValue1", type, "timeValue2")); 654parameterTypes = new[] { PrimitiveTypeKind.Single, 655PrimitiveTypeKind.Double, 656PrimitiveTypeKind.Decimal }; 662parameterTypes = new [] { PrimitiveTypeKind.Double, 663PrimitiveTypeKind.Decimal }; 664functions.ForTypes(parameterTypes, type => functions.AddFunction(type, "Round", type, "value", PrimitiveTypeKind.Int32, "digits")); 665functions.ForTypes(parameterTypes, type => functions.AddFunction(type, "Truncate", type, "value", PrimitiveTypeKind.Int32, "digits")); 668parameterTypes = new[] { PrimitiveTypeKind.Decimal, 669PrimitiveTypeKind.Double, 670PrimitiveTypeKind.Int16, 671PrimitiveTypeKind.Int32, 672PrimitiveTypeKind.Int64, 673PrimitiveTypeKind.Byte, 674PrimitiveTypeKind.Single }; 678PrimitiveTypeKind[] powerFirstParameterTypes = { PrimitiveTypeKind.Decimal, 679PrimitiveTypeKind.Double, 680PrimitiveTypeKind.Int32, 681PrimitiveTypeKind.Int64}; 683PrimitiveTypeKind[] powerSecondParameterTypes = { PrimitiveTypeKind.Decimal, 684PrimitiveTypeKind.Double, 685PrimitiveTypeKind.Int64 }; 687foreach (PrimitiveTypeKind kind1 in powerFirstParameterTypes) 689foreach (PrimitiveTypeKind kind2 in powerSecondParameterTypes) 700parameterTypes = new[] { PrimitiveTypeKind.Int16, 701PrimitiveTypeKind.Int32, 702PrimitiveTypeKind.Int64, 703PrimitiveTypeKind.Byte }; 714functions.AddFunction(PrimitiveTypeKind.Guid, "NewGuid"); 762promotionTypes[(int)PrimitiveTypeKind.Byte] = new System.Collections.ObjectModel.ReadOnlyCollection<PrimitiveType>(new PrimitiveType[] { 763_primitiveTypes[(int)PrimitiveTypeKind.Byte], 764_primitiveTypes[(int)PrimitiveTypeKind.Int16], 765_primitiveTypes[(int)PrimitiveTypeKind.Int32], 766_primitiveTypes[(int)PrimitiveTypeKind.Int64], 767_primitiveTypes[(int)PrimitiveTypeKind.Decimal], 768_primitiveTypes[(int)PrimitiveTypeKind.Single], 769_primitiveTypes[(int)PrimitiveTypeKind.Double] 775promotionTypes[(int)PrimitiveTypeKind.Int16] = new System.Collections.ObjectModel.ReadOnlyCollection<PrimitiveType>(new PrimitiveType[] { 776_primitiveTypes[(int)PrimitiveTypeKind.Int16], 777_primitiveTypes[(int)PrimitiveTypeKind.Int32], 778_primitiveTypes[(int)PrimitiveTypeKind.Int64], 779_primitiveTypes[(int)PrimitiveTypeKind.Decimal], 780_primitiveTypes[(int)PrimitiveTypeKind.Single], 781_primitiveTypes[(int)PrimitiveTypeKind.Double] 787promotionTypes[(int)PrimitiveTypeKind.Int32] = new System.Collections.ObjectModel.ReadOnlyCollection<PrimitiveType>(new PrimitiveType[] { 788_primitiveTypes[(int)PrimitiveTypeKind.Int32], 789_primitiveTypes[(int)PrimitiveTypeKind.Int64], 790_primitiveTypes[(int)PrimitiveTypeKind.Decimal], 791_primitiveTypes[(int)PrimitiveTypeKind.Single], 792_primitiveTypes[(int)PrimitiveTypeKind.Double] 798promotionTypes[(int)PrimitiveTypeKind.Int64] = new System.Collections.ObjectModel.ReadOnlyCollection<PrimitiveType>(new PrimitiveType[] { 799_primitiveTypes[(int)PrimitiveTypeKind.Int64], 800_primitiveTypes[(int)PrimitiveTypeKind.Decimal], 801_primitiveTypes[(int)PrimitiveTypeKind.Single], 802_primitiveTypes[(int)PrimitiveTypeKind.Double] 808promotionTypes[(int)PrimitiveTypeKind.Single] = new System.Collections.ObjectModel.ReadOnlyCollection<PrimitiveType>(new PrimitiveType[] { 809_primitiveTypes[(int)PrimitiveTypeKind.Single], 810_primitiveTypes[(int)PrimitiveTypeKind.Double] 815new PrimitiveTypeKind[] { 816PrimitiveTypeKind.GeographyPoint, PrimitiveTypeKind.GeographyLineString, PrimitiveTypeKind.GeographyPolygon, 817PrimitiveTypeKind.GeographyMultiPoint, PrimitiveTypeKind.GeographyMultiLineString, PrimitiveTypeKind.GeographyMultiPolygon, 818PrimitiveTypeKind.GeographyCollection}, 819PrimitiveTypeKind.Geography); 823new PrimitiveTypeKind[] { 824PrimitiveTypeKind.GeometryPoint, PrimitiveTypeKind.GeometryLineString, PrimitiveTypeKind.GeometryPolygon, 825PrimitiveTypeKind.GeometryMultiPoint, PrimitiveTypeKind.GeometryMultiLineString, PrimitiveTypeKind.GeometryMultiPolygon, 826PrimitiveTypeKind.GeometryCollection}, 827PrimitiveTypeKind.Geometry); 834private void InitializeSpatialPromotionGroup(System.Collections.ObjectModel.ReadOnlyCollection<PrimitiveType>[] promotionTypes, PrimitiveTypeKind[] promotableKinds, PrimitiveTypeKind baseKind) 836foreach (PrimitiveTypeKind promotableKind in promotableKinds) 845internal TypeUsage GetCanonicalModelTypeUsage(PrimitiveTypeKind primitiveTypeKind)
System\Data\Metadata\Edm\Provider\EdmProviderManifestFunctionBuilder.cs (61)
44internal void ForAllTypes(Action<PrimitiveTypeKind> forEachType) 48forEachType((PrimitiveTypeKind)idx); 52internal void ForAllBasePrimitiveTypes(Action<PrimitiveTypeKind> forEachType) 56PrimitiveTypeKind typeKind = (PrimitiveTypeKind)idx; 64internal void ForTypes(IEnumerable<PrimitiveTypeKind> typeKinds, Action<PrimitiveTypeKind> forEachType) 66foreach (PrimitiveTypeKind kind in typeKinds) 72internal void AddAggregate(string aggregateFunctionName, PrimitiveTypeKind collectionArgumentElementTypeKind) 77internal void AddAggregate(PrimitiveTypeKind returnTypeKind, string aggregateFunctionName, PrimitiveTypeKind collectionArgumentElementTypeKind) 101internal void AddFunction(PrimitiveTypeKind returnType, string functionName) 103this.AddFunction(returnType, functionName, new KeyValuePair<string, PrimitiveTypeKind>[] { }); 106internal void AddFunction(PrimitiveTypeKind returnType, string functionName, PrimitiveTypeKind argumentTypeKind, string argumentName) 108this.AddFunction(returnType, functionName, new[] { new KeyValuePair<string, PrimitiveTypeKind>(argumentName, argumentTypeKind) }); 111internal void AddFunction(PrimitiveTypeKind returnType, string functionName, PrimitiveTypeKind argument1TypeKind, string argument1Name, PrimitiveTypeKind argument2TypeKind, string argument2Name) 114new[] { new KeyValuePair<string, PrimitiveTypeKind>(argument1Name, argument1TypeKind), 115new KeyValuePair<string, PrimitiveTypeKind>(argument2Name, argument2TypeKind)}); 118internal void AddFunction(PrimitiveTypeKind returnType, string functionName, PrimitiveTypeKind argument1TypeKind, string argument1Name, PrimitiveTypeKind argument2TypeKind, string argument2Name, PrimitiveTypeKind argument3TypeKind, string argument3Name) 121new[] { new KeyValuePair<string, PrimitiveTypeKind>(argument1Name, argument1TypeKind), 122new KeyValuePair<string, PrimitiveTypeKind>(argument2Name, argument2TypeKind), 123new KeyValuePair<string, PrimitiveTypeKind>(argument3Name, argument3TypeKind)}); 126internal void AddFunction(PrimitiveTypeKind returnType, string functionName, PrimitiveTypeKind argument1TypeKind, string argument1Name, 127PrimitiveTypeKind argument2TypeKind, string argument2Name, 128PrimitiveTypeKind argument3TypeKind, string argument3Name, 129PrimitiveTypeKind argument4TypeKind, string argument4Name, 130PrimitiveTypeKind argument5TypeKind, string argument5Name, 131PrimitiveTypeKind argument6TypeKind, string argument6Name) 134new[] { new KeyValuePair<string, PrimitiveTypeKind>(argument1Name, argument1TypeKind), 135new KeyValuePair<string, PrimitiveTypeKind>(argument2Name, argument2TypeKind), 136new KeyValuePair<string, PrimitiveTypeKind>(argument3Name, argument3TypeKind), 137new KeyValuePair<string, PrimitiveTypeKind>(argument4Name, argument4TypeKind), 138new KeyValuePair<string, PrimitiveTypeKind>(argument5Name, argument5TypeKind), 139new KeyValuePair<string, PrimitiveTypeKind>(argument6Name, argument6TypeKind)}); 142internal void AddFunction(PrimitiveTypeKind returnType, string functionName, PrimitiveTypeKind argument1TypeKind, string argument1Name, 143PrimitiveTypeKind argument2TypeKind, string argument2Name, 144PrimitiveTypeKind argument3TypeKind, string argument3Name, 145PrimitiveTypeKind argument4TypeKind, string argument4Name, 146PrimitiveTypeKind argument5TypeKind, string argument5Name, 147PrimitiveTypeKind argument6TypeKind, string argument6Name, 148PrimitiveTypeKind argument7TypeKind, string argument7Name) 151new[] { new KeyValuePair<string, PrimitiveTypeKind>(argument1Name, argument1TypeKind), 152new KeyValuePair<string, PrimitiveTypeKind>(argument2Name, argument2TypeKind), 153new KeyValuePair<string, PrimitiveTypeKind>(argument3Name, argument3TypeKind), 154new KeyValuePair<string, PrimitiveTypeKind>(argument4Name, argument4TypeKind), 155new KeyValuePair<string, PrimitiveTypeKind>(argument5Name, argument5TypeKind), 156new KeyValuePair<string, PrimitiveTypeKind>(argument6Name, argument6TypeKind), 157new KeyValuePair<string, PrimitiveTypeKind>(argument7Name, argument7TypeKind)}); 160private void AddFunction(PrimitiveTypeKind returnType, string functionName, KeyValuePair<string, PrimitiveTypeKind>[] parameterDefinitions) 181private FunctionParameter CreateParameter(PrimitiveTypeKind primitiveParameterType, string parameterName) 186private FunctionParameter CreateAggregateParameter(PrimitiveTypeKind collectionParameterTypeElementTypeKind) 191private FunctionParameter CreateReturnParameter(PrimitiveTypeKind primitiveReturnType)
System\Data\Metadata\Edm\Provider\EdmProviderManifestSpatialFunctions.cs (294)
30functions.AddFunction(PrimitiveTypeKind.Geometry, "GeometryFromText", PrimitiveTypeKind.String, "geometryText"); 31functions.AddFunction(PrimitiveTypeKind.Geometry, "GeometryFromText", PrimitiveTypeKind.String, "geometryText", PrimitiveTypeKind.Int32, "srid"); 32functions.AddFunction(PrimitiveTypeKind.Geometry, "GeometryPointFromText", PrimitiveTypeKind.String, "pointText", PrimitiveTypeKind.Int32, "srid"); 33functions.AddFunction(PrimitiveTypeKind.Geometry, "GeometryLineFromText", PrimitiveTypeKind.String, "lineText", PrimitiveTypeKind.Int32, "srid"); 34functions.AddFunction(PrimitiveTypeKind.Geometry, "GeometryPolygonFromText", PrimitiveTypeKind.String, "polygonText", PrimitiveTypeKind.Int32, "srid"); 35functions.AddFunction(PrimitiveTypeKind.Geometry, "GeometryMultiPointFromText", PrimitiveTypeKind.String, "multiPointText", PrimitiveTypeKind.Int32, "srid"); 36functions.AddFunction(PrimitiveTypeKind.Geometry, "GeometryMultiLineFromText", PrimitiveTypeKind.String, "multiLineText", PrimitiveTypeKind.Int32, "srid"); 37functions.AddFunction(PrimitiveTypeKind.Geometry, "GeometryMultiPolygonFromText", PrimitiveTypeKind.String, "multiPolygonText", PrimitiveTypeKind.Int32, "srid"); 38functions.AddFunction(PrimitiveTypeKind.Geometry, "GeometryCollectionFromText", PrimitiveTypeKind.String, "geometryCollectionText", PrimitiveTypeKind.Int32, "srid"); 39functions.AddFunction(PrimitiveTypeKind.Geometry, "GeometryFromBinary", PrimitiveTypeKind.Binary, "geometryBytes"); 40functions.AddFunction(PrimitiveTypeKind.Geometry, "GeometryFromBinary", PrimitiveTypeKind.Binary, "geometryBytes", PrimitiveTypeKind.Int32, "srid"); 41functions.AddFunction(PrimitiveTypeKind.Geometry, "GeometryPointFromBinary", PrimitiveTypeKind.Binary, "pointBytes", PrimitiveTypeKind.Int32, "srid"); 42functions.AddFunction(PrimitiveTypeKind.Geometry, "GeometryLineFromBinary", PrimitiveTypeKind.Binary, "lineBytes", PrimitiveTypeKind.Int32, "srid"); 43functions.AddFunction(PrimitiveTypeKind.Geometry, "GeometryPolygonFromBinary", PrimitiveTypeKind.Binary, "polygonBytes", PrimitiveTypeKind.Int32, "srid"); 44functions.AddFunction(PrimitiveTypeKind.Geometry, "GeometryMultiPointFromBinary", PrimitiveTypeKind.Binary, "multiPointBytes", PrimitiveTypeKind.Int32, "srid"); 45functions.AddFunction(PrimitiveTypeKind.Geometry, "GeometryMultiLineFromBinary", PrimitiveTypeKind.Binary, "multiLineBytes", PrimitiveTypeKind.Int32, "srid"); 46functions.AddFunction(PrimitiveTypeKind.Geometry, "GeometryMultiPolygonFromBinary", PrimitiveTypeKind.Binary, "multiPolygonBytes", PrimitiveTypeKind.Int32, "srid"); 47functions.AddFunction(PrimitiveTypeKind.Geometry, "GeometryCollectionFromBinary", PrimitiveTypeKind.Binary, "geometryCollectionBytes", PrimitiveTypeKind.Int32, "srid"); 48functions.AddFunction(PrimitiveTypeKind.Geometry, "GeometryFromGml", PrimitiveTypeKind.String, "geometryGml"); 49functions.AddFunction(PrimitiveTypeKind.Geometry, "GeometryFromGml", PrimitiveTypeKind.String, "geometryGml", PrimitiveTypeKind.Int32, "srid"); 50functions.AddFunction(PrimitiveTypeKind.Int32, "CoordinateSystemId", PrimitiveTypeKind.Geometry, "geometryValue"); 51functions.AddFunction(PrimitiveTypeKind.String, "SpatialTypeName", PrimitiveTypeKind.Geometry, "geometryValue"); 52functions.AddFunction(PrimitiveTypeKind.Int32, "SpatialDimension", PrimitiveTypeKind.Geometry, "geometryValue"); 53functions.AddFunction(PrimitiveTypeKind.Geometry, "SpatialEnvelope", PrimitiveTypeKind.Geometry, "geometryValue"); 54functions.AddFunction(PrimitiveTypeKind.Binary, "AsBinary", PrimitiveTypeKind.Geometry, "geometryValue"); 55functions.AddFunction(PrimitiveTypeKind.String, "AsGml", PrimitiveTypeKind.Geometry, "geometryValue"); 56functions.AddFunction(PrimitiveTypeKind.String, "AsText", PrimitiveTypeKind.Geometry, "geometryValue"); 57functions.AddFunction(PrimitiveTypeKind.Boolean, "IsEmptySpatial", PrimitiveTypeKind.Geometry, "geometryValue"); 58functions.AddFunction(PrimitiveTypeKind.Boolean, "IsSimpleGeometry", PrimitiveTypeKind.Geometry, "geometryValue"); 59functions.AddFunction(PrimitiveTypeKind.Geometry, "SpatialBoundary", PrimitiveTypeKind.Geometry, "geometryValue"); 60functions.AddFunction(PrimitiveTypeKind.Boolean, "IsValidGeometry", PrimitiveTypeKind.Geometry, "geometryValue"); 61functions.AddFunction(PrimitiveTypeKind.Boolean, "SpatialEquals", PrimitiveTypeKind.Geometry, "geometryValue1", PrimitiveTypeKind.Geometry, "geometryValue2"); 62functions.AddFunction(PrimitiveTypeKind.Boolean, "SpatialDisjoint", PrimitiveTypeKind.Geometry, "geometryValue1", PrimitiveTypeKind.Geometry, "geometryValue2"); 63functions.AddFunction(PrimitiveTypeKind.Boolean, "SpatialIntersects", PrimitiveTypeKind.Geometry, "geometryValue1", PrimitiveTypeKind.Geometry, "geometryValue2"); 64functions.AddFunction(PrimitiveTypeKind.Boolean, "SpatialTouches", PrimitiveTypeKind.Geometry, "geometryValue1", PrimitiveTypeKind.Geometry, "geometryValue2"); 65functions.AddFunction(PrimitiveTypeKind.Boolean, "SpatialCrosses", PrimitiveTypeKind.Geometry, "geometryValue1", PrimitiveTypeKind.Geometry, "geometryValue2"); 66functions.AddFunction(PrimitiveTypeKind.Boolean, "SpatialWithin", PrimitiveTypeKind.Geometry, "geometryValue1", PrimitiveTypeKind.Geometry, "geometryValue2"); 67functions.AddFunction(PrimitiveTypeKind.Boolean, "SpatialContains", PrimitiveTypeKind.Geometry, "geometryValue1", PrimitiveTypeKind.Geometry, "geometryValue2"); 68functions.AddFunction(PrimitiveTypeKind.Boolean, "SpatialOverlaps", PrimitiveTypeKind.Geometry, "geometryValue1", PrimitiveTypeKind.Geometry, "geometryValue2"); 69functions.AddFunction(PrimitiveTypeKind.Boolean, "SpatialRelate", PrimitiveTypeKind.Geometry, "geometryValue1", PrimitiveTypeKind.Geometry, "geometryValue2", PrimitiveTypeKind.String, "matrix"); 70functions.AddFunction(PrimitiveTypeKind.Geometry, "SpatialBuffer", PrimitiveTypeKind.Geometry, "geometryValue", PrimitiveTypeKind.Double, "distance"); 71functions.AddFunction(PrimitiveTypeKind.Double, "Distance", PrimitiveTypeKind.Geometry, "geometryValue1", PrimitiveTypeKind.Geometry, "geometryValue2"); 72functions.AddFunction(PrimitiveTypeKind.Geometry, "SpatialConvexHull", PrimitiveTypeKind.Geometry, "geometryValue"); 73functions.AddFunction(PrimitiveTypeKind.Geometry, "SpatialIntersection", PrimitiveTypeKind.Geometry, "geometryValue1", PrimitiveTypeKind.Geometry, "geometryValue2"); 74functions.AddFunction(PrimitiveTypeKind.Geometry, "SpatialUnion", PrimitiveTypeKind.Geometry, "geometryValue1", PrimitiveTypeKind.Geometry, "geometryValue2"); 75functions.AddFunction(PrimitiveTypeKind.Geometry, "SpatialDifference", PrimitiveTypeKind.Geometry, "geometryValue1", PrimitiveTypeKind.Geometry, "geometryValue2"); 76functions.AddFunction(PrimitiveTypeKind.Geometry, "SpatialSymmetricDifference", PrimitiveTypeKind.Geometry, "geometryValue1", PrimitiveTypeKind.Geometry, "geometryValue2"); 77functions.AddFunction(PrimitiveTypeKind.Int32, "SpatialElementCount", PrimitiveTypeKind.Geometry, "geometryValue"); 78functions.AddFunction(PrimitiveTypeKind.Geometry, "SpatialElementAt", PrimitiveTypeKind.Geometry, "geometryValue", PrimitiveTypeKind.Int32, "nValue"); 79functions.AddFunction(PrimitiveTypeKind.Double, "XCoordinate", PrimitiveTypeKind.Geometry, "geometryValue"); 80functions.AddFunction(PrimitiveTypeKind.Double, "YCoordinate", PrimitiveTypeKind.Geometry, "geometryValue"); 81functions.AddFunction(PrimitiveTypeKind.Double, "Elevation", PrimitiveTypeKind.Geometry, "geometryValue"); 82functions.AddFunction(PrimitiveTypeKind.Double, "Measure", PrimitiveTypeKind.Geometry, "geometryValue"); 83functions.AddFunction(PrimitiveTypeKind.Double, "SpatialLength", PrimitiveTypeKind.Geometry, "geometryValue"); 84functions.AddFunction(PrimitiveTypeKind.Geometry, "StartPoint", PrimitiveTypeKind.Geometry, "geometryValue"); 85functions.AddFunction(PrimitiveTypeKind.Geometry, "EndPoint", PrimitiveTypeKind.Geometry, "geometryValue"); 86functions.AddFunction(PrimitiveTypeKind.Boolean, "IsClosedSpatial", PrimitiveTypeKind.Geometry, "geometryValue"); 87functions.AddFunction(PrimitiveTypeKind.Boolean, "IsRing", PrimitiveTypeKind.Geometry, "geometryValue"); 88functions.AddFunction(PrimitiveTypeKind.Int32, "PointCount", PrimitiveTypeKind.Geometry, "geometryValue"); 89functions.AddFunction(PrimitiveTypeKind.Geometry, "PointAt", PrimitiveTypeKind.Geometry, "geometryValue", PrimitiveTypeKind.Int32, "nValue"); 90functions.AddFunction(PrimitiveTypeKind.Double, "Area", PrimitiveTypeKind.Geometry, "geometryValue"); 91functions.AddFunction(PrimitiveTypeKind.Geometry, "Centroid", PrimitiveTypeKind.Geometry, "geometryValue"); 92functions.AddFunction(PrimitiveTypeKind.Geometry, "PointOnSurface", PrimitiveTypeKind.Geometry, "geometryValue"); 93functions.AddFunction(PrimitiveTypeKind.Geometry, "ExteriorRing", PrimitiveTypeKind.Geometry, "geometryValue"); 94functions.AddFunction(PrimitiveTypeKind.Int32, "InteriorRingCount", PrimitiveTypeKind.Geometry, "geometryValue"); 95functions.AddFunction(PrimitiveTypeKind.Geometry, "InteriorRingAt", PrimitiveTypeKind.Geometry, "geometryValue", PrimitiveTypeKind.Int32, "nValue"); 98functions.AddFunction(PrimitiveTypeKind.Geography, "GeographyFromText", PrimitiveTypeKind.String, "geographyText"); 99functions.AddFunction(PrimitiveTypeKind.Geography, "GeographyFromText", PrimitiveTypeKind.String, "geographyText", PrimitiveTypeKind.Int32, "srid"); 100functions.AddFunction(PrimitiveTypeKind.Geography, "GeographyPointFromText", PrimitiveTypeKind.String, "pointText", PrimitiveTypeKind.Int32, "srid"); 101functions.AddFunction(PrimitiveTypeKind.Geography, "GeographyLineFromText", PrimitiveTypeKind.String, "lineText", PrimitiveTypeKind.Int32, "srid"); 102functions.AddFunction(PrimitiveTypeKind.Geography, "GeographyPolygonFromText", PrimitiveTypeKind.String, "polygonText", PrimitiveTypeKind.Int32, "srid"); 103functions.AddFunction(PrimitiveTypeKind.Geography, "GeographyMultiPointFromText", PrimitiveTypeKind.String, "multiPointText", PrimitiveTypeKind.Int32, "srid"); 104functions.AddFunction(PrimitiveTypeKind.Geography, "GeographyMultiLineFromText", PrimitiveTypeKind.String, "multiLineText", PrimitiveTypeKind.Int32, "srid"); 105functions.AddFunction(PrimitiveTypeKind.Geography, "GeographyMultiPolygonFromText", PrimitiveTypeKind.String, "multiPolygonText", PrimitiveTypeKind.Int32, "srid"); 106functions.AddFunction(PrimitiveTypeKind.Geography, "GeographyCollectionFromText", PrimitiveTypeKind.String, "geographyCollectionText", PrimitiveTypeKind.Int32, "srid"); 107functions.AddFunction(PrimitiveTypeKind.Geography, "GeographyFromBinary", PrimitiveTypeKind.Binary, "geographyBytes", PrimitiveTypeKind.Int32, "srid"); 108functions.AddFunction(PrimitiveTypeKind.Geography, "GeographyFromBinary", PrimitiveTypeKind.Binary, "geographyBytes"); 109functions.AddFunction(PrimitiveTypeKind.Geography, "GeographyPointFromBinary", PrimitiveTypeKind.Binary, "pointBytes", PrimitiveTypeKind.Int32, "srid"); 110functions.AddFunction(PrimitiveTypeKind.Geography, "GeographyLineFromBinary", PrimitiveTypeKind.Binary, "lineBytes", PrimitiveTypeKind.Int32, "srid"); 111functions.AddFunction(PrimitiveTypeKind.Geography, "GeographyPolygonFromBinary", PrimitiveTypeKind.Binary, "polygonBytes", PrimitiveTypeKind.Int32, "srid"); 112functions.AddFunction(PrimitiveTypeKind.Geography, "GeographyMultiPointFromBinary", PrimitiveTypeKind.Binary, "multiPointBytes", PrimitiveTypeKind.Int32, "srid"); 113functions.AddFunction(PrimitiveTypeKind.Geography, "GeographyMultiLineFromBinary", PrimitiveTypeKind.Binary, "multiLineBytes", PrimitiveTypeKind.Int32, "srid"); 114functions.AddFunction(PrimitiveTypeKind.Geography, "GeographyMultiPolygonFromBinary", PrimitiveTypeKind.Binary, "multiPolygonBytes", PrimitiveTypeKind.Int32, "srid"); 115functions.AddFunction(PrimitiveTypeKind.Geography, "GeographyCollectionFromBinary", PrimitiveTypeKind.Binary, "geographyCollectionBytes", PrimitiveTypeKind.Int32, "srid"); 116functions.AddFunction(PrimitiveTypeKind.Geography, "GeographyFromGml", PrimitiveTypeKind.String, "geographyGml"); 117functions.AddFunction(PrimitiveTypeKind.Geography, "GeographyFromGml", PrimitiveTypeKind.String, "geographyGml", PrimitiveTypeKind.Int32, "srid"); 118functions.AddFunction(PrimitiveTypeKind.Int32, "CoordinateSystemId", PrimitiveTypeKind.Geography, "geographyValue"); 119functions.AddFunction(PrimitiveTypeKind.String, "SpatialTypeName", PrimitiveTypeKind.Geography, "geographyValue"); 120functions.AddFunction(PrimitiveTypeKind.Int32, "SpatialDimension", PrimitiveTypeKind.Geography, "geographyValue"); 121functions.AddFunction(PrimitiveTypeKind.Binary, "AsBinary", PrimitiveTypeKind.Geography, "geographyValue"); 122functions.AddFunction(PrimitiveTypeKind.String, "AsGml", PrimitiveTypeKind.Geography, "geographyValue"); 123functions.AddFunction(PrimitiveTypeKind.String, "AsText", PrimitiveTypeKind.Geography, "geographyValue"); 124functions.AddFunction(PrimitiveTypeKind.Boolean, "IsEmptySpatial", PrimitiveTypeKind.Geography, "geographyValue"); 125functions.AddFunction(PrimitiveTypeKind.Boolean, "SpatialEquals", PrimitiveTypeKind.Geography, "geographyValue1", PrimitiveTypeKind.Geography, "geographyValue2"); 126functions.AddFunction(PrimitiveTypeKind.Boolean, "SpatialDisjoint", PrimitiveTypeKind.Geography, "geographyValue1", PrimitiveTypeKind.Geography, "geographyValue2"); 127functions.AddFunction(PrimitiveTypeKind.Boolean, "SpatialIntersects", PrimitiveTypeKind.Geography, "geographyValue1", PrimitiveTypeKind.Geography, "geographyValue2"); 128functions.AddFunction(PrimitiveTypeKind.Geography, "SpatialBuffer", PrimitiveTypeKind.Geography, "geographyValue", PrimitiveTypeKind.Double, "distance"); 129functions.AddFunction(PrimitiveTypeKind.Double, "Distance", PrimitiveTypeKind.Geography, "geographyValue1", PrimitiveTypeKind.Geography, "geographyValue2"); 130functions.AddFunction(PrimitiveTypeKind.Geography, "SpatialIntersection", PrimitiveTypeKind.Geography, "geographyValue1", PrimitiveTypeKind.Geography, "geographyValue2"); 131functions.AddFunction(PrimitiveTypeKind.Geography, "SpatialUnion", PrimitiveTypeKind.Geography, "geographyValue1", PrimitiveTypeKind.Geography, "geographyValue2"); 132functions.AddFunction(PrimitiveTypeKind.Geography, "SpatialDifference", PrimitiveTypeKind.Geography, "geometryValue1", PrimitiveTypeKind.Geography, "geometryValue2"); 133functions.AddFunction(PrimitiveTypeKind.Geography, "SpatialSymmetricDifference", PrimitiveTypeKind.Geography, "geometryValue1", PrimitiveTypeKind.Geography, "geometryValue2"); 134functions.AddFunction(PrimitiveTypeKind.Int32, "SpatialElementCount", PrimitiveTypeKind.Geography, "geographyValue"); 135functions.AddFunction(PrimitiveTypeKind.Geography, "SpatialElementAt", PrimitiveTypeKind.Geography, "geographyValue", PrimitiveTypeKind.Int32, "nValue"); 136functions.AddFunction(PrimitiveTypeKind.Double, "Latitude", PrimitiveTypeKind.Geography, "geographyValue"); 137functions.AddFunction(PrimitiveTypeKind.Double, "Longitude", PrimitiveTypeKind.Geography, "geographyValue"); 138functions.AddFunction(PrimitiveTypeKind.Double, "Elevation", PrimitiveTypeKind.Geography, "geographyValue"); 139functions.AddFunction(PrimitiveTypeKind.Double, "Measure", PrimitiveTypeKind.Geography, "geographyValue"); 140functions.AddFunction(PrimitiveTypeKind.Double, "SpatialLength", PrimitiveTypeKind.Geography, "geographyValue"); 141functions.AddFunction(PrimitiveTypeKind.Geography, "StartPoint", PrimitiveTypeKind.Geography, "geographyValue"); 142functions.AddFunction(PrimitiveTypeKind.Geography, "EndPoint", PrimitiveTypeKind.Geography, "geographyValue"); 143functions.AddFunction(PrimitiveTypeKind.Boolean, "IsClosedSpatial", PrimitiveTypeKind.Geography, "geographyValue"); 144functions.AddFunction(PrimitiveTypeKind.Int32, "PointCount", PrimitiveTypeKind.Geography, "geographyValue"); 145functions.AddFunction(PrimitiveTypeKind.Geography, "PointAt", PrimitiveTypeKind.Geography, "geographyValue", PrimitiveTypeKind.Int32, "nValue"); 146functions.AddFunction(PrimitiveTypeKind.Double, "Area", PrimitiveTypeKind.Geography, "geographyValue");
System\Data\Metadata\Edm\TypeUsage.cs (9)
126if (primitiveType.PrimitiveTypeKind != PrimitiveTypeKind.String) 154if (primitiveType.PrimitiveTypeKind != PrimitiveTypeKind.String) 179if (primitiveType.PrimitiveTypeKind != PrimitiveTypeKind.Binary) 203if (primitiveType.PrimitiveTypeKind != PrimitiveTypeKind.Binary) 225if (primitiveType.PrimitiveTypeKind != PrimitiveTypeKind.DateTime) 246if (primitiveType.PrimitiveTypeKind != PrimitiveTypeKind.DateTimeOffset) 268if (primitiveType.PrimitiveTypeKind != PrimitiveTypeKind.Time) 293if (primitiveType.PrimitiveTypeKind != PrimitiveTypeKind.Decimal) 313if (primitiveType.PrimitiveTypeKind != PrimitiveTypeKind.Decimal)
System\Data\Metadata\EdmItemCollection.cs (1)
404internal override PrimitiveType GetMappedPrimitiveType(PrimitiveTypeKind primitiveTypeKind)
System\Data\Metadata\Helper.cs (32)
405internal static bool IsGeographicTypeKind(PrimitiveTypeKind kind) 407return kind == PrimitiveTypeKind.Geography || IsStrongGeographicTypeKind(kind); 415internal static bool IsGeometricTypeKind(PrimitiveTypeKind kind) 417return kind == PrimitiveTypeKind.Geometry || IsStrongGeometricTypeKind(kind); 420internal static bool IsStrongSpatialTypeKind(PrimitiveTypeKind kind) 425static bool IsStrongGeometricTypeKind(PrimitiveTypeKind kind) 427return kind >= PrimitiveTypeKind.GeometryPoint && kind <= PrimitiveTypeKind.GeometryCollection; 430static bool IsStrongGeographicTypeKind(PrimitiveTypeKind kind) 432return kind >= PrimitiveTypeKind.GeographyPoint && kind <= PrimitiveTypeKind.GeographyCollection; 440internal static bool IsSpatialType(TypeUsage type, out PrimitiveTypeKind spatialType) 452spatialType = default(PrimitiveTypeKind); 500/// <see cref="PrimitiveTypeKind"/> to verifiy. 505internal static bool IsSupportedEnumUnderlyingType(PrimitiveTypeKind typeKind) 507return typeKind == PrimitiveTypeKind.Byte || 508typeKind == PrimitiveTypeKind.SByte || 509typeKind == PrimitiveTypeKind.Int16 || 510typeKind == PrimitiveTypeKind.Int32 || 511typeKind == PrimitiveTypeKind.Int64; 514private static readonly Dictionary<PrimitiveTypeKind, long[]> _enumUnderlyingTypeRanges = 515new Dictionary<PrimitiveTypeKind, long[]> 517{ PrimitiveTypeKind.Byte, new long[] { Byte.MinValue, Byte.MaxValue } }, 518{ PrimitiveTypeKind.SByte, new long[] { SByte.MinValue, SByte.MaxValue } }, 519{ PrimitiveTypeKind.Int16, new long[] { Int16.MinValue, Int16.MaxValue } }, 520{ PrimitiveTypeKind.Int32, new long[] { Int32.MinValue, Int32.MaxValue } }, 521{ PrimitiveTypeKind.Int64, new long[] { Int64.MinValue, Int64.MaxValue } }, 532internal static bool IsEnumMemberValueInRange(PrimitiveTypeKind underlyingTypeKind, long value) 575if (IsGeographicType(primitiveType) && primitiveType.PrimitiveTypeKind != PrimitiveTypeKind.Geography) 577return PrimitiveType.GetEdmPrimitiveType(PrimitiveTypeKind.Geography); 579else if (IsGeometricType(primitiveType) && primitiveType.PrimitiveTypeKind != PrimitiveTypeKind.Geometry) 581return PrimitiveType.GetEdmPrimitiveType(PrimitiveTypeKind.Geometry);
System\Data\Metadata\MetadataWorkspace.cs (3)
807internal PrimitiveType GetMappedPrimitiveType(PrimitiveTypeKind primitiveTypeKind, DataSpace dataSpace) 1355internal TypeUsage GetCanonicalModelTypeUsage(PrimitiveTypeKind primitiveTypeKind) 1365internal PrimitiveType GetModelPrimitiveType(PrimitiveTypeKind primitiveTypeKind)
System\Data\Metadata\ObjectItemCollection.cs (3)
550internal override PrimitiveType GetMappedPrimitiveType(PrimitiveTypeKind modelType) 554modelType = PrimitiveTypeKind.Geometry; 558modelType = PrimitiveTypeKind.Geography;
System\Data\Metadata\Perspective.cs (1)
207internal virtual bool TryGetMappedPrimitiveType(PrimitiveTypeKind primitiveTypeKind, out PrimitiveType primitiveType)
System\Data\Metadata\StoreItemCollection.cs (1)
287internal override PrimitiveType GetMappedPrimitiveType(PrimitiveTypeKind primitiveTypeKind)
System\Data\Metadata\TypeHelpers.cs (17)
276if (!TypeSemantics.IsPrimitiveType(type, PrimitiveTypeKind.String) && 277!TypeSemantics.IsPrimitiveType(type, PrimitiveTypeKind.Binary)) 289if (!TypeSemantics.IsPrimitiveType(type, PrimitiveTypeKind.String)) 306if (!TypeSemantics.IsPrimitiveType(type, PrimitiveTypeKind.String) && 307!TypeSemantics.IsPrimitiveType(type, PrimitiveTypeKind.Binary)) 319if (!TypeSemantics.IsPrimitiveType(type, PrimitiveTypeKind.Decimal)) 330if (!TypeSemantics.IsPrimitiveType(type, PrimitiveTypeKind.Decimal)) 339internal static bool TryGetPrimitiveTypeKind(TypeUsage type, out PrimitiveTypeKind typeKind) 347typeKind = default(PrimitiveTypeKind); 783case PrimitiveTypeKind.Byte: 786case PrimitiveTypeKind.Int16: 789case PrimitiveTypeKind.Int32: 792case PrimitiveTypeKind.Int64: 795case PrimitiveTypeKind.SByte: 811static internal TypeUsage GetLiteralTypeUsage(PrimitiveTypeKind primitiveTypeKind) 817static internal TypeUsage GetLiteralTypeUsage(PrimitiveTypeKind primitiveTypeKind, bool isUnicode) 823case PrimitiveTypeKind.String:
System\Data\Metadata\TypeSemantics.cs (16)
424PrimitiveTypeKind typeKind; 429case PrimitiveTypeKind.Byte: 430case PrimitiveTypeKind.Int16: 431case PrimitiveTypeKind.Int32: 432case PrimitiveTypeKind.Int64: 433case PrimitiveTypeKind.SByte: 450PrimitiveTypeKind typeKind; 453return (typeKind == PrimitiveTypeKind.Decimal); 466PrimitiveTypeKind typeKind; 469return (typeKind == PrimitiveTypeKind.Double || typeKind == PrimitiveTypeKind.Single); 481PrimitiveTypeKind typeKind; 486case PrimitiveTypeKind.Byte: 513return TypeSemantics.IsPrimitiveType(type, PrimitiveTypeKind.Boolean); 532internal static bool IsPrimitiveType(TypeUsage type, PrimitiveTypeKind primitiveTypeKind) 534PrimitiveTypeKind typeKind;
System\Data\Objects\ELinq\ExpressionConverter.cs (11)
562PrimitiveTypeKind fromTypeKind = Helper.AsPrimitive(fromType.EdmType).PrimitiveTypeKind; 563PrimitiveTypeKind toTypeKind = Helper.AsPrimitive(toType.EdmType).PrimitiveTypeKind; 565if (toTypeKind == PrimitiveTypeKind.Decimal) 570case PrimitiveTypeKind.Byte: 571case PrimitiveTypeKind.Int16: 572case PrimitiveTypeKind.Int32: 573case PrimitiveTypeKind.Int64: 574case PrimitiveTypeKind.SByte: 601if (isPrimitiveType && preserveCastForDateTime && ((PrimitiveType)fromType.EdmType).PrimitiveTypeKind == PrimitiveTypeKind.DateTime) 1027PrimitiveTypeKind primitiveTypeKind; 1392var escapeExpression = DbExpressionBuilder.Constant(EdmProviderManifest.Instance.GetCanonicalModelTypeUsage(PrimitiveTypeKind.String), new String(new char[] { escapeChar }));
System\Data\Objects\ELinq\MethodCallTranslator.cs (2)
1194!TypeSemantics.IsPrimitiveType(argument.ResultType, PrimitiveTypeKind.Int32)) 2000TypeUsage intTypeUsage = TypeUsage.CreateDefaultTypeUsage(EdmProviderManifest.Instance.GetPrimitiveType(PrimitiveTypeKind.Int32));
System\Data\Objects\ELinq\Translator.cs (2)
1096if (TypeSemantics.IsPrimitiveType(left.ResultType, PrimitiveTypeKind.String) && 1097TypeSemantics.IsPrimitiveType(right.ResultType, PrimitiveTypeKind.String))
System\Data\Query\InternalTrees\ColumnMapFactory.cs (1)
296MetadataItem.EdmProviderManifest.GetPrimitiveType(PrimitiveTypeKind.String);
System\Data\Query\InternalTrees\Command.cs (5)
64if(!TryGetPrimitiveType(PrimitiveTypeKind.Boolean, out m_boolType)) 68if (!TryGetPrimitiveType(PrimitiveTypeKind.Int32, out m_intType)) 72if (!TryGetPrimitiveType(PrimitiveTypeKind.String, out m_stringType)) 143private bool TryGetPrimitiveType(PrimitiveTypeKind modelType, out TypeUsage type) 147if (modelType == PrimitiveTypeKind.String)
System\Data\Query\PlanCompiler\CTreeGenerator.cs (1)
1491PlanCompiler.Assert(TypeSemantics.IsPrimitiveType(predicateExpr.ResultType, PrimitiveTypeKind.Boolean), "Invalid FilterOp Predicate (non-ScalarOp or non-Boolean result)");
System\Data\Query\PlanCompiler\ITreeGenerator.cs (1)
361if (TypeSemantics.IsPrimitiveType(expr.ResultType, PrimitiveTypeKind.Boolean))
System\Data\Query\PlanCompiler\NominalTypeEliminator.cs (2)
1844PlanCompiler.Assert(md.TypeSemantics.IsPrimitiveType(n.Child0.Op.Type, md.PrimitiveTypeKind.Geography) || md.TypeSemantics.IsPrimitiveType(n.Child0.Op.Type, md.PrimitiveTypeKind.Geometry), "Union spatial type expected.");
System\Data\Query\PlanCompiler\TransformationRules.cs (2)
384System.Data.Metadata.Edm.PrimitiveTypeKind typeKind; 385if (System.Data.Common.TypeHelpers.TryGetPrimitiveTypeKind(v.Type, out typeKind) && typeKind == System.Data.Metadata.Edm.PrimitiveTypeKind.Int32)
System\Data\SqlClient\IDbSpatialValue.cs (5)
26PrimitiveTypeKind PrimitiveType { get; } 105public PrimitiveTypeKind PrimitiveType { get { return PrimitiveTypeKind.Geography; } } 175public PrimitiveTypeKind PrimitiveType { get { return PrimitiveTypeKind.Geometry; } }
System\Data\SqlClient\SqlGen\SqlFunctionCallHandler.cs (20)
449string functionNameWithSrid = (TypeSemantics.IsPrimitiveType(functionExpression.ResultType, PrimitiveTypeKind.Geometry) ? "geometry::STGeomFromText" : "geography::STGeomFromText"); 450string functionNameWithoutSrid = (TypeSemantics.IsPrimitiveType(functionExpression.ResultType, PrimitiveTypeKind.Geometry) ? "geometry::Parse" : "geography::Parse"); 466return HandleSpatialStaticMethodFunctionAppendSrid(sqlgen, functionExpression, (TypeSemantics.IsPrimitiveType(functionExpression.ResultType, PrimitiveTypeKind.Geometry) ? "geometry::GeomFromGml" : "geography::GeomFromGml")); 471return HandleSpatialStaticMethodFunctionAppendSrid(sqlgen, functionExpression, (TypeSemantics.IsPrimitiveType(functionExpression.ResultType, PrimitiveTypeKind.Geometry) ? "geometry::STGeomFromWKB" : "geography::STGeomFromWKB")); 485DbExpression sridExpression = (TypeSemantics.IsPrimitiveType(functionExpression.ResultType, PrimitiveTypeKind.Geometry) ? defaultGeometrySridExpression : defaultGeographySridExpression); 510PrimitiveTypeKind spatialTypeKind; 549private static bool IsSpatialCanonicalFunction(DbFunctionExpression e, out PrimitiveTypeKind spatialTypeKind) 567spatialTypeKind = default(PrimitiveTypeKind); 742private static ISqlFragment HandleSpatialCanonicalFunction(SqlGenerator sqlgen, DbFunctionExpression functionExpression, PrimitiveTypeKind spatialTypeKind) 744Debug.Assert(spatialTypeKind == PrimitiveTypeKind.Geography || spatialTypeKind == PrimitiveTypeKind.Geometry, "Spatial function does not refer to a valid spatial primitive type kind?"); 745if (spatialTypeKind == PrimitiveTypeKind.Geography) 1220PrimitiveTypeKind typeKind; 1224if (typeKind == PrimitiveTypeKind.DateTime) 1228else if (typeKind == PrimitiveTypeKind.DateTimeOffset) 1448if (TypeSemantics.IsPrimitiveType(e.Arguments[0].ResultType, PrimitiveTypeKind.Byte)) 1753return CastReturnTypeToGivenType(e, _functionRequiresReturnTypeCastToInt64, PrimitiveTypeKind.Int64); 1786return CastReturnTypeToGivenType(e, _functionRequiresReturnTypeCastToInt16, PrimitiveTypeKind.Int16); 1799return CastReturnTypeToGivenType(e, _functionRequiresReturnTypeCastToSingle, PrimitiveTypeKind.Single); 1809private static bool CastReturnTypeToGivenType(DbFunctionExpression e, Set<string> functionsRequiringReturnTypeCast, PrimitiveTypeKind type)
System\Data\SqlClient\SqlGen\SqlGenerator.cs (47)
361integerType = GetPrimitiveType(PrimitiveTypeKind.Int64); 374defaultStringTypeName = GetSqlPrimitiveType(TypeUsage.CreateStringTypeUsage(this.metadataWorkspace.GetModelPrimitiveType(PrimitiveTypeKind.String), isUnicode: true, isFixedLength: false)); 728if (TypeSemantics.IsPrimitiveType(e.Left.ResultType, PrimitiveTypeKind.String)) 885if (!TypeSemantics.IsPrimitiveType(type, PrimitiveTypeKind.String)) 909PrimitiveTypeKind typeKind; 916case PrimitiveTypeKind.Int32: 921case PrimitiveTypeKind.Binary: 927case PrimitiveTypeKind.Boolean: 933case PrimitiveTypeKind.Byte: 937case PrimitiveTypeKind.DateTime: 945case PrimitiveTypeKind.Time: 954case PrimitiveTypeKind.DateTimeOffset: 963case PrimitiveTypeKind.Decimal: 978case PrimitiveTypeKind.Double: 986case PrimitiveTypeKind.Geography: 990case PrimitiveTypeKind.Geometry: 994case PrimitiveTypeKind.Guid: 998case PrimitiveTypeKind.Int16: 1002case PrimitiveTypeKind.Int64: 1006case PrimitiveTypeKind.Single: 1014case PrimitiveTypeKind.String: 1092throw EntityUtil.NotSupported(System.Data.Entity.Strings.SqlGen_TypedNaNNotSupported(Enum.GetName(typeof(PrimitiveTypeKind), PrimitiveTypeKind.Double))); 1096throw EntityUtil.NotSupported(System.Data.Entity.Strings.SqlGen_TypedPositiveInfinityNotSupported(Enum.GetName(typeof(PrimitiveTypeKind), PrimitiveTypeKind.Double), typeof(Double).Name)); 1100throw EntityUtil.NotSupported(System.Data.Entity.Strings.SqlGen_TypedNegativeInfinityNotSupported(Enum.GetName(typeof(PrimitiveTypeKind), PrimitiveTypeKind.Double), typeof(Double).Name)); 1113throw EntityUtil.NotSupported(System.Data.Entity.Strings.SqlGen_TypedNaNNotSupported(Enum.GetName(typeof(PrimitiveTypeKind), PrimitiveTypeKind.Single))); 1117throw EntityUtil.NotSupported(System.Data.Entity.Strings.SqlGen_TypedPositiveInfinityNotSupported(Enum.GetName(typeof(PrimitiveTypeKind), PrimitiveTypeKind.Single), typeof(Single).Name)); 1121throw EntityUtil.NotSupported(System.Data.Entity.Strings.SqlGen_TypedNegativeInfinityNotSupported(Enum.GetName(typeof(PrimitiveTypeKind), PrimitiveTypeKind.Single), typeof(Single).Name)); 1808if (TypeSemantics.IsPrimitiveType(comparisonExpression.Left.ResultType, PrimitiveTypeKind.String)) 1846case PrimitiveTypeKind.String: 1849case PrimitiveTypeKind.Binary: 1931if (TypeSemantics.IsPrimitiveType(key.ResultType, PrimitiveTypeKind.String)) 3832PrimitiveTypeKind primitiveTypeKind = ((PrimitiveType)storeTypeUsage.EdmType).PrimitiveTypeKind; 3836case PrimitiveTypeKind.Binary: 3845case PrimitiveTypeKind.String: 3854case PrimitiveTypeKind.DateTime: 3857case PrimitiveTypeKind.Time: 3861case PrimitiveTypeKind.DateTimeOffset: 3866case PrimitiveTypeKind.Decimal: 4223private TypeUsage GetPrimitiveType(PrimitiveTypeKind modelType) 4367private void AssertKatmaiOrNewer(PrimitiveTypeKind primitiveTypeKind) 4372private static void AssertKatmaiOrNewer(SqlVersion sqlVersion, PrimitiveTypeKind primitiveTypeKind)
System\Data\SqlClient\SqlProviderManifest.cs (45)
357PrimitiveTypeKind newPrimitiveTypeKind; 373newPrimitiveTypeKind = PrimitiveTypeKind.String; 380newPrimitiveTypeKind = PrimitiveTypeKind.String; 387newPrimitiveTypeKind = PrimitiveTypeKind.String; 394newPrimitiveTypeKind = PrimitiveTypeKind.String; 402newPrimitiveTypeKind = PrimitiveTypeKind.String; 411newPrimitiveTypeKind = PrimitiveTypeKind.String; 418newPrimitiveTypeKind = PrimitiveTypeKind.Binary; 424newPrimitiveTypeKind = PrimitiveTypeKind.Binary; 431newPrimitiveTypeKind = PrimitiveTypeKind.Binary; 480Debug.Assert(newPrimitiveTypeKind == PrimitiveTypeKind.String || newPrimitiveTypeKind == PrimitiveTypeKind.Binary, "at this point only string and binary types should be present"); 484case PrimitiveTypeKind.String: 493case PrimitiveTypeKind.Binary: 528case PrimitiveTypeKind.Boolean: 531case PrimitiveTypeKind.Byte: 534case PrimitiveTypeKind.Int16: 537case PrimitiveTypeKind.Int32: 540case PrimitiveTypeKind.Int64: 543case PrimitiveTypeKind.Geography: 544case PrimitiveTypeKind.GeographyPoint: 545case PrimitiveTypeKind.GeographyLineString: 546case PrimitiveTypeKind.GeographyPolygon: 547case PrimitiveTypeKind.GeographyMultiPoint: 548case PrimitiveTypeKind.GeographyMultiLineString: 549case PrimitiveTypeKind.GeographyMultiPolygon: 550case PrimitiveTypeKind.GeographyCollection: 553case PrimitiveTypeKind.Geometry: 554case PrimitiveTypeKind.GeometryPoint: 555case PrimitiveTypeKind.GeometryLineString: 556case PrimitiveTypeKind.GeometryPolygon: 557case PrimitiveTypeKind.GeometryMultiPoint: 558case PrimitiveTypeKind.GeometryMultiLineString: 559case PrimitiveTypeKind.GeometryMultiPolygon: 560case PrimitiveTypeKind.GeometryCollection: 563case PrimitiveTypeKind.Guid: 566case PrimitiveTypeKind.Double: 569case PrimitiveTypeKind.Single: 572case PrimitiveTypeKind.Decimal: // decimal, numeric, smallmoney, money 589case PrimitiveTypeKind.Binary: // binary, varbinary, varbinary(max), image, timestamp, rowversion 624case PrimitiveTypeKind.String: 698case PrimitiveTypeKind.DateTime: 700case PrimitiveTypeKind.DateTimeOffset: 702case PrimitiveTypeKind.Time: 710private TypeUsage GetStorePrimitiveTypeIfPostSql9(string storeTypeName, string edmTypeIdentity, PrimitiveTypeKind primitiveTypeKind)
System\Data\SqlClient\SqlProviderServices.cs (25)
158if (TypeSemantics.IsPrimitiveType(parameterType, PrimitiveTypeKind.String) || 159TypeSemantics.IsPrimitiveType(parameterType, PrimitiveTypeKind.Binary)) 377PrimitiveTypeKind typeKind = MetadataHelper.GetPrimitiveTypeKind(type); 378if (typeKind == PrimitiveTypeKind.String) 382else if(typeKind == PrimitiveTypeKind.Binary) 444PrimitiveTypeKind primitiveTypeKind = MetadataHelper.GetPrimitiveTypeKind(type); 453case PrimitiveTypeKind.Binary: 458case PrimitiveTypeKind.Boolean: 461case PrimitiveTypeKind.Byte: 464case PrimitiveTypeKind.Time: 470case PrimitiveTypeKind.DateTimeOffset: 476case PrimitiveTypeKind.DateTime: 486case PrimitiveTypeKind.Decimal: 491case PrimitiveTypeKind.Double: 494case PrimitiveTypeKind.Geography: 500case PrimitiveTypeKind.Geometry: 506case PrimitiveTypeKind.Guid: 509case PrimitiveTypeKind.Int16: 512case PrimitiveTypeKind.Int32: 515case PrimitiveTypeKind.Int64: 518case PrimitiveTypeKind.SByte: 521case PrimitiveTypeKind.Single: 524case PrimitiveTypeKind.String: 654PrimitiveTypeKind.String == ((PrimitiveType)type.EdmType).PrimitiveTypeKind, "only valid for string type"); 688PrimitiveTypeKind.Binary == ((PrimitiveType)type.EdmType).PrimitiveTypeKind, "only valid for binary type");
System.Data.Entity.Design (30)
System\Data\Entity\Design\Common\MetadataItemSerializer.cs (2)
488if ((primitiveType.PrimitiveTypeKind == PrimitiveTypeKind.String || 489primitiveType.PrimitiveTypeKind == PrimitiveTypeKind.Binary) &&
System\Data\Entity\Design\Common\MetadataUtil.cs (1)
319return primitiveType.PrimitiveTypeKind != PrimitiveTypeKind.Binary;
System\Data\Entity\Design\EntityModelSchemaGenerator.cs (2)
403PrimitiveTypeKind.String), 826PrimitiveType.GetEdmPrimitiveType(PrimitiveTypeKind.String),
System\Data\Entity\Design\EntityStoreSchemaGenerator.cs (6)
1340if (primitiveType.PrimitiveTypeKind == PrimitiveTypeKind.Decimal) 1391else if (primitiveType.PrimitiveTypeKind == PrimitiveTypeKind.DateTime || 1392primitiveType.PrimitiveTypeKind == PrimitiveTypeKind.Time || 1393primitiveType.PrimitiveTypeKind == PrimitiveTypeKind.DateTimeOffset) 1420else if (primitiveType.PrimitiveTypeKind == PrimitiveTypeKind.String || 1421primitiveType.PrimitiveTypeKind == PrimitiveTypeKind.Binary)
System\Data\Entity\Design\EntityStoreSchemaGenerator\EntityStoreSchemaGenerator.LoadMethodSessionState.cs (2)
150(primitiveType.PrimitiveTypeKind == PrimitiveTypeKind.Geography || primitiveType.PrimitiveTypeKind == PrimitiveTypeKind.Geometry))
System\Data\EntityModel\Emitters\PropertyEmitter.cs (15)
693PrimitiveTypeKind type; 705case PrimitiveTypeKind.Boolean: 706case PrimitiveTypeKind.Byte: 707case PrimitiveTypeKind.Int16: 708case PrimitiveTypeKind.Int32: 709case PrimitiveTypeKind.Int64: 710case PrimitiveTypeKind.Decimal: 711case PrimitiveTypeKind.Single: 712case PrimitiveTypeKind.Double: 713case PrimitiveTypeKind.String: 717case PrimitiveTypeKind.Guid: 721case PrimitiveTypeKind.DateTime: 725case PrimitiveTypeKind.DateTimeOffset: 729case PrimitiveTypeKind.Time: 733case PrimitiveTypeKind.Binary:
System\Data\EntityModel\Emitters\Utils.cs (2)
297public static bool TryGetPrimitiveTypeKind(EdmType type, out PrimitiveTypeKind modelType ) 302modelType = PrimitiveTypeKind.Binary;
System.Data.Services.Design (16)
System\Data\EntityModel\Emitters\PropertyEmitter.cs (13)
620PrimitiveTypeKind type; 627case PrimitiveTypeKind.Boolean: 628case PrimitiveTypeKind.Byte: 629case PrimitiveTypeKind.Int16: 630case PrimitiveTypeKind.Int32: 631case PrimitiveTypeKind.Int64: 632case PrimitiveTypeKind.Decimal: 633case PrimitiveTypeKind.Single: 634case PrimitiveTypeKind.Double: 635case PrimitiveTypeKind.String: 643case PrimitiveTypeKind.Guid: 651case PrimitiveTypeKind.DateTime: 659case PrimitiveTypeKind.Binary:
System\Data\EntityModel\Emitters\Utils.cs (2)
277public static bool TryGetPrimitiveTypeKind(EdmType type, out PrimitiveTypeKind modelType) 282modelType = PrimitiveTypeKind.Binary;
System\Data\Metadata\Edm\EdmConstants.cs (1)
21internal const int NumPrimitiveTypes = (int)System.Data.Metadata.Edm.PrimitiveTypeKind.DateTimeOffset + 1;