Contextual reflection (dotnet/coreclr#23740)
authorSteve MacLean <stmaclea@microsoft.com>
Thu, 11 Apr 2019 04:20:39 +0000 (00:20 -0400)
committerGitHub <noreply@github.com>
Thu, 11 Apr 2019 04:20:39 +0000 (00:20 -0400)
commitf037bfc5e710041ebe6a55c19539758676a1be65
treefa7c7f1e589194b97d74c4e39efa12d2e6e9fbe5
parent60f68d43b62b93ed034655e81a70fabd9961279f
Contextual reflection (dotnet/coreclr#23740)

* Add ContextualReflection APIs

Add ContextualReflection APIs approved in dotnet/corefxdotnet/coreclr#36236
Fix issue dotnet/coreclr#22213

* SetParentAssembly even when IsCollectible()
* ContextualReflection tests

* PR Feedback
* Add more usage tests

Add using statement tests
Add bad usage tests including Assert.Throws<>

* Only initialize on set
* Add XML API comments
* Unify VerifyIsolation
* Fix unused expectedAssembly
* Remove ContextualReflectionScope throw
* Clean up TestResolveMissingAssembly et. al
* Remove unused QCall::AppDomainHandle
* Remove AppDomainBaseObject
* Pass AssemblyLoadContext as managed object to native
* Fix AssemblyLoadContextBaseObject packing

* AssemblyLoadContext backing stores

Use explicit backing stores for events and properties

* Remove StaticAsyncLocalCurrentContextualReflectionContext
* Remove PermissionSetObject

Commit migrated from https://github.com/dotnet/coreclr/commit/206f9680303134731862a35338618f2cbd225651
23 files changed:
src/coreclr/src/System.Private.CoreLib/src/System/Reflection/Assembly.CoreCLR.cs
src/coreclr/src/System.Private.CoreLib/src/System/Reflection/RuntimeAssembly.cs
src/coreclr/src/System.Private.CoreLib/src/System/Runtime/Loader/AssemblyLoadContext.CoreCLR.cs
src/coreclr/src/System.Private.CoreLib/src/System/RuntimeHandles.cs
src/coreclr/src/System.Private.CoreLib/src/System/TypeNameParser.cs
src/coreclr/src/strongname/api/common.h
src/coreclr/src/vm/assemblynative.cpp
src/coreclr/src/vm/assemblynative.hpp
src/coreclr/src/vm/common.h
src/coreclr/src/vm/mscorlib.h
src/coreclr/src/vm/object.h
src/coreclr/src/vm/qcall.cpp
src/coreclr/src/vm/qcall.h
src/coreclr/src/vm/runtimehandles.cpp
src/coreclr/src/vm/runtimehandles.h
src/coreclr/src/vm/typeparse.cpp
src/coreclr/src/vm/vars.hpp
src/coreclr/tests/src/Loader/ContextualReflection/ContextualReflection.cs [new file with mode: 0644]
src/coreclr/tests/src/Loader/ContextualReflection/ContextualReflection.csproj [new file with mode: 0644]
src/coreclr/tests/src/Loader/ContextualReflection/ContextualReflectionDependency.cs [new file with mode: 0644]
src/coreclr/tests/src/Loader/ContextualReflection/ContextualReflectionDependency.csproj [new file with mode: 0644]
src/libraries/System.Private.CoreLib/src/System/Activator.RuntimeType.cs
src/libraries/System.Private.CoreLib/src/System/Runtime/Loader/AssemblyLoadContext.cs