Description
Description
The docs for custom marshalling are sadly lacking on clarity leaving developers EXTREMELY frustrated. As a specific example:
docs/design/libraries/LibraryImportGenerator/UserTypeMarshallingV2.md
List the "shapes" of marshalling (but doesn't define the term OR how these are actually used). Moreover, it routinely mixes its own pseudo templating with actual generic parameters but fails to define ALL such pseudo templated parameters. TOther
is a particularly nasty one as there's NOTHING anywhere that describes it - what the heck is it supposed to be?
Reproduction Steps
Try and create a custom marshaller for an array of SafeHandles that just calls DangerousGetHandle() to get the underlying nint
. This is perfectly legit thing to do when the caller owns the release of the handle and the native code won't do that (It just uses the handles it is given)
Expected behavior
This should all just work and be WELL documented, so it is easy to implement custom marshalling. As it is, it's just not possible to do - the docs are so steep with insider baseball they are unusable to anyone outside the core dev team. This makes marshalling of custom types WAY harder than it needs to be.
Actual behavior
custom marshalling is unusable as the docs are too vague and include too much insider baseball.
Regression?
No response
Known Workarounds
No response
Configuration
No response
Other information
No response
Metadata
Metadata
Assignees
Labels
Type
Projects
Status