Repro:
Modify the signature of the Main method to have an string[] args parameter. Notice that if you trim it and disassemble the output, the method parameter name is missing.
Fix:
Add a new node type that represents the Param.
GetStaticDependencies of the node will be empty for now. In WriteInternal, copy the Name, Attributes and SequenceNumber from the original.
In GetStaticDependencies of the MethodDefinitionNode, do a foreach over methodDef.GetParameters() and add the ParamNode as a dependency for each.
You should now see the method parameter name show up in the disassembly of the trimmed output.
Repro: Modify the signature of the
Main
method to have anstring[] args
parameter. Notice that if you trim it and disassemble the output, the method parameter name is missing.Fix:
GetStaticDependencies
of the node will be empty for now. InWriteInternal
, copy the Name, Attributes and SequenceNumber from the original.GetStaticDependencies
of theMethodDefinitionNode
, do a foreach overmethodDef.GetParameters()
and add the ParamNode as a dependency for each.You should now see the method parameter name show up in the disassembly of the trimmed output.