mirror of
https://github.com/BepInEx/dotnet-runtime.git
synced 2026-11-22 19:10:41 -10:00
After the basic annotation of `Type.GetInterface` and `Type.GetInterfaces` this propagates this annotation to all places which require it. It also resolves warnings in all the places where this shows up. For the most part this is just blindly propagating the annotations. Most of the suppressions rely on the fact that is `IFoo` is referenced (and thus the `Type` instance of it exists at runtime), trimmer guarantees that it will keep it on all types which implement that interface. And also on additional fact that if `IFoo<>` is preserved, then all instantiations of it are also preserved. This is true for linker, but not necessarily true for AOT - that is we can do better if we don't have to make that assumption. For now I rely on that assumption.