2016-08-03 10:59:49 +00:00
|
|
|
|
//---------------------------------------------------------------------
|
|
|
|
|
// <copyright file="ObjectItemCachedAssemblyLoader.cs" company="Microsoft">
|
|
|
|
|
// Copyright (c) Microsoft Corporation. All rights reserved.
|
|
|
|
|
// </copyright>
|
|
|
|
|
//
|
2017-08-21 15:34:15 +00:00
|
|
|
|
// @owner Microsoft
|
|
|
|
|
// @backupOwner Microsoft
|
2016-08-03 10:59:49 +00:00
|
|
|
|
//---------------------------------------------------------------------
|
|
|
|
|
|
|
|
|
|
namespace System.Data.Metadata.Edm
|
|
|
|
|
{
|
|
|
|
|
using System.Reflection;
|
|
|
|
|
|
|
|
|
|
internal sealed class ObjectItemCachedAssemblyLoader : ObjectItemAssemblyLoader
|
|
|
|
|
{
|
|
|
|
|
private new ImmutableAssemblyCacheEntry CacheEntry { get { return (ImmutableAssemblyCacheEntry)base.CacheEntry; } }
|
|
|
|
|
|
|
|
|
|
internal ObjectItemCachedAssemblyLoader(Assembly assembly, ImmutableAssemblyCacheEntry cacheEntry, ObjectItemLoadingSessionData sessionData)
|
|
|
|
|
: base(assembly, cacheEntry, sessionData)
|
|
|
|
|
{
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
protected override void AddToAssembliesLoaded()
|
|
|
|
|
{
|
|
|
|
|
// wasn't loaded, was pulled from cache instead
|
|
|
|
|
// so don't load it
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
protected override void LoadTypesFromAssembly()
|
|
|
|
|
{
|
|
|
|
|
foreach (EdmType type in CacheEntry.TypesInAssembly)
|
|
|
|
|
{
|
|
|
|
|
if (!SessionData.TypesInLoading.ContainsKey(type.Identity))
|
|
|
|
|
{
|
|
|
|
|
SessionData.TypesInLoading.Add(type.Identity, type);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
}
|