Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
…1193) Context: #1184 (comment) Previously we were using `Assembly.Load()` and `Assembly.GetType()`, which require us to ignore various trimmer warnings. During code review, @vitek-karas asked: > Is there a reason > [`JniRuntime.JniMarshalMemberBuilder.SetMarshalMemberBuilder()`] > can't use > `Type.GetType("Java.Interop.MarshalMemberBuilder, Java.Interop.Export")`. > That is something both trimmer and AOT understand and will handle > without warnings and correctly preserve the .ctor in the call to > `Activator.CreateInstance`. Indeed, there isn't a reason to avoid `Type.GetType()` in `JniRuntime.JniMarshalMemberBuilder.SetMarshalMemberBuilder()`. If we use `Type.GetType()` with a constant string instead, the trimmer knows how to handle this properly. (The code is also simpler.)
- Loading branch information