1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109
|
//---------------------------------------------------------------------
// <copyright file="EntityViewContainer.cs" company="Microsoft">
// Copyright (c) Microsoft Corporation. All rights reserved.
// </copyright>
//
// @owner Microsoft
// @backupOwner Microsoft
//---------------------------------------------------------------------
using System;
using System.Collections;
using System.Collections.Generic;
using System.Data.Common.Utils;
using System.Text;
namespace System.Data.Mapping
{
/// <summary>
/// Base class for the type created at design time to store the generated views.
/// </summary>
public abstract class EntityViewContainer
{
#region Constructors
protected EntityViewContainer()
{
}
#endregion
#region fields
private string m_storedHashOverMappingClosure; // Hash value over the whole Metadata and Mapping closure
private string m_storedhashOverAllExtentViews; // Hash value over all the extent views
private string m_storededmEntityContainerName; // C side entity container name
private string m_storedStoreEntityContainerName; // S side entity container name
private int _viewCount;
#endregion
#region properties
/// <summary>
/// Returns the cached dictionary of (ExtentName,EsqlView)
/// </summary>
internal IEnumerable<KeyValuePair<string, string>> ExtentViews
{
get
{
for (int i = 0; i < ViewCount; i++)
{
yield return GetViewAt(i);
}
}
}
protected abstract System.Collections.Generic.KeyValuePair<string, string> GetViewAt(int index);
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Naming", "CA1704:IdentifiersShouldBeSpelledCorrectly", MessageId = "Edm")]
public string EdmEntityContainerName
{
get
{
return this.m_storededmEntityContainerName;
}
set
{
this.m_storededmEntityContainerName = value;
}
}
public string StoreEntityContainerName
{
get
{
return this.m_storedStoreEntityContainerName;
}
set
{
this.m_storedStoreEntityContainerName = value;
}
}
public string HashOverMappingClosure
{
get
{
return this.m_storedHashOverMappingClosure;
}
set
{
this.m_storedHashOverMappingClosure = value;
}
}
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Naming", "CA1702:CompoundWordsShouldBeCasedCorrectly", MessageId = "OverAll")]
public string HashOverAllExtentViews
{
get
{
return this.m_storedhashOverAllExtentViews;
}
set
{
this.m_storedhashOverAllExtentViews = value;
}
}
public int ViewCount
{
get { return _viewCount; }
protected set { _viewCount = value; }
}
#endregion
}
}
|