winforms icon indicating copy to clipboard operation
winforms copied to clipboard

Using source generators for interop

Open JeremyKuhne opened this issue 5 years ago • 1 comments

This issue is for tracking usage of source generators for interop.

The Runtime is considering implementing P/Invoke support through source generators: https://github.com/dotnet/runtime/blob/master/docs/design/features/source-generator-pinvokes.md

We should also be exploring is implementing common patterns via source generators. Things like:

  • Handling common buffer usage patterns (buffer growth, movement from stack to heap, etc.)
  • Generating resource scoping boilerplate (see our various scope types and how we switch between class and struct for tracking proper disposal in debug builds)

JeremyKuhne avatar Oct 19 '20 18:10 JeremyKuhne

Related issues/pulls:

https://github.com/dotnet/runtime/pull/32091

JeremyKuhne avatar Oct 19 '20 20:10 JeremyKuhne

@RussKie Should we close this issue because of #7445?

elachlan avatar Nov 07 '22 01:11 elachlan

Yes, thank you for finding this.

RussKie avatar Nov 07 '22 02:11 RussKie