Skip to content

Commit

Permalink
Link issue to the RDC attribute on DispatchProxy (dotnet#73137)
Browse files Browse the repository at this point in the history
  • Loading branch information
MichalStrehovsky authored Aug 1, 2022
1 parent 75abdd4 commit 3b35bc6
Showing 1 changed file with 3 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,9 @@ protected DispatchProxy()
/// <returns>An object instance that implements <typeparamref name="T"/>.</returns>
/// <exception cref="System.ArgumentException"><typeparamref name="T"/> is a class,
/// or <typeparamref name="TProxy"/> is sealed or does not have a parameterless constructor</exception>
//
// https://github.com/dotnet/runtime/issues/73136 - we can remove the RequiresDynamicCode annotation.
// This has been done AOT-safely with .NET Native in the past.
[RequiresDynamicCode("Creating a proxy instance requires generating code at runtime")]
public static T Create<[DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.All)] T, [DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.PublicParameterlessConstructor)] TProxy>()
where TProxy : DispatchProxy
Expand Down

0 comments on commit 3b35bc6

Please sign in to comment.