389 references to TypeSemantics
System.Data.Entity (389)
System\Data\Common\CommandTrees\AbstractExpressions.cs (1)
341if (!TypeSemantics.IsNullable(type))
System\Data\Common\CommandTrees\DefaultExpressionVisitor.cs (1)
543if(TypeSemantics.IsRowType(exp.ResultType))
System\Data\Common\CommandTrees\ExpressionBuilder\Internal\ArgumentValidation.cs (33)
36if (!TypeSemantics.IsPolymorphicType(type)) 52if (!TypeSemantics.IsStructurallyEqualOrPromotableTo(expression.ResultType, requiredResultType)) 106if (!TypeSemantics.IsReferenceType(endType)) 124else if (!TypeSemantics.IsStructurallyEqualOrPromotableTo(from.ResultType.EdmType, endType.EdmType)) 134if (!TypeSemantics.IsCollectionType(argument.ResultType)) 144if (!TypeSemantics.IsCollectionType(left.ResultType) || !TypeSemantics.IsCollectionType(right.ResultType)) 333if (!TypeSemantics.IsAggregateFunction(function) || null == function.ReturnParameter) 381if (!TypeSemantics.IsPrimitiveType(key.ResultType, PrimitiveTypeKind.String)) 688if (!TypeSemantics.IsIntegerNumericType(count.ResultType)) 833if (null == resultType || !TypeSemantics.IsPrimitiveType(resultType, PrimitiveTypeKind.Boolean)) 844if (null == resultType || !TypeSemantics.IsPrimitiveType(resultType, PrimitiveTypeKind.Boolean)) 859if (!TypeSemantics.IsPrimitiveType(argument.ResultType, PrimitiveTypeKind.Boolean)) 875if (!TypeSemantics.IsNumericType(resultType)) 881if (TypeSemantics.IsUnsignedNumericType(argument.ResultType)) 899if (null == resultType || !TypeSemantics.IsNumericType(resultType)) 924equality = TypeSemantics.IsEqualComparableTo(left.ResultType, right.ResultType); 925order = TypeSemantics.IsOrderComparableTo(left.ResultType, right.ResultType); 930equality = TypeSemantics.IsEqualComparableTo(left.ResultType, right.ResultType); 934order = TypeSemantics.IsOrderComparableTo(left.ResultType, right.ResultType); 957if (TypeSemantics.IsCollectionType(argument.ResultType)) 968if (!allowRowType || !TypeSemantics.IsRowType(argument.ResultType)) 1009if (!TypeSemantics.IsCastAllowed(argument.ResultType, toType)) 1027if (!TypeSemantics.IsValidPolymorphicCast(argument.ResultType, asType)) 1053!TypeSemantics.IsValidPolymorphicCast(elementType, type)) 1077if (!TypeSemantics.IsValidPolymorphicCast(argument.ResultType, type)) 1136if (!TypeSemantics.IsValidPolymorphicCast(entitySet.ElementType, entityType)) 1176if (!TypeSemantics.IsValidPolymorphicCast(entitySet.ElementType, entityType)) 1379if (!TypeSemantics.IsIntegerNumericType(limit.ResultType)) 1536commonElementType = TypeSemantics.GetCommonType(commonElementType, exp.ResultType); 1554if (!TypeSemantics.IsCollectionType(collectionType)) 2022if (!TypeSemantics.IsReferenceType(retType)) 2057TypeSemantics.IsIntegerNumericType(expression.ResultType) &&
System\Data\Common\CommandTrees\Internal\ExpressionKeyGen.cs (1)
191Debug.Assert(TypeSemantics.IsScalarType(e.ResultType), "Non-scalar type constant expressions are not supported.");
System\Data\Common\CommandTrees\Internal\ExpressionPrinter.cs (1)
311if (TypeSemantics.IsPrimitiveType(type))
System\Data\Common\CommandTrees\Internal\PatternMatchRules.cs (3)
188internal static Func<DbExpression, bool> MatchComplexType { get { return (e => TypeSemantics.IsComplexType(e.ResultType)); } } 193internal static Func<DbExpression, bool> MatchEntityType { get { return (e => TypeSemantics.IsEntityType(e.ResultType)); } } 198internal static Func<DbExpression, bool> MatchRowType { get { return (e => TypeSemantics.IsRowType(e.ResultType)); } }
System\Data\Common\CommandTrees\Internal\Validator.cs (2)
108if (!TypeSemantics.IsEqual(varRef.ResultType, foundType)) 128if (!TypeSemantics.IsEqual(paramRef.ResultType, foundParam.ResultType))
System\Data\Common\CommandTrees\Internal\ViewSimplifier.cs (3)
433if (!TypeSemantics.IsEntityType(discriminatorFilter.Input.VariableType) || 457!TypeSemantics.IsBooleanType(casePredicate.Then[0].ResultType) || !TypeSemantics.IsBooleanType(casePredicate.Else.ResultType) ||
System\Data\Common\CommandTrees\OperatorExpressions.cs (16)
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"); 125Debug.Assert(TypeSemantics.IsNumericType(numericResultType), "DbArithmeticExpression result type must be numeric"); 239Debug.Assert(TypeSemantics.IsCastAllowed(argument.ResultType, type), "DbCastExpression represents an invalid cast"); 276Debug.Assert(TypeSemantics.IsBooleanType(booleanResultType), "DbComparisonExpression result type must be a Boolean type"); 314Debug.Assert(TypeSemantics.IsBooleanType(booleanResultType), "DbIsEmptyExpression requires a Boolean result type"); 343Debug.Assert(TypeSemantics.IsBooleanType(booleanResultType), "DbIsNullExpression requires a Boolean result type"); 375Debug.Assert(TypeSemantics.IsBooleanType(booleanResultType), "DbIsOfExpression requires a Boolean result type"); 460Debug.Assert(TypeSemantics.IsValidPolymorphicCast(argument.ResultType, asType), "DbTreatExpression represents an invalid treat"); 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"); 499Debug.Assert(TypeSemantics.IsBooleanType(booleanResultType), "DbLikeExpression must have a Boolean result type"); 547Debug.Assert(TypeSemantics.IsReferenceType(refResultType), "DbEntityRefExpression requires a reference result type"); 576Debug.Assert(TypeSemantics.IsRowType(rowResultType), "DbRefKeyExpression requires a row result type");
System\Data\Common\CommandTrees\RelationalExpressions.cs (6)
81Debug.Assert(TypeSemantics.IsCollectionType(argument.ResultType), "DbDistinctExpression argument must have a collection result type"); 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"); 612Debug.Assert(TypeSemantics.IsCollectionType(resultType), "DbSkipExpression requires a collection result type"); 668Debug.Assert(TypeSemantics.IsCollectionType(resultType), "DbSkipExpression requires a collection result type");
System\Data\Common\CommandTrees\ValueExpressions.cs (8)
32Debug.Assert(TypeSemantics.IsScalarType(resultType), "DbConstantExpression must have a primitive or enum value"); 33Debug.Assert(!value.GetType().IsEnum || TypeSemantics.IsEnumerationType(resultType), "value is an enum while the result type is not of enum type."); 593if (!TypeSemantics.IsReferenceType(targetEntityRef.ResultType)) 602if (!endType.EdmEquals(targetType) && !TypeSemantics.IsSubTypeOf(targetType, endType)) 642Debug.Assert(args.Count > 0 || TypeSemantics.IsCollectionType(type), "DbNewInstanceExpression requires at least one argument when not creating an empty collection"); 650Debug.Assert(TypeSemantics.IsEntityType(resultType), "An entity type is required to create a NewEntityWithRelationships expression"); 698Debug.Assert(TypeSemantics.IsReferenceType(refResultType), "DbRefExpression requires a reference result type"); 734Debug.Assert(TypeSemantics.IsEntityType(entityResultType), "DbDerefExpression requires an entity result type");
System\Data\Common\DbCommandDefinition.cs (1)
73parameter.IsNullable = TypeSemantics.IsNullable(type);
System\Data\Common\EntitySql\CqlErrorHelper.cs (3)
39if (TypeSemantics.IsAggregateFunction(functionType)) 155if (!TypeSemantics.TryGetCommonType(leftType, rightType, out commonType)) 208if (!TypeSemantics.TryGetCommonType(leftType, rightType, out commonType))
System\Data\Common\EntitySql\FunctionOverloadResolver.cs (5)
39(argType) => TypeSemantics.FlattenType(argType), 40(paramType, argType) => TypeSemantics.FlattenType(paramType), 41(fromType, toType) => TypeSemantics.IsPromotableTo(fromType, toType), 42(fromType, toType) => TypeSemantics.IsStructurallyEqual(fromType, toType), 234if (!TypeSemantics.IsCollectionType(parameterType))
System\Data\Common\EntitySql\SemanticAnalyzer.cs (77)
972if (!TypeSemantics.IsComplexType(metadataType.TypeUsage) && 973!TypeSemantics.IsEntityType(metadataType.TypeUsage) && 974!TypeSemantics.IsRelationshipType(metadataType.TypeUsage)) 1051if (TypeSemantics.IsAggregateFunction(metadataFunctionGroup.FunctionMetadata[0]) && sr.IsInAnyGroupScope()) 1275argTypes.Zip(aggArgTypes).All(types => types.Key == null && types.Value == null || TypeSemantics.IsStructurallyEqual(types.Key, types.Value)), 1283Debug.Assert(TypeSemantics.IsCollectionType(functionType.Parameters[0].TypeUsage), "functionType.Parameters[0].Type is CollectionType"); 1330Debug.Assert(TypeSemantics.IsComplexType(type) || TypeSemantics.IsEntityType(type) || TypeSemantics.IsRelationshipType(type), "type must have a constructor"); 1372bool isPromotable = TypeSemantics.IsPromotableTo(args[idx].ResultType, memberModelTypeUsage); 1376if (!isPromotable && !TypeSemantics.IsPromotableTo(memberModelTypeUsage, args[idx].ResultType)) 1386!TypeSemantics.IsSubTypeOf(args[idx].ResultType, memberModelTypeUsage)) 1599if (!TypeSemantics.IsStructurallyEqualOrPromotableTo(refType, toEnd.TypeUsage.EdmType)) 1607.Where (e => TypeSemantics.IsStructurallyEqualOrPromotableTo(refType, e.TypeUsage.EdmType) && 1634if (!TypeSemantics.IsStructurallyEqualOrPromotableTo(driverEntityType.GetReferenceType(), fromEnd.TypeUsage.EdmType)) 1647.Where(e => TypeSemantics.IsStructurallyEqualOrPromotableTo(driverEntityType.GetReferenceType(), e.TypeUsage.EdmType) && 1734if (!TypeSemantics.IsStructurallyEqualOrPromotableTo(sourceRefType, fromEnd.TypeUsage.EdmType)) 1747.Where (e => TypeSemantics.IsStructurallyEqualOrPromotableTo(sourceRefType, e.TypeUsage.EdmType) && 1805if (!TypeSemantics.IsEntityType(converted.ResultType)) 1833if (!TypeSemantics.IsReferenceType(converted.ResultType)) 1889if (!TypeSemantics.IsStructurallyEqualOrPromotableTo(keyRowExpression.ResultType, TypeUsage.Create(entityKeyRowType))) 1904if (!TypeSemantics.IsEntityType(targetTypeUsage)) 1913if (!TypeSemantics.IsValidPolymorphicCast(entitySet.ElementType, targetTypeUsage.EdmType)) 1945if (TypeSemantics.IsEntityType(converted.ResultType)) 1949else if (!TypeSemantics.IsReferenceType(converted.ResultType)) 1991if (!TypeSemantics.IsNumericType(operands.Left.ResultType)) 1998if (!TypeSemantics.IsNumericType(operands.Right.ResultType)) 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)) 2111if (!TypeSemantics.IsEqualComparableTo(compArgs.Left.ResultType, compArgs.Right.ResultType)) 2138if (!TypeSemantics.IsOrderComparableTo(compArgs.Left.ResultType, compArgs.Right.ResultType)) 2173if (!TypeSemantics.IsCollectionType(leftExpr.ResultType)) 2186if (!TypeSemantics.IsCollectionType(rightExpr.ResultType)) 2194if (!TypeSemantics.TryGetCommonType(leftElemType, rightElemType, out commonType)) 2247if (!TypeSemantics.IsCollectionType(leftExpr.ResultType)) 2274if (!TypeSemantics.IsCollectionType(rightExpr.ResultType)) 2290if (TypeSemantics.IsCollectionType(leftExpr.ResultType)) 2309if (TypeSemantics.IsCollectionType(type)) 2498if (!TypeSemantics.IsEntityType(targetTypeUsage)) 2691if (caseExpr.ElseExpr == null && TypeSemantics.IsCollectionType(resultType)) 2964if (projectionItemErrCtxs != null && TypeSemantics.IsRowType(projectionType)) 2989if (!TypeSemantics.IsPromotableTo(expr.ResultType, sr.TypeResolver.Int64Type)) 3087if (!TypeSemantics.IsCollectionType(converted.ResultType)) 3963Debug.Assert(TypeSemantics.IsCollectionType(lambdaVariable.ResultType)); 3971TypeSemantics.IsRowType(projectExpression.Projection.ResultType)) 3973if (!TypeSemantics.IsEqual(projectExpression.Projection.ResultType, projectExpression.Input.Variable.ResultType)) 4326return TypeSemantics.IsPrimitiveType(type, PrimitiveTypeKind.String); 4331return TypeSemantics.IsPrimitiveType(type, PrimitiveTypeKind.Boolean); 4336return TypeSemantics.IsStructurallyEqual(type1, type2) || type1.IsSubtypeOf(type2) || type2.IsSubtypeOf(type1); 4387if (TypeSemantics.IsNumericType(args.Left.ResultType)) 4479if (TypeSemantics.IsUnsignedNumericType(argument.ResultType)) 4726if (!TypeSemantics.IsCollectionType(elemExpr.ResultType)) 4731if (!TypeSemantics.IsCollectionType(TypeHelpers.GetElementTypeUsage(elemExpr.ResultType))) 4893if (!isNominalTypeAllowed && !TypeSemantics.IsEntityType(exprToFilter.ResultType)) 4900else if (isNominalTypeAllowed && !TypeSemantics.IsNominalType(exprToFilter.ResultType)) 4908if (!isNominalTypeAllowed && !TypeSemantics.IsEntityType(typeToFilterTo)) 4914else if (isNominalTypeAllowed && !TypeSemantics.IsNominalType(typeToFilterTo)) 4921if (!TypeSemantics.IsPolymorphicType(exprToFilter.ResultType)) 4926if (!TypeSemantics.IsPolymorphicType(typeToFilterTo)) 4969if (!isNominalTypeAllowed && !TypeSemantics.IsEntityType(typeToTreatTo)) 4976else if (isNominalTypeAllowed && !TypeSemantics.IsNominalType(typeToTreatTo)) 4988else if (!isNominalTypeAllowed && !TypeSemantics.IsEntityType(exprToTreat.ResultType)) 4995else if (isNominalTypeAllowed && !TypeSemantics.IsNominalType(exprToTreat.ResultType)) 5003if (!TypeSemantics.IsPolymorphicType(exprToTreat.ResultType)) 5008if (!TypeSemantics.IsPolymorphicType(typeToTreatTo)) 5035if (!TypeSemantics.IsScalarType(typeToCastTo)) 5048if (!TypeSemantics.IsScalarType(exprToCast.ResultType)) 5053if (!TypeSemantics.IsCastAllowed(exprToCast.ResultType, typeToCastTo)) 5075if (!TypeSemantics.IsCollectionType(exprToFilter.ResultType)) 5081if (!isNominalTypeAllowed && !TypeSemantics.IsEntityType(elementType)) 5086else if (isNominalTypeAllowed && !TypeSemantics.IsNominalType(elementType)) 5092if (!isNominalTypeAllowed && !TypeSemantics.IsEntityType(typeToFilterTo)) 5097else if (isNominalTypeAllowed && !TypeSemantics.IsNominalType(typeToFilterTo)) 5225if (!TypeSemantics.IsOrderComparableTo(limitsExpr.Left.ResultType, limitsExpr.Right.ResultType)) 5242if (!TypeSemantics.IsOrderComparableTo(valueExpr.ResultType, rangeCommonType))
System\Data\Common\EntitySql\SemanticResolver.cs (6)
600if (TypeSemantics.IsCollectionType(valueExpr.ResultType)) 643if (TypeSemantics.IsReferenceType(valueExpr.ResultType)) 1036return argType != null ? TypeSemantics.FlattenType(argType) : new TypeUsage[] { null }; 1040return argType != null ? TypeSemantics.FlattenType(paramType) : new TypeUsage[] { paramType }; 1053return TypeSemantics.IsPromotableTo(fromType, toType); 1064return TypeSemantics.IsStructurallyEqual(fromType, toType);
System\Data\Common\EntitySql\TypeResolver.cs (2)
303return TypeSemantics.IsStructurallyEqual(x, y); 381if (TypeSemantics.IsEnumerationType(type.TypeUsage))
System\Data\Common\Internal\Materialization\Shaper.cs (1)
680TypeSemantics.IsSubTypeOf(entityTypeUsage.EdmType, expectedSourceType))
System\Data\Common\Internal\Materialization\Translator.cs (1)
2106if (!IsValueLayer && TypeSemantics.IsEnumerationType(columnType))
System\Data\Common\QueryCache\EntityClientCacheKey.cs (4)
130Debug.Assert(TypeSemantics.IsPrimitiveType(type, PrimitiveTypeKind.String), "Update GetTypeUsageToken to return 'Xml' for Xml parameters"); 133else if (TypeSemantics.IsEnumerationType(type)) 142Debug.Assert(TypeSemantics.IsPrimitiveType(type), "EntityParameter TypeUsage not a primitive type?"); 143Debug.Assert(!TypeSemantics.IsPrimitiveType(type, PrimitiveTypeKind.String), "String TypeUsage not derived from DbType.AnsiString, AnsiString, String, StringFixedLength or Xml?");
System\Data\EntityClient\EntityCommandDefinition.cs (1)
329Debug.Assert(TypeSemantics.IsScalarType(queryParameter.Value), "Non-scalar type used as query parameter type");
System\Data\Mapping\FunctionImportMappingComposable.cs (10)
48MetadataHelper.TryGetFunctionImportReturnType<EdmType>(functionImport, 0, out resultType) && TypeSemantics.IsScalarType(resultType), 125Debug.Assert(TypeSemantics.IsPromotableTo(functionViewType, this.FunctionImport.ReturnParameter.TypeUsage), "Mapping expression result type must be promotable to the c-space function return type."); 155if (TypeSemantics.IsEnumerationType(argumentNode.Op.Type)) 162Debug.Assert(TypeSemantics.IsPromotableTo(argumentNode.Op.Type, commandParam.ResultType), "Argument type must be promotable to parameter type."); 229TypeSemantics.IsPromotableTo(queryExpression.ResultType, this.FunctionImport.ReturnParameter.TypeUsage), 236TypeSemantics.IsEqual(queryExpression.ResultType, this.FunctionImport.ReturnParameter.TypeUsage), 417if (!TypeSemantics.IsEqual(accessorExpr.ResultType, edmProperty.TypeUsage)) 444Debug.Assert(TypeSemantics.IsCollectionType(queryExpression.ResultType), "Store function must be TVF (collection expected)."); 446Debug.Assert(TypeSemantics.IsRowType(collectionType.TypeUsage), "Store function must be TVF (collection of rows expected)."); 453if (TypeSemantics.IsEqual(functionImportReturnType.TypeUsage, column.TypeUsage))
System\Data\Mapping\StorageMappingItemLoader.cs (5)
1626Debug.Assert(TypeSemantics.IsScalarType(resultType), "TypeSemantics.IsScalarType(resultType)"); 2307bool directlyPromotable = TypeSemantics.IsStructurallyEqualOrPromotableTo(fromType, toType); 2308bool inverselyPromotable = TypeSemantics.IsStructurallyEqualOrPromotableTo(toType, fromType); 3651else if (!TypeSemantics.IsSubTypeOf(ResolveTypeUsageForEnums(member.TypeUsage), modelColumnMember)) 4406if (!TypeSemantics.IsIntegerNumericType(rowsAffectedParameter.TypeUsage))
System\Data\Mapping\Update\Internal\ExtractorMetadata.cs (1)
387this.CheckIsNotNull = !TypeSemantics.IsNullable(member) &&
System\Data\Metadata\Edm\TypeUsage.cs (1)
444if (!TypeSemantics.IsNullable(this))
System\Data\Metadata\EdmItemCollection.cs (1)
472if (!TypeSemantics.IsStructurallyEqual(function.ReturnParameter.TypeUsage, generatedDefinition.Body.ResultType))
System\Data\Metadata\ObjectHelper.cs (2)
218return TypeSemantics.IsSubTypeOf(TypeUsage.Create(Helper.GetUnderlyingEdmTypeForEnumType(cspaceType.EdmType)), storeType); 221return TypeSemantics.IsSubTypeOf(cspaceType, storeType);
System\Data\Metadata\TypeHelpers.cs (30)
37if (TypeSemantics.IsCollectionType(typeUsage)) 41else if (TypeSemantics.IsStructuralType(typeUsage) && !Helper.IsComplexType(typeUsage.EdmType) && !Helper.IsEntityType(typeUsage.EdmType)) 48else if (TypeSemantics.IsPrimitiveType(typeUsage)) 86if (TypeSemantics.IsRowType(typeUsage)) 100return TypeSemantics.IsOrderComparable(typeUsage); 138else if (TypeSemantics.IsRowType(typeUsage)) 160return TypeSemantics.IsReferenceType(typeUsage) || 161TypeSemantics.IsEntityType(typeUsage) || 162TypeSemantics.IsScalarType(typeUsage); 168return TypeSemantics.IsReferenceType(typeUsage) || 169TypeSemantics.IsEntityType(typeUsage) || 170TypeSemantics.IsScalarType(typeUsage); 175return TypeSemantics.GetCommonType(typeUsage1, typeUsage2); 194commonType = TypeSemantics.GetCommonType(commonType, testType); 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)) 445Debug.Assert(TypeSemantics.IsScalarType(scalarType), "Primitive or enum type expected."); 447return TypeSemantics.IsEnumerationType(scalarType) ? 460Debug.Assert(TypeSemantics.IsEnumerationType(enumTypeUsage), "enumTypeUsage is not an enumerated type"); 473Debug.Assert(TypeSemantics.IsStrongSpatialType(spatialTypeUsage), "spatialTypeUsage is not a strong spatial type"); 569if (TypeSemantics.IsCollectionType(type)) 573else if (TypeSemantics.IsReferenceType(type)) 586if (tvf.ReturnParameter != null && TypeSemantics.IsCollectionType(tvf.ReturnParameter.TypeUsage)) 589if (TypeSemantics.IsRowType(expectedElementTypeUsage)) 770if (!TypeSemantics.IsIntegerNumericType(valueType))
System\Data\Metadata\TypeSemantics.cs (3)
275if (TypeSemantics.TryGetCommonType(type1, type2, out commonType)) 513return TypeSemantics.IsPrimitiveType(type, PrimitiveTypeKind.Boolean); 1133TypeSemantics.AssertTypeInvariant("Common Type closure is incorrect",
System\Data\Objects\DataClasses\RelatedEnd.cs (1)
399!TypeSemantics.IsSubTypeOf(targetEntitySet.ElementType, targetEntityType))
System\Data\Objects\ELinq\ExpressionConverter.cs (7)
557if (toType == null || !TypeSemantics.IsScalarType(toType) || !TypeSemantics.IsScalarType(fromType)) 593bool isPrimitiveType = TypeSemantics.IsPrimitiveType(fromType); 616return TypeSemantics.IsSubTypeOf(fromType, toType); 634(!TypeSemantics.IsEntityType(toType) && 635!TypeSemantics.IsComplexType(toType))) 1189if (!TypeSemantics.TryGetCommonType(leftType, rightType, out commonType))
System\Data\Objects\ELinq\Funcletizer.cs (1)
295(TypeSemantics.IsScalarType(typeUsage)))
System\Data\Objects\ELinq\MethodCallTranslator.cs (13)
781if (!TypeSemantics.IsPromotableTo(actualReturnType, expectedReturnType)) 1194!TypeSemantics.IsPrimitiveType(argument.ResultType, PrimitiveTypeKind.Int32)) 1606if (!TypeSemantics.IsEqualComparable(outerKeySelector.ResultType) || 1607!TypeSemantics.IsEqualComparable(innerKeySelector.ResultType)) 1870return TypeSemantics.IsEnumerationType(returnType) ? 1913return TypeSemantics.IsEnumerationType(returnType) ? 2047if (TypeSemantics.IsCollectionType(operand.ResultType)) 2071!(TypeSemantics.IsEntityType(modelType) || TypeSemantics.IsComplexType(modelType))) 2332Debug.Assert(TypeSemantics.IsScalarType(element.ResultType), "Primitive or enum type expected at this point."); 2752if (!TypeSemantics.IsEqualComparable(keySelector.ResultType)) 2874if (!TypeSemantics.IsEqualComparable(outerSelector.ResultType) || 2875!TypeSemantics.IsEqualComparable(innerSelector.ResultType))
System\Data\Objects\ELinq\Translator.cs (6)
667Debug.Assert(!TypeSemantics.IsCollectionType(argument.ResultType), "Did not expect collection type"); 687Debug.Assert(!TypeSemantics.IsCollectionType(argument.ResultType), "Did not expect collection type"); 1096if (TypeSemantics.IsPrimitiveType(left.ResultType, PrimitiveTypeKind.String) && 1097TypeSemantics.IsPrimitiveType(right.ResultType, PrimitiveTypeKind.String)) 1182if (TypeSemantics.IsBooleanType(left.ResultType)) 1230if (TypeSemantics.IsBooleanType(operand.ResultType))
System\Data\Objects\Internal\ObjectSpanRewriter.cs (5)
702TypeSemantics.IsSubTypeOf(compareType, fromEntityType) || 703TypeSemantics.IsSubTypeOf(fromEntityType, compareType)); 742Debug.Assert(TypeSemantics.IsCollectionType(expression.ResultType), "Non-collection input to projection?"); 747if (!TypeSemantics.IsEntityType(elementType) && !TypeSemantics.IsReferenceType(elementType))
System\Data\Objects\ObjectContext.cs (1)
1919!TypeSemantics.IsEntityType(entityTypeUsage))
System\Data\Objects\ObjectParameter.cs (1)
327(TypeSemantics.IsScalarType(type)))
System\Data\Query\InternalTrees\Command.cs (1)
616else if (TypeSemantics.IsBooleanType(type))
System\Data\Query\InternalTrees\Metadata.cs (1)
175return (m_property == null) || TypeSemantics.IsNullable(m_property);
System\Data\Query\InternalTrees\Ops.cs (1)
539return (other.OpType == this.OpType && TypeSemantics.IsStructurallyEqual(this.Type, other.Type));
System\Data\Query\InternalTrees\ScalarOps.cs (1)
1076Debug.Assert(!TypeSemantics.IsEntityType(type), "cannot use this Op for entity construction");
System\Data\Query\PlanCompiler\ColumnMapProcessor.cs (7)
225if (md.TypeSemantics.IsPartOfKey(property)) 368if (md.TypeSemantics.IsComplexType(typeInfo.Type)) 384if (md.TypeSemantics.IsStructurallyEqual(value.Type, typeInfo.Type)) 494if (md.TypeSemantics.IsRowType(type)) 500if (md.TypeSemantics.IsReferenceType(type)) 512if (md.TypeSemantics.IsComplexType(type)) 517if (md.TypeSemantics.IsEntityType(type))
System\Data\Query\PlanCompiler\CTreeGenerator.cs (2)
221PlanCompiler.Assert(TypeSemantics.IsCollectionType(publisher.ResultType), "non-collection type used as RelOpInfo publisher"); 1491PlanCompiler.Assert(TypeSemantics.IsPrimitiveType(predicateExpr.ResultType, PrimitiveTypeKind.Boolean), "Invalid FilterOp Predicate (non-ScalarOp or non-Boolean result)");
System\Data\Query\PlanCompiler\ITreeGenerator.cs (13)
312if (TypeSemantics.IsCollectionType(_iqtCommand.Root.Op.Type)) 334(TypeSemantics.IsPrimitiveType(paramType) || paramType.EdmType is EnumType)); 361if (TypeSemantics.IsPrimitiveType(expr.ResultType, PrimitiveTypeKind.Boolean)) 510PlanCompiler.Assert(TypeSemantics.IsCollectionType(resultType), "RelOp with non-Collection result type"); 657PlanCompiler.Assert(TypeSemantics.IsCollectionType(scalar.Type), "An expression used as a RelOp argument was neither a RelOp or a collection"); 1324if (TypeSemantics.IsEntityType(commonType) && 1497if (TypeSemantics.IsEntityType(e.Argument.ResultType)) 1596PlanCompiler.Assert(TypeSemantics.IsCollectionType(expression.ResultType), "SetOp DbExpression does not have collection result type?"); 2004PlanCompiler.Assert(TypeSemantics.IsCollectionType(e.Argument.ResultType), "Non-Collection Type Argument in DbOfTypeExpression"); 2037if (TypeSemantics.IsCollectionType(e.ResultType)) 2041else if (TypeSemantics.IsRowType(e.ResultType)) 2045else if (TypeSemantics.IsEntityType(e.ResultType)) 2071if (TypeSemantics.IsStructuralType(e.ResultType))
System\Data\Query\PlanCompiler\NominalTypeEliminator.cs (31)
193foreach (var paramVar in m_command.Vars.OfType<ParameterVar>().Where(v => md.TypeSemantics.IsEnumerationType(v.Type) || md.TypeSemantics.IsStrongSpatialType(v.Type)).ToArray()) 195ParameterVar newVar = md.TypeSemantics.IsEnumerationType(paramVar.Type) 251else if (md.TypeSemantics.IsEnumerationType(type)) 255else if (md.TypeSemantics.IsStrongSpatialType(type)) 796else if (md.TypeSemantics.IsEnumerationType(varDefOp.Var.Type) || md.TypeSemantics.IsStrongSpatialType(varDefOp.Var.Type)) 1382if (md.TypeSemantics.IsEnumerationType(unnestTableColumnVar.Type) || md.TypeSemantics.IsStrongSpatialType(unnestTableColumnVar.Type)) 1643else if (md.TypeSemantics.IsEnumerationType(v.Type) || md.TypeSemantics.IsStrongSpatialType(v.Type)) 1731if (md.TypeSemantics.IsRowType(oldType)) 1789else if (md.TypeSemantics.IsCollectionType(oldType)) 1798else if (md.TypeSemantics.IsPrimitiveType(oldType)) 1806PlanCompiler.Assert(md.TypeSemantics.IsNominalType(oldType) || 1807md.TypeSemantics.IsReferenceType(oldType), 1833if (md.TypeSemantics.IsEnumerationType(op.Type)) 1836PlanCompiler.Assert(md.TypeSemantics.IsPrimitiveType(n.Child0.Op.Type), "Primitive type expected."); 1841if (md.TypeSemantics.IsSpatialType(op.Type)) 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."); 1880if (md.TypeSemantics.IsEnumerationType(op.Type)) 1893if (md.TypeSemantics.IsStrongSpatialType(op.Type)) 1948if (TypeUtils.IsCollectionType(op.Type) || md.TypeSemantics.IsEnumerationType(op.Type) || md.TypeSemantics.IsStrongSpatialType(op.Type)) 2128PlanCompiler.Assert(!(md.TypeSemantics.IsComplexType(child0Type) || md.TypeSemantics.IsComplexType(child1Type)), "complex type?"); // cannot be a complex type 2866if(md.TypeSemantics.IsEnumerationType(op.Type)) 2870else if (md.TypeSemantics.IsStrongSpatialType(op.Type)) 2945md.TypeSemantics.IsStructurallyEqual(arg.Type, op.Type) || 2946md.TypeSemantics.IsSubTypeOf(arg.Type, op.Type))
System\Data\Query\PlanCompiler\Normalizer.cs (3)
117PlanCompiler.Assert(TypeSemantics.IsCollectionType(collectionNode.Op.Type), "non-collection usage for Unnest?"); 135PlanCompiler.Assert(TypeSemantics.IsCollectionType(op.Type), "non-TVF function?"); 226if (TypeSemantics.IsCollectionType(op.Type))
System\Data\Query\PlanCompiler\PlanCompilerUtil.cs (3)
40if (!TypeSemantics.IsRowType(op.Type)) 82TypeSemantics.IsCollectionType(n.Child0.Op.Type) && 83TypeSemantics.IsAggregateFunction(op.Function));
System\Data\Query\PlanCompiler\PreProcessor.cs (13)
88if (TypeSemantics.IsSubTypeOf(RootEntityType, neededRootEntityType)) 95if (!TypeSemantics.IsSubTypeOf(neededRootEntityType, RootEntityType)) 282TypeSemantics.IsSubTypeOf(entityType.EdmType, set.ElementType) || 283TypeSemantics.IsSubTypeOf(set.ElementType, entityType.EdmType))) 314TypeSemantics.IsSubTypeOf(entitySet.ElementType, typeFilter.IsOfType.EdmType)) 1174if (TypeSemantics.IsCollectionType(op.Type) || PlanCompilerUtil.IsCollectionAggregateFunction(op, n)) 1228if (op.OpType == OpType.IsNull && TypeSemantics.IsRowType(n.Child0.Op.Type) || TypeSemantics.IsComplexType(n.Child0.Op.Type)) 1251if (TypeSemantics.IsReferenceType(resultType)) 1259if (!TypeSemantics.IsStructurallyEqualOrPromotableTo(resultType, op.Type)) 2428if (TypeSemantics.IsCollectionType(typeUsage)) 2434if (TypeSemantics.IsRowType(typeUsage) || TypeSemantics.IsComplexType(typeUsage))
System\Data\Query\PlanCompiler\PropertyPushdownHelper.cs (6)
278if (md.TypeSemantics.IsReferenceType(op.Type)) 282else if (md.TypeSemantics.IsNominalType(op.Type)) 287else if (md.TypeSemantics.IsRowType(op.Type)) 356else if (md.TypeSemantics.IsRowType(childOpType) || md.TypeSemantics.IsReferenceType(childOpType)) 360PlanCompiler.Assert(md.TypeSemantics.IsEntityType(childOpType), "unexpected childOpType?");
System\Data\Query\PlanCompiler\ProviderCommandInfoUtils.cs (2)
67PlanCompiler.Assert(md.TypeSemantics.IsRowType(collType.TypeUsage), "command rowtype is not a record"); 107PlanCompiler.Assert(md.TypeSemantics.IsRowType(outputType), "PhysicalProjectOp result type is not a RowType?");
System\Data\Query\PlanCompiler\StructuredTypeInfo.cs (6)
586else if (kv.Value.IsRootType && (md.TypeSemantics.IsEntityType(kv.Key) || md.TypeSemantics.IsComplexType(kv.Key))) 648return typeInfo.ImmediateSubTypes.Count > 0 && !md.TypeSemantics.IsReferenceType(typeInfo.Type); 806if (md.TypeSemantics.IsEntityType(rootType.Type)) 949if (md.TypeSemantics.IsEntityType(type.Type) && 1045if (md.TypeSemantics.IsStrongSpatialType(type))
System\Data\Query\PlanCompiler\TypeUtils.cs (7)
124return (md.TypeSemantics.IsReferenceType(type) || 125md.TypeSemantics.IsRowType(type) || 126md.TypeSemantics.IsEntityType(type) || 127md.TypeSemantics.IsRelationshipType(type) || 128(md.TypeSemantics.IsComplexType(type) && !IsUdt(type))); 138return md.TypeSemantics.IsCollectionType(type); 148return md.TypeSemantics.IsEnumerationType(type);
System\Data\Query\PlanCompiler\VarInfo.cs (2)
317PlanCompiler.Assert(md.TypeSemantics.IsScalarType(v.Type), "The current variable should be of primitive or enum type."); 318PlanCompiler.Assert(md.TypeSemantics.IsScalarType(newVar.Type), "The new variable should be of primitive or enum type.");
System\Data\Query\ResultAssembly\BridgeDataReader.cs (1)
197if (TypeSemantics.IsReferenceType(typeUsage)) {
System\Data\SqlClient\SqlGen\Sql8ExpressionRewriter.cs (3)
308if (TypeSemantics.IsPrimitiveType(properties[i].TypeUsage)) 314Debug.Assert(TypeSemantics.IsEntityType(properties[i].TypeUsage) || TypeSemantics.IsRowType(properties[i].TypeUsage),
System\Data\SqlClient\SqlGen\SqlFunctionCallHandler.cs (7)
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); 1448if (TypeSemantics.IsPrimitiveType(e.Arguments[0].ResultType, PrimitiveTypeKind.Byte)) 1818if (TypeSemantics.IsPrimitiveType(e.Arguments[i].ResultType, type))
System\Data\SqlClient\SqlGen\SqlGenerator.cs (12)
522if (TypeSemantics.IsCollectionType(targetTree.Query.ResultType)) 728if (TypeSemantics.IsPrimitiveType(e.Left.ResultType, PrimitiveTypeKind.String)) 885if (!TypeSemantics.IsPrimitiveType(type, PrimitiveTypeKind.String)) 1761if (TypeSemantics.IsCollectionType(e.ResultType)) 1808if (TypeSemantics.IsPrimitiveType(comparisonExpression.Left.ResultType, PrimitiveTypeKind.String)) 1931if (TypeSemantics.IsPrimitiveType(key.ResultType, PrimitiveTypeKind.String)) 2936bool isScalarElement = TypeSemantics.IsPrimitiveType(collectionType.TypeUsage); 3271if (TypeSemantics.IsRowType(argument.ResultType)) 3404if ((sym.Type == null) || TypeSemantics.IsPrimitiveType(sym.Type)) 3480if ((symbol.Type == null) || TypeSemantics.IsPrimitiveType(symbol.Type)) 4080Debug.Assert(TypeSemantics.IsCollectionType(e.ResultType)); 4112Debug.Assert(TypeSemantics.IsCollectionType(e.ResultType));
System\Data\SqlClient\SqlProviderServices.cs (3)
158if (TypeSemantics.IsPrimitiveType(parameterType, PrimitiveTypeKind.String) || 159TypeSemantics.IsPrimitiveType(parameterType, PrimitiveTypeKind.Binary)) 395bool isNullable = TypeSemantics.IsNullable(type);