1 //---------------------------------------------------------------------
2 // <copyright file="EntityViewContainer.cs" company="Microsoft">
3 // Copyright (c) Microsoft Corporation. All rights reserved.
8 //---------------------------------------------------------------------
11 using System.Collections;
12 using System.Collections.Generic;
13 using System.Data.Common.Utils;
17 namespace System.Data.Mapping
20 /// Base class for the type created at design time to store the generated views.
22 public abstract class EntityViewContainer
25 protected EntityViewContainer()
31 private string m_storedHashOverMappingClosure; // Hash value over the whole Metadata and Mapping closure
32 private string m_storedhashOverAllExtentViews; // Hash value over all the extent views
33 private string m_storededmEntityContainerName; // C side entity container name
34 private string m_storedStoreEntityContainerName; // S side entity container name
35 private int _viewCount;
40 /// Returns the cached dictionary of (ExtentName,EsqlView)
42 internal IEnumerable<KeyValuePair<string, string>> ExtentViews
46 for (int i = 0; i < ViewCount; i++)
48 yield return GetViewAt(i);
53 protected abstract System.Collections.Generic.KeyValuePair<string, string> GetViewAt(int index);
55 [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Naming", "CA1704:IdentifiersShouldBeSpelledCorrectly", MessageId = "Edm")]
56 public string EdmEntityContainerName
60 return this.m_storededmEntityContainerName;
64 this.m_storededmEntityContainerName = value;
67 public string StoreEntityContainerName
71 return this.m_storedStoreEntityContainerName;
75 this.m_storedStoreEntityContainerName = value;
78 public string HashOverMappingClosure
82 return this.m_storedHashOverMappingClosure;
86 this.m_storedHashOverMappingClosure = value;
89 [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Naming", "CA1702:CompoundWordsShouldBeCasedCorrectly", MessageId = "OverAll")]
90 public string HashOverAllExtentViews
94 return this.m_storedhashOverAllExtentViews;
98 this.m_storedhashOverAllExtentViews = value;
104 get { return _viewCount; }
105 protected set { _viewCount = value; }