f21a4759737738e798b4a918add03b8be3770bb1
[mono.git] / mcs / class / referencesource / System.Data.Entity / System / Data / Metadata / ObjectLayer / ImmutableAssemblyCacheEntry.cs
1 //---------------------------------------------------------------------
2 // <copyright file="ImmutableAssemblyCacheEntry.cs" company="Microsoft">
3 //      Copyright (c) Microsoft Corporation.  All rights reserved.
4 // </copyright>
5 //
6 // @owner       Microsoft
7 // @backupOwner Microsoft
8 //---------------------------------------------------------------------
9
10 using System.Collections.Generic;
11 using System.Reflection;
12
13 namespace System.Data.Metadata.Edm
14 {
15     internal partial class ImmutableAssemblyCacheEntry : AssemblyCacheEntry
16     {
17         // types in "this" assembly
18         private readonly System.Collections.ObjectModel.ReadOnlyCollection<EdmType> _typesInAssembly;       
19         // other assemblies referenced by types we care about in "this" assembly
20         private readonly System.Collections.ObjectModel.ReadOnlyCollection<Assembly> _closureAssemblies;
21         internal ImmutableAssemblyCacheEntry(MutableAssemblyCacheEntry mutableEntry)
22         {
23             _typesInAssembly = new List<EdmType>(mutableEntry.TypesInAssembly).AsReadOnly();
24             _closureAssemblies = new List<Assembly>(mutableEntry.ClosureAssemblies).AsReadOnly();
25         }
26
27         internal override IList<EdmType> TypesInAssembly
28         {
29             get { return _typesInAssembly; }
30         }
31
32         internal override IList<Assembly> ClosureAssemblies
33         {
34             get { return _closureAssemblies; }
35         }
36     }
37 }