sharphy_generate_wrapper
Generates strongly-typed C# wrapper code using .NET 8+ UnsafeAccessor attributes to access private members and fields with zero reflection overhead, writing a .cs file for testing internal APIs.
Instructions
Generates strongly-typed C# wrapper source code utilizing .NET 8+ [UnsafeAccessor] attributes to access private members and fields with zero reflection overhead. Use this tool when testing or accessing inaccessible internal/private APIs. Do NOT use for bytecode modification (use 'sharphy_patch_il'). Mutates disk by writing a new C# (.cs) source file to outputPath.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| typeName | Yes | Fully qualified target type name | |
| outputPath | Yes | Output C# source file path (.cs) | |
| assemblyPath | Yes | Path to the target assembly |