Resolve ILLink warnings in System.Reflection.DispatchProxy (#46715)
authorEric Erhardt <eric.erhardt@microsoft.com>
Tue, 12 Jan 2021 00:35:47 +0000 (18:35 -0600)
committerGitHub <noreply@github.com>
Tue, 12 Jan 2021 00:35:47 +0000 (18:35 -0600)
commit9f1c9132bd6b4213c9f344eecc7ecfd9693c32ca
tree799df2f0b45ac2009c17d69ae08d1dcee5e26fb3
parent257020093bb334586e8314e820ddc0abe190edbe
Resolve ILLink warnings in System.Reflection.DispatchProxy (#46715)

* Resolve ILLink warnings in System.Reflection.DispatchProxy

I also took this chance to remove unnecessary GetTypeInfo() calls, since some of them needed to be removed.

Contributes to #45623

* Update annotations for PR feedback.

Remove DynamicallyAccessedMemberTypes.All from the interface and base class types. If unused members are trimmed, this won't cause problems with DispatchProxy.

* Add a trimming test for DispatchProxy since we are suppressing ILLinker warnings.
src/libraries/System.Reflection.DispatchProxy/ref/System.Reflection.DispatchProxy.cs
src/libraries/System.Reflection.DispatchProxy/src/ILLink/ILLink.Suppressions.xml [deleted file]
src/libraries/System.Reflection.DispatchProxy/src/System/Reflection/DispatchProxy.cs
src/libraries/System.Reflection.DispatchProxy/src/System/Reflection/DispatchProxyGenerator.cs
src/libraries/System.Reflection.DispatchProxy/tests/TrimmingTests/DispatchProxyTest.cs [new file with mode: 0644]
src/libraries/System.Reflection.DispatchProxy/tests/TrimmingTests/System.Reflection.DispatchProxy.TrimmingTests.proj [new file with mode: 0644]