System\Data\Mapping\StorageMappingItemCollection.cs (17)
26using OfTypeQVCacheKey = Pair<EntitySetBase, Pair<EntityTypeBase, bool>>;
63private ConcurrentDictionary<Tuple<EntitySetBase, EntityTypeBase, InterestingMembersKind>, ReadOnlyCollection<EdmMember>> _cachedInterestingMembers =
64new ConcurrentDictionary<Tuple<EntitySetBase, EntityTypeBase, InterestingMembersKind>, ReadOnlyCollection<EdmMember>>();
206Dictionary<EntitySetBase, GeneratedView> userDefinedQueryViewsDict;
399internal Dictionary<EntitySetBase, string> GenerateEntitySetViews(out IList<EdmSchemaError> errors)
401Dictionary<EntitySetBase, string> esqlViews = new Dictionary<EntitySetBase, string>();
430KeyToListMap<EntitySetBase, GeneratedView> extentMappingViews = viewGenResults.Views;
431foreach (KeyValuePair<EntitySetBase, List<GeneratedView>> extentViewPair in extentMappingViews.KeyValuePairs)
454internal ReadOnlyCollection<EdmMember> GetInterestingMembers(EntitySetBase entitySet, EntityTypeBase entityType, InterestingMembersKind interestingMembersKind)
459var key = new Tuple<EntitySetBase, EntityTypeBase, InterestingMembersKind>(entitySet, entityType, interestingMembersKind);
471private ReadOnlyCollection<EdmMember> FindInterestingMembers(EntitySetBase entitySet, EntityTypeBase entityType, InterestingMembersKind interestingMembersKind)
633private void FindForeignKeyProperties(EntitySetBase entitySetBase, EntityTypeBase entityType, List<EdmMember> interestingMembers)
696internal GeneratedView GetGeneratedView(EntitySetBase extent, MetadataWorkspace workspace)
733Dictionary<EntitySetBase, GeneratedView> userDefinedQueryViewsDict,
787Dictionary<EntitySetBase, GeneratedView> userDefinedQueryViewsDict,
883internal bool TryGetGeneratedViewOfType(MetadataWorkspace workspace, EntitySetBase entity, EntityTypeBase type, bool includeSubtypes, out GeneratedView generatedView)
System\Data\Mapping\StorageMappingItemCollection.ViewDictionary.cs (24)
24using OfTypeQVCacheKey = Pair<EntitySetBase, Pair<EntityTypeBase, bool>>;
28internal delegate bool TryGetUserDefinedQueryView(EntitySetBase extent, out GeneratedView generatedView);
50private readonly Memoizer<EntityContainer, Dictionary<EntitySetBase, GeneratedView>> m_generatedViewsMemoizer;
57out Dictionary<EntitySetBase, GeneratedView> userDefinedQueryViewsDict,
61this.m_generatedViewsMemoizer = new Memoizer<EntityContainer, Dictionary<EntitySetBase, GeneratedView>>(SerializedGetGeneratedViews, null);
64userDefinedQueryViewsDict = new Dictionary<EntitySetBase, GeneratedView>(EqualityComparer<EntitySetBase>.Default);
71private Dictionary<EntitySetBase, GeneratedView> SerializedGetGeneratedViews(EntityContainer container)
76Dictionary<EntitySetBase, GeneratedView> extentMappingViews;
90extentMappingViews = new Dictionary<EntitySetBase, GeneratedView>();
128private void SerializedGenerateViews(StorageEntityContainerMapping entityContainerMap, Dictionary<EntitySetBase, GeneratedView> resultDictionary)
134KeyToListMap<EntitySetBase, GeneratedView> extentMappingViews = viewGenResults.Views;
141foreach (KeyValuePair<EntitySetBase, List<GeneratedView>> keyValuePair in extentMappingViews.KeyValuePairs)
161private bool TryGenerateQueryViewOfType(EntityContainer entityContainer, EntitySetBase entity, EntityTypeBase type, bool includeSubtypes, out GeneratedView generatedView)
185KeyToListMap<EntitySetBase, GeneratedView> extentMappingViews = viewGenResults.Views;
205internal bool TryGetGeneratedViewOfType(MetadataWorkspace workspace, EntitySetBase entity, EntityTypeBase type, bool includeSubtypes, out GeneratedView generatedView)
226EntitySetBase entity = arg.First;
262internal GeneratedView GetGeneratedView(EntitySetBase extent, MetadataWorkspace workspace, StorageMappingItemCollection storageMappingItemCollection)
352Dictionary<EntitySetBase, GeneratedView> generatedViews = m_generatedViewsMemoizer.Evaluate(extent.EntityContainer);
368private void SerializedCollectViewsFromObjectCollection(MetadataWorkspace workspace, Dictionary<EntitySetBase, GeneratedView> extentMappingViews)
406private void SerializedAddGeneratedViewsInEntityViewContainer(MetadataWorkspace workspace, EntityViewContainer entityViewContainer, Dictionary<EntitySetBase, GeneratedView> extentMappingViews)
485private void SerializedAddGeneratedViews(MetadataWorkspace workspace, EntityViewContainer viewContainer, Dictionary<EntitySetBase, GeneratedView> extentMappingViews)
490EntitySetBase extent = null;
539private void SerializedCollectViewsFromReferencedAssemblies(MetadataWorkspace workspace, Dictionary<EntitySetBase, GeneratedView> extentMappingViews)
System\Data\Mapping\StorageMappingItemLoader.cs (23)
26using Triple = Pair<EntitySetBase, Pair<EntityTypeBase, bool>>;
553Dictionary<EntitySetBase, int> mappingCounts = new Dictionary<EntitySetBase, int>();
561Set<EntitySetBase> associationSets = new Set<EntitySetBase>();
567foreach (EntitySetBase associationSet in associationSets)
585foreach (KeyValuePair<EntitySetBase, int> mappingCount in mappingCounts)
645Set<EntitySetBase> implicitMappedAssociationSets = new Set<EntitySetBase>();
675private static void ValidateClosureAmongSets(StorageEntityContainerMapping entityContainerMapping, Set<EntitySetBase> sets, Set<EntitySetBase> additionalSetsInClosure)
681List<EntitySetBase> newNodes = new List<EntitySetBase>();
684foreach (EntitySetBase entitySetBase in additionalSetsInClosure)
703foreach (EntitySetBase entitySetBase in entityContainerMapping.EdmEntityContainer.BaseEntitySets)
753Set<EntitySetBase> setsWithQueryViews = new Set<EntitySetBase>();
754Set<EntitySetBase> setsRequiringQueryViews = new Set<EntitySetBase>();
3747EntitySetBase extent)
3751m_modelContainer = EntityUtil.CheckArgumentNull<EntitySetBase>(extent, "extent").EntityContainer;
3765internal StorageModificationFunctionMapping LoadEntityTypeModificationFunctionMapping(XPathNavigator nav, EntitySetBase entitySet, bool allowCurrentVersion, bool allowOriginalVersion, EntityType entityType)
3787internal StorageModificationFunctionMapping LoadAssociationSetModificationFunctionMapping(XPathNavigator nav, EntitySetBase entitySet, bool isInsert)
System\Data\Mapping\Update\Internal\UpdateTranslator.cs (17)
54m_changes = new Dictionary<EntitySetBase, ChangeNode>();
55m_functionChanges = new Dictionary<EntitySetBase, List<ExtractedStateEntry>>();
76m_extractorMetadata = new Dictionary<Tuple<EntitySetBase, StructuralType>, ExtractorMetadata>(); ;
87private readonly Dictionary<EntitySetBase, ChangeNode> m_changes;
88private readonly Dictionary<EntitySetBase, List<ExtractedStateEntry>> m_functionChanges;
111private readonly Dictionary<Tuple<EntitySetBase, StructuralType>, ExtractorMetadata> m_extractorMetadata;
615private IEnumerable<EntitySetBase> GetDynamicModifiedExtents()
625private IEnumerable<EntitySetBase> GetFunctionModifiedExtents()
642foreach (EntitySetBase extent in GetDynamicModifiedExtents())
717foreach (EntitySetBase extent in GetFunctionModifiedExtents())
743internal ExtractorMetadata GetExtractorMetadata(EntitySetBase entitySetBase, StructuralType type)
926EntitySetBase extent = stateEntry.EntitySet;
1020private void ValidateRecord(EntitySetBase extent, IExtendedDataRecord record, IEntityStateEntry entry)
1038private static void VerifyExtent(MetadataWorkspace workspace, EntitySetBase extent)
1078EntitySetBase extent = stateEntry.EntitySet;
1109internal ChangeNode GetExtentModifications(EntitySetBase extent)
1130internal List<ExtractedStateEntry> GetExtentFunctionModifications(EntitySetBase extent)
System\Data\Mapping\Update\Internal\ViewLoader.cs (14)
43private readonly Dictionary<EntitySetBase, Set<EntitySet>> m_affectedTables = new Dictionary<EntitySetBase, Set<EntitySet>>();
46private readonly Dictionary<EntitySetBase, ModificationFunctionMappingTranslator> m_functionMappingTranslators = new Dictionary<EntitySetBase, ModificationFunctionMappingTranslator>(
47EqualityComparer<EntitySetBase>.Default);
58internal ModificationFunctionMappingTranslator GetFunctionMappingTranslator(EntitySetBase extent, MetadataWorkspace workspace)
70internal Set<EntitySet> GetAffectedTables(EntitySetBase extent, MetadataWorkspace workspace)
91internal bool IsServerGen(EntitySetBase entitySetBase, MetadataWorkspace workspace, EdmMember member)
102internal bool IsNullConditionMember(EntitySetBase entitySetBase, MetadataWorkspace workspace, EdmMember member)
110private T_Value SyncGetValue<T_Key, T_Value>(EntitySetBase entitySetBase, MetadataWorkspace workspace, Dictionary<T_Key, T_Value> dictionary, T_Key key)
118private bool SyncContains<T_Element>(EntitySetBase entitySetBase, MetadataWorkspace workspace, Set<T_Element> set, T_Element element)
128private TResult SyncInitializeEntitySet<TArg, TResult>(EntitySetBase entitySetBase, MetadataWorkspace workspace, Func<TArg, TResult> evaluate, TArg arg)
163private void InitializeEntitySet(EntitySetBase entitySetBase, MetadataWorkspace workspace)
268private void InitializeFunctionMappingTranslators(EntitySetBase entitySetBase, StorageEntityContainerMapping mapping)
System\Data\Mapping\ViewGeneration\ViewGenerator.cs (13)
25using ViewSet = KeyToListMap<EntitySetBase, GeneratedView>;
42private Dictionary<EntitySetBase, QueryRewriter> m_queryRewriterCache;
59m_queryRewriterCache = new Dictionary<EntitySetBase, QueryRewriter>();
168internal ErrorLog GenerateQueryViewForSingleExtent(ViewSet views, CqlIdentifiers identifiers, EntitySetBase entity, EntityTypeBase type, ViewGenMode mode)
242private ErrorLog GenerateQueryViewForExtentAndType(StorageEntityContainerMapping entityContainerMapping, CqlIdentifiers identifiers, ViewSet views, EntitySetBase entity, EntityTypeBase type, ViewGenMode mode)
290KeyToListMap<EntitySetBase, Cell> extentCellMap = GroupCellsByExtent(m_cellGroup, viewTarget);
296foreach (EntitySetBase extent in extentCellMap.Keys)
346private QueryRewriter GenerateDirectionalViewsForExtent(ViewTarget viewTarget, EntitySetBase extent, CqlIdentifiers identifiers, ViewSet views)
386private ViewgenContext CreateViewgenContext(EntitySetBase extent, ViewTarget viewTarget, CqlIdentifiers identifiers)
491private static KeyToListMap<EntitySetBase, Cell> GroupCellsByExtent(IEnumerable<Cell> cells, ViewTarget viewTarget)
496KeyToListMap<EntitySetBase, Cell> extentCellMap =
497new KeyToListMap<EntitySetBase, Cell>(EqualityComparer<EntitySetBase>.Default);
System\Data\Metadata\MappingMetadataHelper.cs (4)
24internal static IEnumerable<StorageTypeMapping> GetMappingsForEntitySetAndType(StorageMappingItemCollection mappingCollection, EntityContainer container, EntitySetBase entitySet, EntityTypeBase entityType)
45internal static IEnumerable<StorageTypeMapping> GetMappingsForEntitySetAndSuperTypes(StorageMappingItemCollection mappingCollection, EntityContainer container, EntitySetBase entitySet, EntityTypeBase childEntityType)
58private static IEnumerable<StorageTypeMapping> GetIsTypeOfMappingsForEntitySetAndType(StorageMappingItemCollection mappingCollection, EntityContainer container, EntitySetBase entitySet, EntityTypeBase entityType, EntityTypeBase childEntityType)
69internal static IEnumerable<StorageEntityTypeModificationFunctionMapping> GetModificationFunctionMappingsForEntitySetAndType(StorageMappingItemCollection mappingCollection, EntityContainer container, EntitySetBase entitySet, EntityTypeBase entityType)
System\Data\Query\PlanCompiler\PreProcessor.cs (15)
135private readonly Dictionary<EntitySetBase, DiscriminatorMapInfo> m_discriminatorMaps = new Dictionary<EntitySetBase, DiscriminatorMapInfo>();
248foreach (EntitySetBase set in entityContainer.BaseEntitySets)
277foreach (EntitySetBase baseSet in container.BaseEntitySets)
308EntitySetBase entitySet = scanTableOp.Table.TableMetadata.Extent;
402private void DetermineDiscriminatorMapUsage(Node viewNode, EntitySetBase entitySet, EntityTypeBase rootEntityType, bool includeSubtypes)
574private Node BuildOfTypeTable(EntitySetBase entitySet, TypeUsage ofType, out Var resultVar)
675private static EntitySetBase FindTargetEntitySet(RelationshipSet relationshipSet, RelationshipEndMember targetEnd)
677EntitySetBase entitySet = null;
712EntitySetBase entitySet = FindTargetEntitySet(relSet, end);
847EntitySetBase entitySet = FindTargetEntitySet(r, relProperty.ToEnd);
1548private RelationshipSet FindRelationshipSet(EntitySetBase entitySet, RelProperty relProperty)
1550foreach (EntitySetBase es in entitySet.EntityContainer.BaseEntitySets)
1644private Node BuildRelPropertyExpression(EntitySetBase entitySet, RelProperty relProperty,
1706private IEnumerable<Node> BuildAllRelPropertyExpressions(EntitySetBase entitySet,
System\Data\Query\PlanCompiler\StructuredTypeInfo.cs (8)
106private Dictionary<md.EntitySetBase, ExplicitDiscriminatorMap> m_discriminatorMaps;
145Dictionary<md.EntitySetBase, DiscriminatorMapInfo> discriminatorMaps,
167Dictionary<md.EntitySetBase, DiscriminatorMapInfo> discriminatorMaps,
335private void ProcessDiscriminatorMaps(Dictionary<md.EntitySetBase, DiscriminatorMapInfo> discriminatorMaps)
340Dictionary<md.EntitySetBase, ExplicitDiscriminatorMap> filteredMaps = null;
343filteredMaps = new Dictionary<md.EntitySetBase, ExplicitDiscriminatorMap>(discriminatorMaps.Count, discriminatorMaps.Comparer);
344foreach (KeyValuePair<md.EntitySetBase, DiscriminatorMapInfo> setMapPair in discriminatorMaps)
346md.EntitySetBase set = setMapPair.Key;