361 references to TypeUsage
System.Data.Entity (270)
System\Data\Common\CommandTrees\ExpressionBuilder\DbExpressionBuilder.cs (1)
2789resultType = properties[0].TypeUsage;
System\Data\Common\CommandTrees\ExpressionBuilder\Internal\ArgumentValidation.cs (7)
105TypeUsage endType = end.TypeUsage; 1148RequireCompatibleType(valueExp, keyMembers[idx].TypeUsage, "keyValues", idx); 1661EntityTypeBase expectedSourceType = TypeHelpers.GetEdmType<RefType>(relatedRef.SourceEnd.TypeUsage).ElementType; 1837Debug.Assert(null != memberMeta.TypeUsage, "EdmMember constructor allowed null for TypeUsage?"); 1839if(!CheckDataSpace(memberMeta.TypeUsage) || !CheckDataSpace(memberMeta.DeclaringType)) 1962if (!CheckDataSpace(prop.TypeUsage)) 2021TypeUsage retType = end.TypeUsage;
System\Data\Common\CommandTrees\Internal\ExpressionCopier.cs (3)
139TypeUsage mappedPropType = this.VisitTypeUsage(originalProp.TypeUsage); 140if (!object.ReferenceEquals(originalProp.TypeUsage, mappedPropType)) 146prop => new KeyValuePair<string, TypeUsage>(prop.Name, prop.TypeUsage)
System\Data\Common\CommandTrees\Internal\ExpressionDumper.cs (3)
277Dump(prop.TypeUsage, "PropertyType"); 296Dump(end.TypeUsage, "EndType"); 317Dump(navProp.TypeUsage, "PropertyType");
System\Data\Common\CommandTrees\Internal\ExpressionPrinter.cs (1)
337BuildTypeName(text, recColumn.TypeUsage);
System\Data\Common\CommandTrees\Internal\ViewSimplifier.cs (2)
161EntityType requiredSourceNavType = (EntityType)TypeHelpers.GetEdmType<RefType>(dependentSetEnd.CorrespondingAssociationEndMember.TypeUsage).ElementType; 282EntityType principalEntityType = (EntityType)TypeHelpers.GetEdmType<RefType>(fkConstraint.FromRole.TypeUsage).ElementType;
System\Data\Common\CommandTrees\ValueExpressions.cs (1)
599EntityTypeBase endType = TypeHelpers.GetEdmType<RefType>(targetEnd.TypeUsage).ElementType;
System\Data\Common\DataRecord.cs (2)
285return GetMember(ordinal).TypeUsage.EdmType.Name; 317EdmType edmMemberType = GetMember(ordinal).TypeUsage.EdmType;
System\Data\Common\EntitySql\CqlErrorHelper.cs (4)
141ReportIncompatibleCommonType(errCtx, rootLeftType, rootRightType, leftRow.Members[i].TypeUsage, rightRow.Members[i].TypeUsage); 202leftComplex.Members[i].TypeUsage, 203rightComplex.Members[i].TypeUsage);
System\Data\Common\EntitySql\SemanticAnalyzer.cs (11)
330ValidateQueryResultType(property.TypeUsage, errCtx); 1599if (!TypeSemantics.IsStructurallyEqualOrPromotableTo(refType, toEnd.TypeUsage.EdmType)) 1601throw EntityUtil.EntitySqlError(relshipExpr.RefExpr.ErrCtx, Strings.RelatedEndExprTypeMustBePromotoableToToEnd(refType.FullName, toEnd.TypeUsage.EdmType.FullName)); 1607.Where (e => TypeSemantics.IsStructurallyEqualOrPromotableTo(refType, e.TypeUsage.EdmType) && 1634if (!TypeSemantics.IsStructurallyEqualOrPromotableTo(driverEntityType.GetReferenceType(), fromEnd.TypeUsage.EdmType)) 1637Strings.SourceTypeMustBePromotoableToFromEndRelationType(driverEntityType.FullName, fromEnd.TypeUsage.EdmType.FullName)); 1647.Where(e => TypeSemantics.IsStructurallyEqualOrPromotableTo(driverEntityType.GetReferenceType(), e.TypeUsage.EdmType) && 1734if (!TypeSemantics.IsStructurallyEqualOrPromotableTo(sourceRefType, fromEnd.TypeUsage.EdmType)) 1737Strings.SourceTypeMustBePromotoableToFromEndRelationType(sourceRefType.FullName, fromEnd.TypeUsage.EdmType.FullName)); 1747.Where (e => TypeSemantics.IsStructurallyEqualOrPromotableTo(sourceRefType, e.TypeUsage.EdmType) && 2970if (!TypeHelpers.IsValidDistinctOpType(rowType.Members[i].TypeUsage))
System\Data\Common\Internal\Materialization\Shaper.cs (1)
676EdmType expectedSourceType = ((RefType)sourceEnd.TypeUsage.EdmType).ElementType;
System\Data\Common\Internal\Materialization\Translator.cs (1)
503result = rowType.Members[0].TypeUsage.EdmType;
System\Data\Common\Utils\MetadataHelper.cs (9)
204return member.TypeUsage.EdmType.BuiltInTypeKind == BuiltInTypeKind.PrimitiveType || 205member.TypeUsage.EdmType.BuiltInTypeKind == BuiltInTypeKind.EnumType; 222Debug.Assert(end.TypeUsage.EdmType.BuiltInTypeKind == BuiltInTypeKind.RefType, 224RefType refType = (RefType)end.TypeUsage.EdmType; 509EntityType thisEndsEntityType = (EntityType)((RefType)thisEnd.TypeUsage.EdmType).ElementType; 522otherEndType = (EntityType)((RefType)((AssociationEndMember)constraint.FromRole).TypeUsage.EdmType).ElementType; 527otherEndType = (EntityType)((RefType)((AssociationEndMember)constraint.ToRole).TypeUsage.EdmType).ElementType; 770return GetConcurrencyMode(member.TypeUsage); 790if (member.TypeUsage.Facets.TryGetValue(EdmProviderManifest.StoreGeneratedPatternFacetName, false, out storeGeneratedFacet) &&
System\Data\EntityClient\EntityCommandDefinition.cs (1)
230if (property.TypeUsage.EdmType.BuiltInTypeKind == BuiltInTypeKind.ComplexType)
System\Data\EntityKey.cs (3)
1097Debug.Assert(Helper.IsScalarType(keyMember.TypeUsage.EdmType), "key member must be of a scalar type"); 1099EdmType keyMemberEdmType = keyMember.TypeUsage.EdmType; 1118Debug.Assert(Helper.IsEnumType(keyMember.TypeUsage.EdmType), "Enum type expected");
System\Data\Mapping\BaseMetadataMappingVisitor.cs (5)
146Visit(edmProperty.TypeUsage); 153Visit(navigationProperty.TypeUsage); 158Visit(edmMember.TypeUsage); 162Visit(associationEndMember.TypeUsage); 181Visit(relationshipEndMember.TypeUsage);
System\Data\Mapping\DefaultObjectMappingItemCollection.cs (36)
307EdmType clrPropertyType = ConvertCSpaceToOSpaceType(column.TypeUsage.EdmType); 346EdmType cdmPropertyType = ConvertOSpaceToCSpaceType(column.TypeUsage.EdmType); 517if (edmMember.TypeUsage.EdmType.BuiltInTypeKind != objectMember.TypeUsage.EdmType.BuiltInTypeKind) 522edmMember.TypeUsage.EdmType.Name, edmMember.TypeUsage.EdmType.BuiltInTypeKind, edmMember.Name, edmMember.DeclaringType.FullName, 523objectMember.TypeUsage.EdmType.Name, objectMember.TypeUsage.EdmType.BuiltInTypeKind, objectMember.Name, objectMember.DeclaringType.FullName)); 526if (Helper.IsPrimitiveType(edmMember.TypeUsage.EdmType)) 528PrimitiveType memberType = Helper.GetSpatialNormalizedPrimitiveType(edmMember.TypeUsage.EdmType); 531if (memberType.PrimitiveTypeKind != ((PrimitiveType)objectMember.TypeUsage.EdmType).PrimitiveTypeKind) 535edmMember.TypeUsage.EdmType.FullName, edmMember.Name, edmMember.DeclaringType.FullName, 536objectMember.TypeUsage.EdmType.FullName, objectMember.Name, objectMember.DeclaringType.FullName)); 539else if (Helper.IsEnumType(edmMember.TypeUsage.EdmType)) 542Helper.IsEnumType(objectMember.TypeUsage.EdmType), 545ValidateEnumTypeMapping((EnumType)edmMember.TypeUsage.EdmType, (EnumType)objectMember.TypeUsage.EdmType); 554edmMemberType = ((RefType)edmMember.TypeUsage.EdmType).ElementType; 555objectMemberType = ((RefType)objectMember.TypeUsage.EdmType).ElementType; 558Helper.IsCollectionType(edmMember.TypeUsage.EdmType)) 560edmMemberType = ((CollectionType)edmMember.TypeUsage.EdmType).TypeUsage.EdmType; 561objectMemberType = ((CollectionType)objectMember.TypeUsage.EdmType).TypeUsage.EdmType; 565edmMemberType = edmMember.TypeUsage.EdmType; 566objectMemberType = objectMember.TypeUsage.EdmType; 572edmMember.TypeUsage.EdmType.FullName, edmMember.Name, edmMember.DeclaringType.FullName, 573objectMember.TypeUsage.EdmType.FullName, objectMember.Name, objectMember.DeclaringType.FullName)); 589Helper.IsScalarType(edmProperty.TypeUsage.EdmType), 592Helper.IsScalarType(objectProperty.TypeUsage.EdmType), 635if (Helper.IsComplexType(edmMember.TypeUsage.EdmType)) 769Debug.Assert(edmEnd.TypeUsage.EdmType.BuiltInTypeKind == BuiltInTypeKind.RefType, "Ends must be of Ref type"); 773LoadTypeMapping(((RefType)edmEnd.TypeUsage.EdmType).ElementType, 774((RefType)objectEnd.TypeUsage.EdmType).ElementType, ocItemCollection, typeMappings); 793Debug.Assert(containingEdmMember.TypeUsage.EdmType.BuiltInTypeKind == BuiltInTypeKind.ComplexType, "edm member declaringType must be of complexType"); 794Debug.Assert(containingClrMember.TypeUsage.EdmType.BuiltInTypeKind == BuiltInTypeKind.ComplexType, "clr member declaringType must be of complexType"); 796ComplexType edmComplexType = (ComplexType)containingEdmMember.TypeUsage.EdmType; 797ComplexType objectComplexType = (ComplexType)containingClrMember.TypeUsage.EdmType;
System\Data\Mapping\FunctionImportMappingComposable.cs (3)
417if (!TypeSemantics.IsEqual(accessorExpr.ResultType, edmProperty.TypeUsage)) 419accessorExpr = accessorExpr.CastTo(edmProperty.TypeUsage); 453if (TypeSemantics.IsEqual(functionImportReturnType.TypeUsage, column.TypeUsage))
System\Data\Mapping\FunctionImportMappingNonComposable.cs (1)
205columns[property.Name] = property.TypeUsage;
System\Data\Mapping\StorageConditionPropertyMapping.cs (1)
145EdmType memberType = (ColumnProperty != null) ? ColumnProperty.TypeUsage.EdmType : null;
System\Data\Mapping\StorageEndPropertyMapping.cs (1)
135sb.Append(this.EndMember.TypeUsage.EdmType.FullName);
System\Data\Mapping\StorageMappingItemLoader.cs (27)
2278if (!ValidateFunctionImportMappingResultTypeCompatibility(TypeUsage.Create(scalarResultType), cTypeTvfElementType.Properties[0].TypeUsage)) 2393Debug.Assert(Helper.IsPrimitiveType(cTypeColumn.TypeUsage.EdmType), "S-space columns are expected to be of a primitive type."); 2394var cPrimitiveType = (PrimitiveType)cTypeColumn.TypeUsage.EdmType; 2402Strings.Mapping_InvalidContent_ConditionMapping_InvalidPrimitiveTypeKind, column.Name, column.TypeUsage.EdmType.FullName, 2454if (!Helper.IsScalarType(property.TypeUsage.EdmType)) 2487if (ValidateFunctionImportMappingResultTypeCompatibility(property.TypeUsage, cTypeColumn.TypeUsage)) 2883if (!Helper.IsScalarType(member.TypeUsage.EdmType)) 2934memberType = member.TypeUsage.EdmType; 3142RefType endRef = end.TypeUsage.EdmType as RefType; 3238EdmType edmType = conditionMember.TypeUsage.EdmType; 3246cspaceTypeUsage = StoreItemCollection.StoreProviderManifest.GetEdmType(conditionMember.TypeUsage); 3257cspaceTypeUsage = conditionMember.TypeUsage; 3598Helper.IsScalarType(member.TypeUsage.EdmType), 3600Debug.Assert(Helper.IsPrimitiveType(columnMember.TypeUsage.EdmType), "s-space column type must be primitive"); 3629m_scalarMemberMappings.Add(member, new KeyValuePair<TypeUsage, TypeUsage>(storeEquivalentTypeUsage, columnMember.TypeUsage)); 3636TypeUsage modelColumnMember = columnMember.TypeUsage.GetModelTypeUsage(); 3637if (!Object.ReferenceEquals(columnMember.TypeUsage.EdmType, storeMappedTypeUsage.EdmType)) 3651else if (!TypeSemantics.IsSubTypeOf(ResolveTypeUsageForEnums(member.TypeUsage), modelColumnMember)) 3666cSpaceMember.TypeUsage.EdmType + GetFacetsForDisplay(cSpaceMember.TypeUsage), 3669sSpaceMember.TypeUsage.EdmType + GetFacetsForDisplay(sSpaceMember.TypeUsage), 4147if (!property.TypeUsage.EdmType.Equals(complexType) && 4148!Helper.IsSubtypeOf(property.TypeUsage.EdmType, complexType)) 4279property.TypeUsage, 4289property.TypeUsage.EdmType,
System\Data\Mapping\StorageScalarPropertyMapping.cs (2)
60Helper.IsScalarType(member.TypeUsage.EdmType), 62Debug.Assert(Helper.IsPrimitiveType(columnMember.TypeUsage.EdmType), "StorageScalarPropertyMapping must only map primitive types");
System\Data\Mapping\Update\Internal\DynamicUpdateCommand.cs (2)
130if (Helper.IsSpatialType(member.TypeUsage) && !reader.IsDBNull(ordinal)) 132value = SpatialHelpers.GetSpatialValue(translator.MetadataWorkspace, reader, member.TypeUsage, ordinal);
System\Data\Mapping\Update\Internal\ExtractorMetadata.cs (1)
388(isNullConditionMember || member.TypeUsage.EdmType.BuiltInTypeKind == BuiltInTypeKind.ComplexType);
System\Data\Mapping\Update\Internal\FunctionUpdateCommand.cs (1)
255TypeUsage columnType = members[resultColumn.Value.RecordOrdinal].TypeUsage;
System\Data\Mapping\Update\Internal\Propagator.ExtentPlaceholderCreator.cs (1)
172EntityType entityType = (EntityType)((RefType)end.TypeUsage.EdmType).ElementType;
System\Data\Mapping\Update\Internal\UpdateCompiler.cs (1)
438Debug.Assert(Helper.IsPrimitiveType(property.TypeUsage.EdmType), "Properties in SSpace should be primitive.");
System\Data\Mapping\Update\Internal\UpdateTranslator.cs (8)
347Debug.Assert(BuiltInTypeKind.RefType == role.TypeUsage.EdmType.BuiltInTypeKind, 349RefType endType = (RefType)role.TypeUsage.EdmType; 539else if (!Helper.IsSpatialType(member.TypeUsage)) 543if (Helper.IsEnumType(member.TypeUsage.EdmType)) 545PrimitiveType underlyingType = Helper.AsPrimitive(member.TypeUsage.EdmType); 553Debug.Assert(BuiltInTypeKind.PrimitiveType == member.TypeUsage.EdmType.BuiltInTypeKind, 555PrimitiveType primitiveType = (PrimitiveType)member.TypeUsage.EdmType; 694properties.Add(new EdmProperty(resultBinding.ColumnName, resultBinding.Property.TypeUsage));
System\Data\Mapping\ViewGeneration\DiscriminatorMap.cs (1)
171if (kv.Key.IsSubtypeOf(relProperty.FromEnd.TypeUsage.EdmType))
System\Data\Mapping\ViewGeneration\QueryRewriting\FragmentQueryKB.cs (2)
56EntityType type = (EntityType)((RefType)endMember.TypeUsage.EdmType).ElementType; 64derivedTypes.UnionWith(MetadataHelper.GetTypeAndSubtypesOf(end.CorrespondingAssociationEndMember.TypeUsage.EdmType, edmItemCollection, false));
System\Data\Mapping\ViewGeneration\Structures\LeafCellTreeNode.cs (2)
219EntityType toEndEntityType = (EntityType)((RefType)(toEnd.TypeUsage.EdmType)).ElementType; 220EntityType fromEndEntityType = (EntityType)(((RefType)fromEnd.TypeUsage.EdmType).ElementType);
System\Data\Mapping\ViewGeneration\Structures\MemberPath.cs (4)
141if (LeafEdmMember.TypeUsage.Facets.TryGetValue(EdmProviderManifest.DefaultValueFacetName, false, out facet)) 222return LeafEdmMember.TypeUsage.EdmType; 521prevType = member.TypeUsage.EdmType; 573((RefType)edmMember.TypeUsage.EdmType).ElementType,
System\Data\Mapping\ViewGeneration\Structures\MemberProjectionIndex.cs (2)
245Debug.Assert(structuralMember.TypeUsage.EdmType is ComplexType || 246structuralMember.TypeUsage.EdmType is RefType, // for association ends
System\Data\Mapping\ViewValidator.cs (1)
175foreach (ComplexType complexType in properties.Select(p => p.TypeUsage.EdmType).OfType<ComplexType>())
System\Data\Metadata\Converter.cs (2)
508EntityTypeBase fromEntityType = ((RefType)fromMember.TypeUsage.EdmType).ElementType; 509EntityTypeBase toEntityType = ((RefType)toMember.TypeUsage.EdmType).ElementType;
System\Data\Metadata\Edm\EdmMember.cs (2)
127if (TypeUsage.Facets.TryGetValue(EdmProviderManifest.StoreGeneratedPatternFacetName, false, out item)) 143if (TypeUsage.Facets.TryGetValue(EdmProviderManifest.StoreGeneratedPatternFacetName, false, out item))
System\Data\Metadata\Edm\EdmProperty.cs (2)
109return (bool)TypeUsage.Facets[DbProviderManifest.NullableFacetName].Value; 121return TypeUsage.Facets[DbProviderManifest.DefaultValueFacetName].Value;
System\Data\Metadata\Edm\RelationshipEndMember.cs (2)
80if (TypeUsage == null) 82return (EntityType)((RefType)TypeUsage.EdmType).ElementType;
System\Data\Metadata\Edm\RowType.cs (3)
150property.TypeUsage.BuildIdentity(identity); 218!thisMember.TypeUsage.EdmEquals(otherMember.TypeUsage))
System\Data\Metadata\Edm\StructuralType.cs (3)
107Debug.Assert(this.DataSpace == member.TypeUsage.EdmType.DataSpace || this.BuiltInTypeKind == BuiltInTypeKind.RowType, "Wrong member type getting added in structural type"); 116this.DataSpace = member.TypeUsage.EdmType.DataSpace; 120else if (this.DataSpace != (DataSpace)(-1) && member.TypeUsage.EdmType.DataSpace != this.DataSpace)
System\Data\Metadata\Edm\TypeUsage.cs (1)
418TypeUsage newTypeUsage = sspaceProperty.TypeUsage.GetModelTypeUsage();
System\Data\Metadata\EdmValidator.cs (2)
398if (item.TypeUsage == null) 404InternalValidate(item.TypeUsage, errors, validatedItems);
System\Data\Metadata\ObjectHelper.cs (7)
126return GetModelTypeUsage(member.TypeUsage); 145Debug.Assert(edmProperty.TypeUsage.EdmType.DataSpace == DataSpace.CSpace, "cspace property must have a cspace type"); 146Debug.Assert(columnProperty.TypeUsage.EdmType.DataSpace == DataSpace.SSpace, "sspace type usage must have a sspace type"); 148Helper.IsScalarType(edmProperty.TypeUsage.EdmType), 150Debug.Assert(Helper.IsPrimitiveType(columnProperty.TypeUsage.EdmType), "sspace property must contain a primitive type"); 155edmProperty.TypeUsage, 156columnProperty.TypeUsage,
System\Data\Metadata\ObjectLayer\ObjectItemAttributeAssemblyLoader.cs (2)
581((RefType)navigationProperty.FromEndMember.TypeUsage.EdmType).ElementType.ClrType != declaringType.ClrType) 588((RefType)navigationProperty.FromEndMember.TypeUsage.EdmType).ElementType.ClrType), navigationProperty));
System\Data\Metadata\ObjectLayer\ObjectItemConventionAssemblyLoader.cs (15)
387foreach (EdmProperty cspaceProperty in cspaceType.GetDeclaredOnlyMembers<EdmProperty>().Where(m => Helper.IsComplexType(m.TypeUsage.EdmType))) 488if (SessionData.CspaceToOspace.TryGetValue((StructuralType)cspaceProperty.TypeUsage.EdmType, out propertyType)) 499Strings.Validator_OSpace_Convention_MissingOSpaceType(cspaceProperty.TypeUsage.EdmType.FullName), 500cspaceProperty.TypeUsage.EdmType); 515if (Helper.IsCollectionType(cspaceProperty.TypeUsage.EdmType)) 518foundTarget = SessionData.CspaceToOspace.TryGetValue((StructuralType)((CollectionType)cspaceProperty.TypeUsage.EdmType).TypeUsage.EdmType, out findType); 529foundTarget = SessionData.CspaceToOspace.TryGetValue((StructuralType)cspaceProperty.TypeUsage.EdmType, out findType); 552EntityTypeBase missingType = cspaceProperty.RelationshipType.RelationshipEndMembers.Select(e => ((RefType)e.TypeUsage.EdmType).ElementType).First(e => e != cspaceType); 563foreach (EdmProperty cspaceProperty in cspaceType.GetDeclaredOnlyMembers<EdmProperty>().Where(p => Helper.IsPrimitiveType(p.TypeUsage.EdmType))) 603foreach (EdmProperty cspaceProperty in cspaceType.GetDeclaredOnlyMembers<EdmProperty>().Where(p => Helper.IsEnumType(p.TypeUsage.EdmType))) 641if (SessionData.CspaceToOspace.TryGetValue(cspaceProperty.TypeUsage.EdmType, out propertyType)) 652cspaceProperty.TypeUsage.EdmType); 661Strings.Validator_OSpace_Convention_MissingOSpaceType(cspaceProperty.TypeUsage.EdmType.FullName), 662cspaceProperty.TypeUsage.EdmType); 716return ((RefType)relationshipEndMember.TypeUsage.EdmType).ElementType;
System\Data\Metadata\TypeHelpers.cs (3)
45AssertEdmType(m.TypeUsage); 91if (!IsValidSortOpKeyType(property.TypeUsage)) 143if (!IsSetComparableOpType(property.TypeUsage))
System\Data\Metadata\TypeSemantics.cs (9)
190return ((RowType)t.EdmType).Properties.Select(p => p.TypeUsage); 639return IsNullable(edmMember.TypeUsage); 770if (!IsPromotableTo(fromRowType.Properties[i].TypeUsage, toRowType.Properties[i].TypeUsage)) 946if (!TryGetCommonType(rowType1.Properties[i].TypeUsage, rowType2.Properties[i].TypeUsage, out columnCommonTypeUsage)) 1008if (!IsEqualComparable(rowProperty.TypeUsage)) 1087if (!CompareTypes(fromProp.TypeUsage, toProp.TypeUsage, equivalenceOnly))
System\Data\Objects\DataClasses\EntityCollection.cs (1)
199EntityType associationEndType = (EntityType)((RefType)((AssociationEndMember)this.ToEndMember).TypeUsage.EdmType).ElementType;
System\Data\Objects\DataClasses\RelatedEnd.cs (1)
571var parameterEdmType = parameterMember.TypeUsage.EdmType;
System\Data\Objects\DataClasses\RelationshipManager.cs (4)
783RefType referenceType = association.AssociationEndMembers[0].TypeUsage.EdmType as RefType; 790referenceType = association.AssociationEndMembers[1].TypeUsage.EdmType as RefType; 1464if (constraint.ToRole.TypeUsage.EdmType == entitySet.ElementType.GetReferenceType()) 1475if (constraint.FromRole.TypeUsage.EdmType == entitySet.ElementType.GetReferenceType())
System\Data\Objects\DataRecordObjectView.cs (2)
158if (fieldDescriptor != null && fieldDescriptor.EdmProperty != null && fieldDescriptor.EdmProperty.TypeUsage.EdmType.BuiltInTypeKind == BuiltInTypeKind.RowType) 161propertyDescriptors = MaterializedDataRecord.CreatePropertyDescriptorCollection((RowType)fieldDescriptor.EdmProperty.TypeUsage.EdmType, typeof(IDataRecord), true);
System\Data\Objects\ELinq\ExpressionConverter.cs (1)
1122VerifyTypeSupportedForComparison(clrType, member.TypeUsage, memberPath);
System\Data\Objects\EntityEntry.cs (10)
1344_cache.GetOrAddStateManagerTypeMetadata(member.CdmMetadata.TypeUsage.EdmType), retValue); 1348_cache.GetOrAddStateManagerTypeMetadata(member.CdmMetadata.TypeUsage.EdmType), retValue); 1352_cache.GetOrAddStateManagerTypeMetadata(member.CdmMetadata.TypeUsage.EdmType), retValue); 1356_cache.GetOrAddStateManagerTypeMetadata(member.CdmMetadata.TypeUsage.EdmType), retValue, parentEntityPropertyIndex); 1448StateManagerTypeMetadata typeMetadata = _cache.GetOrAddStateManagerTypeMetadata(memberMetadata.CdmMetadata.TypeUsage.EdmType); 1733StateManagerTypeMetadata typeMetadata = _cache.GetOrAddStateManagerTypeMetadata(member.CdmMetadata.TypeUsage.EdmType); 1944StateManagerTypeMetadata metadata = _cache.GetOrAddStateManagerTypeMetadata(complexMember.CdmMetadata.TypeUsage.EdmType); 2057StateManagerTypeMetadata typeMetadata = _cache.GetOrAddStateManagerTypeMetadata(member.CdmMetadata.TypeUsage.EdmType); 3291if (Helper.IsComplexType(field.FieldType.TypeUsage.EdmType)) 3312Debug.Assert(Helper.IsScalarType(field.FieldType.TypeUsage.EdmType), "Expected primitive or enum type.");
System\Data\Objects\FieldDescriptor.cs (1)
45_fieldType = DetermineClrType(_property.TypeUsage);
System\Data\Objects\Internal\ComplexTypeMaterializer.cs (1)
174this.GetExistingComplex = Helper.IsComplexType(property.TypeUsage.EdmType)
System\Data\Objects\Internal\ObjectFullSpanRewriter.cs (1)
153TryGetEntityType(navProp.TypeUsage, out retType);
System\Data\Objects\Internal\ObjectSpanRewriter.cs (1)
700EntityType fromEntityType = (EntityType)((RefType)fromEnd.TypeUsage.EdmType).ElementType;
System\Data\Objects\ObjectContext.cs (1)
2529parameters[i].TypeUsage = keyMember.TypeUsage;
System\Data\Objects\ObjectStateManagerMetadata.cs (3)
66_isComplexType = (Helper.IsEntityType(_edmProperty.TypeUsage.EdmType) || 67Helper.IsComplexType(_edmProperty.TypeUsage.EdmType)); 83return _clrProperty.TypeUsage.EdmType.ClrType;
System\Data\Query\InternalTrees\ColumnMapFactory.cs (4)
187propertyMaps[i] = new ScalarColumnMap(modelProp.TypeUsage, modelProp.Name, 0, ordinal); 278if (!Helper.IsScalarType(member.TypeUsage.EdmType)) 280throw EntityUtil.InvalidOperation(Strings.ADP_InvalidDataReaderUnableToMaterializeNonScalarType(member.Name, member.TypeUsage.EdmType.FullName)); 285propertyColumnMaps[index] = new ScalarColumnMap(member.TypeUsage, member.Name, 0, ordinal);
System\Data\Query\InternalTrees\Command.cs (1)
943return new RelPropertyOp(prop.ToEnd.TypeUsage, prop);
System\Data\Query\InternalTrees\Metadata.cs (1)
153: this(table, property.Name, property.TypeUsage)
System\Data\Query\InternalTrees\RelPropertyHelper.cs (1)
137EntityTypeBase entityType = (EntityTypeBase)((RefType)fromEnd.TypeUsage.EdmType).ElementType;
System\Data\Query\PlanCompiler\ColumnMapProcessor.cs (1)
313ColumnMap propertyColumnMap = CreateColumnMap(property.ToEnd.TypeUsage, property.ToString());
System\Data\Query\PlanCompiler\NominalTypeEliminator.cs (3)
2600CaseOp normalizer = m_command.CreateCaseOp(typeInfo.RootType.TypeIdProperty.TypeUsage); 2618ConstantBaseOp discriminatorValueOp = m_command.CreateConstantOp(md.Helper.GetModelTypeUsage(op.DiscriminatorMap.DiscriminatorProperty.TypeUsage), 2820md.RowType nestedFlatType = m_typeInfo.GetTypeInfo(relProp.ToEnd.TypeUsage).FlattenedType;
System\Data\Query\PlanCompiler\PreProcessor.cs (8)
718Node esTableNode = BuildOfTypeTable(entitySet, TypeHelpers.GetElementTypeUsage(end.TypeUsage), out esVar); 724m_command.CreateNode(m_command.CreateGetEntityRefOp(end.TypeUsage), m_command.CreateNode(m_command.CreateVarRefOp(esVar))), 842TypeUsage entityType = TypeHelpers.GetElementTypeUsage(relProperty.ToEnd.TypeUsage); 1003m_command.CreateGetEntityRefOp(relProperty.FromEnd.TypeUsage), 1250TypeUsage resultType = navProperty.ToEndMember.TypeUsage; 1613keyFieldTypes.Add(new KeyValuePair<string, TypeUsage>(k.Name, k.TypeUsage)); 1659return m_command.CreateNode(m_command.CreateNullOp(relProperty.ToEnd.TypeUsage)); 2440AddTypeNeedingNullSentinel(typesNeedingNullSentinel, m.TypeUsage);
System\Data\Query\PlanCompiler\StructuredTypeInfo.cs (7)
535CreateTypeInfoForType(m.TypeUsage); 547CreateTypeInfoForType(p.ToEnd.TypeUsage); 858TypeInfo propertyType = ExplodeType(p.TypeUsage); 906md.EdmType refType = p.ToEnd.TypeUsage.EdmType; 907TypeInfo refTypeInfo = GetTypeInfo(p.ToEnd.TypeUsage); 1086md.TypeUsage innerType = ((SimplePropertyRef)innerProperty).Property.TypeUsage; 1101result = (p as RelPropertyRef).Property.ToEnd.TypeUsage;
System\Data\SqlClient\SqlGen\DmlSqlGenerator.cs (5)
135string columnType = SqlGenerator.GenerateSqlForStoreType(sqlVersion, column.TypeUsage); 147if (column.TypeUsage.Facets.TryGetValue(DbProviderManifest.CollationFacetName, false, out collationFacet)) 261if (!IsValidScopeIdentityColumnType(keyMember.TypeUsage)) 402if (!IsValidScopeIdentityColumnType(keyMember.TypeUsage)) 405keyMember.Name, keyMember.TypeUsage.ToString()));
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\SqlGenerator.cs (1)
3284Symbol column = new Symbol(member.Name, member.TypeUsage);
System\Data\SqlClient\SqlProviderUtilities.cs (3)
345TypeUsage type = column.TypeUsage; 352column.TypeUsage.Facets.TryGetValue("StoreGeneratedPattern", false, out storeGenFacet) && 402if (!isTimestamp && column.TypeUsage.Facets.TryGetValue("StoreGeneratedPattern", false, out storeGenFacet) &&
System.Data.Entity.Design (45)
System\Data\Entity\Design\Common\MetadataItemSerializer.cs (3)
321string typeName = GetFullName(((RefType)end.TypeUsage.EdmType).ElementType); 427_writer.WriteAttributeString(XmlConstants.TypeAttribute, GetTypeName(member.TypeUsage)); 428WritePropertyTypeFacets(member.TypeUsage);
System\Data\Entity\Design\Common\OneToOneMappingSerializer.cs (4)
232return ((RefType)constraint0.ToRole.TypeUsage.EdmType).ElementType == _storeEntitySet.ElementType && ((RefType)constraint1.ToRole.TypeUsage.EdmType).ElementType == _storeEntitySet.ElementType; 497Debug.Assert(store.TypeUsage.EdmType.BuiltInTypeKind == BuiltInTypeKind.PrimitiveType, "only expect scalar type properties"); 498Debug.Assert(model.TypeUsage.EdmType.BuiltInTypeKind == BuiltInTypeKind.PrimitiveType, "only expect scalar type properties");
System\Data\Entity\Design\EntityModelSchemaGenerator.cs (7)
807TypeUsage cspaceTypeUsage = storeProperty.TypeUsage.GetModelTypeUsage(); 811this.AddStoreGeneratedPatternAnnoation(property, storeProperty.TypeUsage); 1053EntityType entityType = (EntityType)((RefType)from.TypeUsage.EdmType).ElementType; 1057NavigationProperty navigationProperty = new NavigationProperty(name, to.TypeUsage); 1086Debug.Assert(storeEndMember.TypeUsage.EdmType.BuiltInTypeKind == BuiltInTypeKind.RefType, "The type is not a ref type"); 1087Debug.Assert(((RefType)storeEndMember.TypeUsage.EdmType).ElementType.BuiltInTypeKind == BuiltInTypeKind.EntityType, "the ref is not holding on to an EntityType"); 1089EntityType storeEntityType = ((EntityType)((RefType)storeEndMember.TypeUsage.EdmType).ElementType);
System\Data\Entity\Design\EntityStoreSchemaGenerator.cs (1)
1198if (!MetadataUtil.IsValidKeyType(_targetEntityFrameworkVersion, pkColumn.TypeUsage.EdmType))
System\Data\EntityModel\Emitters\AssociationTypeEmitter.cs (1)
57return new CodeTypeOfExpression(Generator.GetFullyQualifiedTypeReference(((RefType)end.TypeUsage.EdmType).ElementType));
System\Data\EntityModel\Emitters\AttributeEmitter.cs (5)
214if (MetadataUtil.IsPrimitiveType(emitter.Item.TypeUsage.EdmType) || MetadataUtil.IsEnumerationType(emitter.Item.TypeUsage.EdmType)) 234Debug.Assert(MetadataUtil.IsComplexType(emitter.Item.TypeUsage.EdmType) || 235(MetadataUtil.IsCollectionType(emitter.Item.TypeUsage.EdmType)), 248if (!MetadataUtil.IsCollectionType(emitter.Item.TypeUsage.EdmType))
System\Data\EntityModel\Emitters\NavigationPropertyEmitter.cs (2)
330Debug.Assert(endMember.TypeUsage.EdmType.BuiltInTypeKind == BuiltInTypeKind.RefType, "not a reference type"); 331EntityTypeBase type = ((RefType)endMember.TypeUsage.EdmType).ElementType;
System\Data\EntityModel\Emitters\PropertyEmitter.cs (21)
126if (MetadataUtil.IsComplexType(Item.TypeUsage.EdmType)) 232if (MetadataUtil.IsComplexType(Item.TypeUsage.EdmType)) 237if (GetCollectionKind(Item.TypeUsage) == CollectionKind.None) 261PrimitiveType primitiveType = Item.TypeUsage.EdmType as PrimitiveType; 334if (MetadataUtil.IsPrimitiveType(Item.TypeUsage.EdmType)) 338else if (MetadataUtil.IsComplexType(Item.TypeUsage.EdmType)) 343else if (MetadataUtil.IsCollectionType(Item.TypeUsage.EdmType)) 345if (MetadataUtil.IsComplexType(((CollectionType)Item.TypeUsage.EdmType).TypeUsage.EdmType)) 347EmitComplexTypePropertySetStatements(statements, GetCollectionKind(Item.TypeUsage)); 351Debug.Assert(MetadataUtil.IsPrimitiveType(((CollectionType)Item.TypeUsage.EdmType).TypeUsage.EdmType), 353EmitScalarTypePropertySetStatements(statements, GetCollectionKind(Item.TypeUsage)); 357else if (MetadataUtil.IsEnumerationType(Item.TypeUsage.EdmType)) 454Debug.Assert(((MetadataUtil.IsPrimitiveType(Item.TypeUsage.EdmType)) || (MetadataUtil.IsCollectionType(Item.TypeUsage.EdmType))) 464PrimitiveType primitiveType = (PrimitiveType)Item.TypeUsage.EdmType; 568EdmType propertyType = property.TypeUsage.EdmType; 584types = new PropertyTypeReferences(TypeReference, (PrimitiveType)typeUsage.EdmType, GetCollectionKind(property.TypeUsage)); 589types = new PropertyTypeReferences(TypeReference, (ComplexType)typeUsage.EdmType, GetCollectionKind(property.TypeUsage), Generator); 696&& Utils.TryGetPrimitiveTypeKind(property.TypeUsage.EdmType, out type)) 937if (Helper.IsCollectionType(Item.TypeUsage.EdmType) && GetCollectionKind(Item.TypeUsage) != CollectionKind.None)
System\Data\EntityModel\Emitters\StructuredTypeEmitter.cs (1)
210if (MetadataUtil.IsComplexType(propertyEmitter.Item.TypeUsage.EdmType))
System.Data.Services (10)
System\Data\Services\Providers\ObjectContextServiceProvider.cs (10)
149EntityType targetEntityType = (EntityType)((RefType)sourceNavigationProperty.ToEndMember.TypeUsage.EdmType).ElementType; 1398switch (member.TypeUsage.EdmType.BuiltInTypeKind) 1405throw new NotSupportedException(Strings.ObjectContext_PrimitiveTypeNotSupported(member.Name, edmType.Name, member.TypeUsage.EdmType.Name)); 1429Type propertyClrType = GetClrTypeForCSpaceType(workspace, (EntityType)((CollectionType)member.TypeUsage.EdmType).TypeUsage.EdmType); 1434Debug.Assert(false, "Invalid member type encountered on " + member.Name + " - " + member.TypeUsage.EdmType.BuiltInTypeKind); 1733xmlWriter.WriteAttributeString(XmlConstants.Type, member.TypeUsage.EdmType.FullName); 1734WriteFacets(xmlWriter, member.TypeUsage); 1913xmlWriter.WriteAttributeString(XmlConstants.Type, ((RefType)end.TypeUsage.EdmType).ElementType.FullName); 2595EdmType targetType = ((RefType)((NavigationProperty)member).ToEndMember.TypeUsage.EdmType).ElementType; 2620EdmType endType = ((RefType)member.TypeUsage.EdmType).ElementType;
System.Data.Services.Design (23)
System\Data\EntityModel\Emitters\AttributeEmitter.cs (8)
247StructuralType entityPropertyType = entityProperty.TypeUsage.EdmType as StructuralType; 292baseEntityType = entityProperty.TypeUsage.EdmType as StructuralType; 319ComplexType complexType = complexProperty.TypeUsage.EdmType as ComplexType; 330if (subProperty.TypeUsage.EdmType.BuiltInTypeKind == BuiltInTypeKind.ComplexType) 381new EdmInfo { IsComplex = redefinedProperty.TypeUsage.EdmType.BuiltInTypeKind == BuiltInTypeKind.ComplexType, Member = redefinedProperty }, 395if (entityProperty.TypeUsage.EdmType.BuiltInTypeKind == BuiltInTypeKind.ComplexType && propertyInformation.PathGiven) 402if (IsOpenPropertyOnPath(entityProperty.TypeUsage.EdmType as StructuralType, originalPath)) 419new EdmInfo { IsComplex = entityPropertyCurrent.TypeUsage.EdmType.BuiltInTypeKind == BuiltInTypeKind.ComplexType, Member = entityPropertyCurrent },
System\Data\EntityModel\Emitters\NavigationPropertyEmitter.cs (2)
327Debug.Assert((BuiltInTypeKind.RefType == endMember.TypeUsage.EdmType.BuiltInTypeKind), "not a reference type"); 328EntityTypeBase type = ((RefType)endMember.TypeUsage.EdmType).ElementType;
System\Data\EntityModel\Emitters\PropertyEmitter.cs (12)
131if (TypeSemantics.IsComplexType(Item.TypeUsage)) 232if (Helper.IsComplexType(Item.TypeUsage.EdmType)) 237if (GetCollectionKind(Item.TypeUsage) == CollectionKind.None) 278PrimitiveType primitiveType = Item.TypeUsage.EdmType as PrimitiveType; 364if (Helper.IsComplexType(Item.TypeUsage.EdmType)) 366if (GetCollectionKind(Item.TypeUsage) == CollectionKind.None) 493EdmType propertyType = property.TypeUsage.EdmType; 509types = new PropertyTypeReferences(TypeReference, (PrimitiveType)typeUsage.EdmType, GetCollectionKind(property.TypeUsage)); 514types = new PropertyTypeReferences(TypeReference, (ComplexType)typeUsage.EdmType, GetCollectionKind(property.TypeUsage), Generator); 623&& Utils.TryGetPrimitiveTypeKind(property.TypeUsage.EdmType, out type)) 862if (Helper.IsCollectionType(Item.TypeUsage.EdmType) && GetCollectionKind(Item.TypeUsage) != CollectionKind.None)
System\Data\EntityModel\Emitters\StructuredTypeEmitter.cs (1)
202if (TypeSemantics.IsComplexType(propertyEmitter.Item.TypeUsage))
System.Web.DynamicData (4)
DynamicData\ModelProviders\EFAssociationProvider.cs (1)
31EntityType value = (EntityType)navigationProperty.ToEndMember.TypeUsage.EdmType.MetadataProperties.Single(prop => prop.Name == "ElementType").Value;
DynamicData\ModelProviders\EFColumnProvider.cs (3)
62foreach (Facet facet in EdmMember.TypeUsage.Facets) { 98var edmType = EdmMember.TypeUsage.EdmType; 146var edmType = member.TypeUsage.EdmType;
System.Web.Entity (8)
System\Data\WebControls\EntityDataSourceColumn.cs (2)
199Debug.Assert(EntityDataSourceUtil.IsScalar(keyMember.TypeUsage.EdmType), "Expected primitive or enum type for key members."); 239get { return EntityDataSourceUtil.IsScalar(keyMember.TypeUsage.EdmType); }
System\Data\WebControls\EntityDataSourceMemberPath.cs (1)
96get { return EntityDataSourceUtil.IsScalar(this.property.TypeUsage.EdmType); }
System\Data\WebControls\EntityDataSourceUtil.cs (4)
700EdmType memberType = member.TypeUsage.EdmType; 717if (member.TypeUsage.Facets.TryGetValue("Nullable", true, out facet)) 864EntityType entityType = (EntityType)((RefType)end.TypeUsage.EdmType).ElementType; 986EdmType propertyType = property.TypeUsage.EdmType;
System\Data\WebControls\OrderByBuilder.cs (1)
252if (keyMemberNames.Contains(property.Name) && EntityDataSourceUtil.IsScalar(property.TypeUsage.EdmType))
System.Web.Entity.Design (1)
System\Data\WebControls\Design\EntityDataSourceDataSelection.cs (1)
609if (member.TypeUsage.EdmType.BuiltInTypeKind == BuiltInTypeKind.ComplexType)