System\Data\Common\EntitySql\FunctionOverloadResolver.cs (1)
337EdmType t;
System\Data\Common\Utils\MetadataHelper.cs (30)
28internal static bool TryGetFunctionImportReturnType<T>(EdmFunction functionImport, int resultSetIndex, out T returnType) where T : EdmType
36|| typeof(EdmType).Equals(typeof(T)) && resultType is EdmType)
46private static bool TryGetWrappedReturnEdmTypeFromFunctionImport<T>(EdmFunction functionImport, int resultSetIndex, out T resultType) where T : EdmType
100internal static EdmType GetAndCheckFunctionImportReturnType<TElement>(EdmFunction functionImport, int resultSetIndex, MetadataWorkspace workspace)
102EdmType expectedEdmType;
103if (!MetadataHelper.TryGetFunctionImportReturnType<EdmType>(functionImport, resultSetIndex, out expectedEdmType))
115internal static void CheckFunctionImportReturnType<TElement>(EdmType expectedEdmType, MetadataWorkspace workspace)
120EdmType spatialNormalizedEdmType = expectedEdmType;
126EdmType modelEdmType;
159internal static bool TryDetermineCSpaceModelType<T>(MetadataWorkspace workspace, out EdmType modelEdmType)
164internal static bool TryDetermineCSpaceModelType(Type type, MetadataWorkspace workspace, out EdmType modelEdmType)
171EdmType objectEdmType;
172if (objectItemCollection.TryGetItem<EdmType>(nonNullabelType.FullName, out objectEdmType))
210internal static bool HasDiscreteDomain(EdmType edmType)
350internal static IEnumerable<EdmType> GetTypeAndSubtypesOf(EdmType type, MetadataWorkspace workspace, bool includeAbstractTypes)
355internal static IEnumerable<EdmType> GetTypeAndSubtypesOf(EdmType type, ItemCollection itemCollection, bool includeAbstractTypes)
369foreach (EdmType subType in GetTypeAndSubtypesOf<EntityType>(type, itemCollection, includeAbstractTypes))
375foreach (EdmType subType in GetTypeAndSubtypesOf<ComplexType>(type, itemCollection, includeAbstractTypes))
381private static IEnumerable<EdmType> GetTypeAndSubtypesOf<T_EdmType>(EdmType type, ItemCollection itemCollection, bool includeAbstractTypes)
382where T_EdmType : EdmType
406internal static IEnumerable<EdmType> GetTypeAndParentTypesOf(EdmType type, ItemCollection itemCollection, bool includeAbstractTypes)
414EdmType specificType = type;
671internal static bool IsSuperTypeOf(EdmType superType, EdmType subType)
673EdmType currentType = subType;
System\Data\EntityModel\SchemaObjectModel\TypeUsageBuilder.cs (8)
112private bool TryGetFacets(EdmType edmType, bool complainOnMissingFacet, out Dictionary<string, Facet> calculatedFacets)
184internal void ValidateAndSetTypeUsage(EdmType edmType, bool complainOnMissingFacet)
365private void ValidateAndSetBinaryFacets(EdmType type, Dictionary<string, Facet> facets)
371private void ValidateAndSetDecimalFacets(EdmType type, Dictionary<string, Facet> facets)
428private void ValidatePrecisionFacetsForDateTimeFamily(EdmType type, Dictionary<string, Facet> facets)
455private void ValidateAndSetStringFacets(EdmType type, Dictionary<string, Facet> facets)
460private void ValidateLengthFacets(EdmType type, Dictionary<string, Facet> facets)
491private void ValidateSpatialFacets(EdmType type, Dictionary<string, Facet> facets)
System\Data\Mapping\DefaultObjectMappingItemCollection.cs (36)
81EdmType cdmType = null;
82EdmType clrType = null;
88if (!m_edmCollection.TryGetItem<EdmType>(identity, true, out cdmType))
105m_edmCollection.TryGetItem<EdmType>(identity, ignoreCase, out cdmType))
116if (!m_objectCollection.TryGetItem<EdmType>(identity, true, out clrType))
133m_objectCollection.TryGetItem<EdmType>(identity, ignoreCase, out clrType))
137m_edmCollection.TryGetItem<EdmType>(cspaceTypeName, out cdmType);
208EdmType edmType = item as EdmType;
235private Map GetDefaultMapping(EdmType cdmType, EdmType clrType) {
240private Map GetOCMapForTransientType(EdmType edmType, DataSpace typeSpace)
243EdmType clrType = null;
244EdmType cdmType = null;
293private EdmType ConvertCSpaceToOSpaceType(EdmType cdmType)
295EdmType clrType = null;
299EdmType elemType = ConvertCSpaceToOSpaceType(((CollectionType)cdmType).TypeUsage.EdmType);
307EdmType clrPropertyType = ConvertCSpaceToOSpaceType(column.TypeUsage.EdmType);
332private EdmType ConvertOSpaceToCSpaceType(EdmType clrType)
334EdmType cdmType = null;
338EdmType elemType = ConvertOSpaceToCSpaceType(((CollectionType)clrType).TypeUsage.EdmType);
346EdmType cdmPropertyType = ConvertOSpaceToCSpaceType(column.TypeUsage.EdmType);
429internal static ObjectTypeMapping LoadObjectMapping(EdmType cdmType, EdmType objectType, DefaultObjectMappingItemCollection ocItemCollection)
446private static ObjectTypeMapping LoadObjectMapping(EdmType edmType, EdmType objectType, DefaultObjectMappingItemCollection ocItemCollection,
549EdmType edmMemberType;
550EdmType objectMemberType;
606private static void LoadEntityTypeOrComplexTypeMapping(ObjectTypeMapping objectMapping, EdmType edmType, EdmType objectType,
748private static void LoadAssociationTypeMapping(ObjectTypeMapping objectMapping, EdmType edmType, EdmType objectType,
807private static ObjectTypeMapping LoadTypeMapping(EdmType edmType, EdmType objectType,
System\Data\Mapping\StorageMappingItemLoader.cs (19)
893Set<EdmType> functionMappedTypes = new Set<EdmType>();
900Set<EdmType> unmappedTypes = new Set<EdmType>(MetadataHelper.GetTypeAndSubtypesOf(setMapping.Set.ElementType, EdmItemCollection, false /*includeAbstractTypes*/));
904Set<EdmType> abstractTypes = new Set<EdmType>();
991IEnumerable<EdmType> typeAndSubTypes = MetadataHelper.GetTypeAndSubtypesOf(entityType, EdmItemCollection, false /*includeAbstractTypes*/);
1606EdmType resultType;
1607if (MetadataHelper.TryGetFunctionImportReturnType<EdmType>(functionImport, 0, out resultType))
2261EdmType scalarResultType,
2672EdmType containerType = null;
2833private StorageScalarPropertyMapping LoadScalarPropertyMapping(XPathNavigator nav, EdmType containerType, ReadOnlyMetadataCollection<EdmProperty> tableProperties)
2905private StorageComplexPropertyMapping LoadComplexPropertyMapping(XPathNavigator nav, EdmType containerType, ReadOnlyMetadataCollection<EdmProperty> tableProperties)
2915EdmType memberType = null;
2961this.EdmItemCollection.TryGetItem<EdmType>(memberTypeName, out memberType);
3005private StorageComplexTypeMapping LoadComplexTypeMapping(XPathNavigator nav, EdmType type, ReadOnlyMetadataCollection<EdmProperty> tableType)
3077EdmType containerType = typeMapping.GetOwnerType(StorageMappingItemLoader.GetAttributeValue(nav.Clone(), StorageMslConstructs.ComplexPropertyNameAttribute));
3180private StorageConditionPropertyMapping LoadConditionPropertyMapping(XPathNavigator nav, EdmType containerType, ReadOnlyMetadataCollection<EdmProperty> tableProperties)
3238EdmType edmType = conditionMember.TypeUsage.EdmType;
System\Data\Mapping\ViewGeneration\QueryRewriting\QueryRewriter.cs (16)
58EdmType _generatedType;
77internal QueryRewriter(EdmType generatedType, ViewgenContext context, ViewGenMode typesGenerationMode)
211IEnumerable<EdmType> types;
215HashSet<EdmType> type = new HashSet<EdmType>();
299internal FragmentQuery GetDomainQuery(IEnumerable<FragmentQuery> fragmentQueries, EdmType generatedType)
312IEnumerable<EdmType> derivedTypes;
316HashSet<EdmType> type = new HashSet<EdmType>();
435EdmType edmType = typeConstant.EdmType;
1147private static IEnumerable<Constant> GetTypeConstants(IEnumerable<EdmType> types)
1149foreach (EdmType type in types)
1155private static IEnumerable<MemberPath> GetNonConditionalScalarMembers(EdmType edmType, MemberPath currentPath, MemberDomainMap domainMap)
1160private static IEnumerable<MemberPath> GetConditionalComplexMembers(EdmType edmType, MemberPath currentPath, MemberDomainMap domainMap)
1165private static IEnumerable<MemberPath> GetNonConditionalComplexMembers(EdmType edmType, MemberPath currentPath, MemberDomainMap domainMap)
1170private static IEnumerable<MemberPath> GetConditionalScalarMembers(EdmType edmType, MemberPath currentPath, MemberDomainMap domainMap)
System\Data\Metadata\Converter.cs (13)
352entityType.BaseType = (EdmType)(LoadSchemaElement(element.BaseType,
421complexType.BaseType = (EdmType)(LoadSchemaElement(element.BaseType,
727EdmType propertyType;
737propertyType = (EdmType)LoadSchemaElement(somProperty.Type, providerManifest, convertedItemCache, newGlobalItems);
795EdmType edmType = toEndEntityType;
1134EdmType edmType;
1170edmType = (EdmType)LoadSchemaElement(type,
1401private readonly Dictionary<EdmType, TypeUsage> _nullFacetsTypeUsage;
1402private readonly Dictionary<EdmType, TypeUsage> _nullFacetsCollectionTypeUsage;
1409this._nullFacetsTypeUsage = new Dictionary<EdmType, TypeUsage>();
1410this._nullFacetsCollectionTypeUsage = new Dictionary<EdmType, TypeUsage>();
1419internal TypeUsage GetTypeUsageWithNullFacets(EdmType edmType)
1441internal TypeUsage GetCollectionTypeUsageWithNullFacets(EdmType edmType)
System\Data\Metadata\Edm\ItemCollection.cs (8)
249public EdmType GetType(string name, string namespaceName)
262public bool TryGetType(string name, string namespaceName, out EdmType type)
275public EdmType GetType(string name, string namespaceName, bool ignoreCase)
279return GetItem<EdmType>(EdmType.CreateEdmTypeIdentity(namespaceName, name), ignoreCase);
291public bool TryGetType(string name, string namespaceName, bool ignoreCase, out EdmType type)
296TryGetValue(EdmType.CreateEdmTypeIdentity(namespaceName, name), ignoreCase, out item);
297type = item as EdmType;
System\Data\Metadata\ObjectItemCollection.cs (20)
56private Dictionary<string, EdmType> _ocMapping = new Dictionary<string, EdmType>();
238internal static Dictionary<string, EdmType> LoadTypesExpensiveWay(Assembly assembly)
240Dictionary<string, EdmType> typesInLoading = null;
265Dictionary<string, EdmType> typesInLoading = LoadTypesExpensiveWay(entityClrType.Assembly);
268EdmType edmType;
285Dictionary<string, EdmType> typesInLoading = LoadTypesExpensiveWay(assembly);
289foreach (EdmType edmType in typesInLoading.Values)
334Dictionary<string, EdmType> typesInLoading;
366foreach (EdmType edmType in typesInLoading.Values)
450return ObjectItemCollection.GetClrType((EdmType)objectSpaceType);
463return ObjectItemCollection.TryGetClrType((EdmType)objectSpaceType, out clrType);
474return ObjectItemCollection.GetClrType((EdmType)objectSpaceType);
487return ObjectItemCollection.TryGetClrType((EdmType)objectSpaceType, out clrType);
496private static Type GetClrType(EdmType objectSpaceType)
518private static bool TryGetClrType(EdmType objectSpaceType, out Type clrType)
573internal bool TryGetOSpaceType(EdmType cspaceType, out EdmType edmType)
583return TryGetItem<EdmType>(cspaceType.Identity, out edmType);
593internal static string TryGetMappingCSpaceTypeIdentity(EdmType edmType)
System\Data\Metadata\ObjectLayer\ObjectItemConventionAssemblyLoader.cs (21)
39EdmType cspaceType;
48EdmType ospaceType;
63EdmType previousOSpaceType = SessionData.CspaceToOspace[cspaceType];
86private bool TryGetCSpaceTypeMatch(Type type, out EdmType cspaceType)
89KeyValuePair<EdmType, int> pair;
116private bool TryCreateType(Type type, EdmType cspaceType, out EdmType newOSpaceType)
151private bool TryCreateStructuralType(Type type, StructuralType cspaceType, out EdmType newOSpaceType)
216private bool TryCreateEnumType(Type enumType, EnumType cspaceEnumType, out EdmType newOSpaceType)
335private EdmType ResolveBaseType(StructuralType baseCSpaceType, Type type)
337EdmType ospaceType;
487EdmType propertyType;
508EdmType ospaceRelationship;
514EdmType targetType = null;
517EdmType findType;
528EdmType findType;
640EdmType propertyType;
689EdmType[] ospaceEndTypes = new EdmType[2];
734internal static bool TypesMatchByConvention(Type type, EdmType cspaceType)
739private void AddScalarMember(Type type, PropertyInfo clrProperty, StructuralType ospaceType, EdmProperty cspaceProperty, EdmType propertyType)
System\Data\Metadata\ObjectLayer\ObjectItemLoadingSessionData.cs (19)
21private readonly Dictionary<string, EdmType> _typesInLoading;
45private Dictionary<string, KeyValuePair<EdmType, int>> _conventionCSpaceTypeNames;
46private Dictionary<EdmType, EdmType> _cspaceToOspace;
48internal Dictionary<string, EdmType> TypesInLoading { get { return _typesInLoading; } }
54internal Dictionary<EdmType, EdmType> CspaceToOspace { get { return _cspaceToOspace; } }
71internal Dictionary<string, KeyValuePair<EdmType, int>> ConventionCSpaceTypeNames
77_conventionCSpaceTypeNames = new Dictionary<string, KeyValuePair<EdmType, int>>();
80foreach (var edmType in _edmItemCollection.GetItems<EdmType>())
85KeyValuePair<EdmType, int> pair;
88_conventionCSpaceTypeNames[edmType.Name] = new KeyValuePair<EdmType, int>(pair.Key, pair.Value + 1);
92pair = new KeyValuePair<EdmType, int>(edmType, 1);
134_typesInLoading = new Dictionary<string, EdmType>(StringComparer.Ordinal);
142_cspaceToOspace = new Dictionary<EdmType, EdmType>();
149foreach (EdmType type in entry.CacheEntry.TypesInAssembly.OfType<EdmType>())
System\Data\Metadata\TypeSemantics.cs (24)
90internal static bool IsStructurallyEqualOrPromotableTo(EdmType fromType, EdmType toType)
125internal static bool IsSubTypeOf(EdmType subEdmType, EdmType superEdmType)
255EdmType commonEdmType;
315internal static bool IsValidPolymorphicCast(EdmType fromEdmType, EdmType toEdmType)
399internal static bool IsScalarType(EdmType type)
797private static bool TryGetCommonType(EdmType edmType1, EdmType edmType2, out EdmType commonEdmType)
880private static bool TryGetCommonType(PrimitiveType primitiveType1, PrimitiveType primitiveType2, out EdmType commonType)
906private static bool TryGetCommonType(CollectionType collectionType1, CollectionType collectionType2, out EdmType commonType)
919private static bool TryGetCommonType(RefType refType1, RefType reftype2, out EdmType commonType)
932private static bool TryGetCommonType(RowType rowType1, RowType rowType2, out EdmType commonRowType)
959private static bool TryGetCommonBaseType(EdmType type1, EdmType type2, out EdmType commonBaseType)
962Dictionary<EdmType, byte> otherBaseTypes = new Dictionary<EdmType, byte>();
963for (EdmType ancestor = type2; ancestor != null; ancestor = ancestor.BaseType)
970for (EdmType ancestor = type1; ancestor != null; ancestor = ancestor.BaseType)
997private static bool IsEqualComparable(EdmType edmType)
1023private static bool IsOrderComparable(EdmType edmType)
System\Data\Objects\ObjectContext.cs (9)
1330EdmType entityEdmType = GetTypeUsage(entityCLRType).EdmType;
1384EdmType entityEdmType = GetTypeUsage(entityCLRType).EdmType;
2581EdmType[] expectedEdmTypes = new EdmType[returnTypeCount];
2585if (!MetadataHelper.TryGetFunctionImportReturnType<EdmType>(functionImport, i, out expectedEdmTypes[i]))
2673private ObjectResult<TElement> CreateFunctionObjectResult<TElement>(EntityCommand entityCommand, ReadOnlyMetadataCollection<EntitySet> entitySets, EdmType[] edmTypes, MergeOption mergeOption)
2702internal ObjectResult<TElement> MaterializedDataRecord<TElement>(EntityCommand entityCommand, DbDataReader storeReader, int resultSetIndex, ReadOnlyMetadataCollection<EntitySet> entitySets, EdmType[] edmTypes, MergeOption mergeOption)
2709EdmType edmType = edmTypes[resultSetIndex];
3167EdmType modelEdmType;
System\Data\Query\InternalTrees\ColumnMapFactory.cs (7)
85internal static CollectionColumnMap CreateColumnMapFromReaderAndType(DbDataReader storeDataReader, EdmType edmType, EntitySet entitySet, Dictionary<string, FunctionImportReturnTypeStructuralTypeColumnRenameMapping> renameList)
151EdmType modelType;
215DbDataReader storeDataReader, EdmType edmType, EntitySet entitySet,
268private static ColumnMap[] GetColumnMapsForType(DbDataReader storeDataReader, EdmType edmType, Dictionary<string, FunctionImportReturnTypeStructuralTypeColumnRenameMapping> renameList)
295EdmType discriminatorType =
319private static int GetMemberOrdinalFromReader(DbDataReader storeDataReader, EdmMember member, EdmType currentType, Dictionary<string, FunctionImportReturnTypeStructuralTypeColumnRenameMapping> renameList)
331private static string GetRenameForMember(EdmMember member, EdmType currentType, Dictionary<string, FunctionImportReturnTypeStructuralTypeColumnRenameMapping> renameList)