summaryrefslogtreecommitdiff
path: root/src/md
diff options
context:
space:
mode:
authorRyan Byington <ryanbyi@microsoft.com>2015-04-28 17:53:30 -0700
committerRyan Byington <ryanbyi@microsoft.com>2015-04-28 17:53:30 -0700
commitfb68f332e9123d74bd1cc7187be000bc3cbf67d2 (patch)
treee8aca912b70dd791502d977beb6262e264dda1e2 /src/md
parent2fd35925a66be17a46467050751c309b93f2013b (diff)
downloadcoreclr-fb68f332e9123d74bd1cc7187be000bc3cbf67d2.tar.gz
coreclr-fb68f332e9123d74bd1cc7187be000bc3cbf67d2.tar.bz2
coreclr-fb68f332e9123d74bd1cc7187be000bc3cbf67d2.zip
Updating WinRT Projections to use Facades
WinRT projections currently depend on implementation assemblies like System.Uri living in System.dll. System.Uri has already been moved out of System.dll to Internal.Uri.dll which breaks the projection for System.Uri. This change updates the WinRT projection to understand Facades like System.Runtime to resolve System.Uri. When we load a type like System.Uri we need to know if it is a projected type. We currently do this by comparing the namespace plus type name and assembly however this only works because we know the implementation assembly at compile time. I am changing it so that we use ClassLoader to resolve the typedef and assembly and compare the resolved assembly with the current one. Also removing the cached assemblies as they don’t add a lot of value anymore. [tfs-changeset: 1461733]
Diffstat (limited to 'src/md')
-rw-r--r--src/md/winmd/adapter.cpp4
-rw-r--r--src/md/winmd/inc/adapter.h12
2 files changed, 8 insertions, 8 deletions
diff --git a/src/md/winmd/adapter.cpp b/src/md/winmd/adapter.cpp
index 64cc25ce49..45c695c1d3 100644
--- a/src/md/winmd/adapter.cpp
+++ b/src/md/winmd/adapter.cpp
@@ -1126,7 +1126,7 @@ void WinMDAdapter::GetExtraAssemblyRefProps(FrameworkAssemblyIndex index,
if (ppPublicKeytoken)
{
#ifdef FEATURE_CORECLR
- if (index == FrameworkAssembly_System || index == FrameworkAssembly_Mscorlib)
+ if (index == FrameworkAssembly_Mscorlib)
{
*ppPublicKeytoken = g_rbTheSilverlightPlatformKeyToken;
*pTokenLength = sizeof(g_rbTheSilverlightPlatformKeyToken);
@@ -1134,7 +1134,7 @@ void WinMDAdapter::GetExtraAssemblyRefProps(FrameworkAssemblyIndex index,
else
#endif
{
- if (index == FrameworkAssembly_SystemNumericsVectors || index == FrameworkAssembly_InternalUri)
+ if (index == FrameworkAssembly_SystemNumericsVectors || index == FrameworkAssembly_SystemRuntime || index == FrameworkAssembly_SystemObjectModel)
{
*ppPublicKeytoken = s_pbContractPublicKeyToken;
*pTokenLength = sizeof(s_pbContractPublicKeyToken);
diff --git a/src/md/winmd/inc/adapter.h b/src/md/winmd/inc/adapter.h
index 14a26b56b1..87fc410a77 100644
--- a/src/md/winmd/inc/adapter.h
+++ b/src/md/winmd/inc/adapter.h
@@ -83,11 +83,11 @@ public:
enum FrameworkAssemblyIndex
{
FrameworkAssembly_Mscorlib,
- FrameworkAssembly_System,
+ FrameworkAssembly_SystemObjectModel,
+ FrameworkAssembly_SystemRuntime,
FrameworkAssembly_SystemRuntimeWindowsRuntime,
FrameworkAssembly_SystemRuntimeWindowsRuntimeUIXaml,
FrameworkAssembly_SystemNumericsVectors,
- FrameworkAssembly_InternalUri,
FrameworkAssembly_Count,
};
@@ -626,16 +626,16 @@ public:
_ASSERTE(index != FrameworkAssembly_Mscorlib);
switch(index)
{
- case FrameworkAssembly_System:
- return "System";
+ case FrameworkAssembly_SystemObjectModel:
+ return "System.ObjectModel";
+ case FrameworkAssembly_SystemRuntime:
+ return "System.Runtime";
case FrameworkAssembly_SystemRuntimeWindowsRuntime:
return "System.Runtime.WindowsRuntime";
case FrameworkAssembly_SystemRuntimeWindowsRuntimeUIXaml:
return "System.Runtime.WindowsRuntime.UI.Xaml";
case FrameworkAssembly_SystemNumericsVectors:
return "System.Numerics.Vectors";
- case FrameworkAssembly_InternalUri:
- return "Internal.Uri";
default:
_ASSERTE(!"Invalid AssemblyRef token!");
return NULL;