Blazor IJSInProcessObjectReference.Invoke is attributed with RequiresUnreferencedCode
Open
area-blazor
copilot-candidate
- Dominant language
- C#
- Stars
- 38.4k
- Forks
- 10.9k
- Avg merge
- 2d 10h
- Merged PRs (30d)
- 281
Description
Hello, I have recently found that `IJSInProcessObjectReference.Invoke` is attributed under `[RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed.")]` [here](https://github.com/dotnet/aspnetcore/blob/3f8edf130a14d34024a42ebd678fa3f699ef5916/src/JSInterop/Microsoft.JSInterop/src/IJSInProcessObjectReference.cs#L21).
However we have add `[DynamicallyAccessedMembers(JsonSerialized)]` for its `TValue`, so it seems unnecessary to use `RequiresUnreferencedCode`?
And we didn't do that in `IJSObjectReference`, so I believe it should be a mistake.
Contributor guide
Assessment
This issue has not been assessed yet.