From 18e7828146f4a76e801b8632b904890ddb126fef Mon Sep 17 00:00:00 2001 From: Steve MacLean Date: Fri, 12 Apr 2019 23:01:03 -0400 Subject: [PATCH 1/2] Add ContextualReflection facade --- src/System.Runtime.Loader/ref/System.Runtime.Loader.cs | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/System.Runtime.Loader/ref/System.Runtime.Loader.cs b/src/System.Runtime.Loader/ref/System.Runtime.Loader.cs index 6709891a50ea..25d551155b5e 100644 --- a/src/System.Runtime.Loader/ref/System.Runtime.Loader.cs +++ b/src/System.Runtime.Loader/ref/System.Runtime.Loader.cs @@ -47,5 +47,13 @@ public event System.Action Unloading public void SetProfileOptimizationRoot(string directoryPath) { } public void StartProfileOptimization(string profile) { } public void Unload() { } + public static AssemblyLoadContext CurrentContextualReflectionContext { get { throw null; } } + public ContextualReflectionScope EnterContextualReflection() { throw null; } + public static ContextualReflectionScope EnterContextualReflection(System.Reflection.Assembly activating) { throw null; } + + public struct ContextualReflectionScope : IDisposable + { + public void Dispose() { } + } } } From fb0fcf5dd458013798c481edf5ca0afd2b67b169 Mon Sep 17 00:00:00 2001 From: Steve MacLean Date: Sat, 13 Apr 2019 20:12:54 -0400 Subject: [PATCH 2/2] Update ApiCompatBaseline.uapaot --- .../src/ApiCompatBaseline.uapaot.txt | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/System.Runtime.Loader/src/ApiCompatBaseline.uapaot.txt b/src/System.Runtime.Loader/src/ApiCompatBaseline.uapaot.txt index 6ac3960d6a18..2ed8d5f7f028 100644 --- a/src/System.Runtime.Loader/src/ApiCompatBaseline.uapaot.txt +++ b/src/System.Runtime.Loader/src/ApiCompatBaseline.uapaot.txt @@ -1,6 +1,5 @@ Compat issues with assembly System.Runtime.Loader: CannotMakeTypeAbstract : Type 'System.Runtime.Loader.AssemblyLoadContext' is abstract in the implementation but is not abstract in the contract. -TypesMustExist : Type 'System.Reflection.Metadata.AssemblyExtensions' does not exist in the implementation but it does exist in the contract. MembersMustExist : Member 'System.Runtime.Loader.AssemblyLoadContext..ctor(System.Boolean)' does not exist in the implementation but it does exist in the contract. MembersMustExist : Member 'System.Runtime.Loader.AssemblyLoadContext..ctor(System.String, System.Boolean)' does not exist in the implementation but it does exist in the contract. MembersMustExist : Member 'System.Runtime.Loader.AssemblyLoadContext.add_Resolving(System.Func)' does not exist in the implementation but it does exist in the contract. @@ -27,5 +26,10 @@ MembersMustExist : Member 'System.Runtime.Loader.AssemblyLoadContext.remove_Unlo MembersMustExist : Member 'System.Runtime.Loader.AssemblyLoadContext.SetProfileOptimizationRoot(System.String)' does not exist in the implementation but it does exist in the contract. MembersMustExist : Member 'System.Runtime.Loader.AssemblyLoadContext.StartProfileOptimization(System.String)' does not exist in the implementation but it does exist in the contract. MembersMustExist : Member 'System.Runtime.Loader.AssemblyLoadContext.Unload()' does not exist in the implementation but it does exist in the contract. +MembersMustExist : Member 'System.Runtime.Loader.AssemblyLoadContext.CurrentContextualReflectionContext.get()' does not exist in the implementation but it does exist in the contract. +MembersMustExist : Member 'System.Runtime.Loader.AssemblyLoadContext.EnterContextualReflection()' does not exist in the implementation but it does exist in the contract. +MembersMustExist : Member 'System.Runtime.Loader.AssemblyLoadContext.EnterContextualReflection(System.Reflection.Assembly)' does not exist in the implementation but it does exist in the contract. +TypesMustExist : Type 'System.Reflection.Metadata.AssemblyExtensions' does not exist in the implementation but it does exist in the contract. TypesMustExist : Type 'System.Runtime.Loader.AssemblyDependencyResolver' does not exist in the implementation but it does exist in the contract. -Total Issues: 29 +TypesMustExist : Type 'System.Runtime.Loader.AssemblyLoadContext.ContextualReflectionScope' does not exist in the implementation but it does exist in the contract. +Total Issues: 33