[C#] Rewrite trait impl based on typescript, not Java
authorMatt Corallo <git@bluematt.me>
Tue, 7 Nov 2023 18:30:10 +0000 (18:30 +0000)
committerMatt Corallo <git@bluematt.me>
Thu, 9 Nov 2023 21:08:24 +0000 (21:08 +0000)
commit3cc0a74cece1ef4dd8c816add1172fbbf719da23
treee3b93dd441d8f04b9a2bea8b6241f680e9e56987
parent3b30b992dbf03b6a38320cc16699849840e7b542
[C#] Rewrite trait impl based on typescript, not Java

C# doesn't let us pass arbitrary C# objects over the FFI as a
pointer, at least not easily, so instead we need something that
looks much more like what we do for TypeScript.

Here we rewrite the trait handling in C# based on the TypeScript
code and instead store weak pointers so we can reference trait
implementation instances by a single `long`.
csharp_strings.py