| | 253 | .writeSharpDef means "write C# definition" and is the main "driver" of spewing out the C# source code. The various properties such as .sharpRef are used, potentially from other places like when a .writeSharpDef implementation invokes _expr.type.sharpRef. |
| | 254 | |
| | 255 | An implementation of .writeSharpDef will invoke that same method name on its subobjects. |
| | 256 | |
| | 257 | .sharpRef means "a C# reference to the receiver" which often means a qualified name (Foo.Bar.Baz), possibly even prefixed with "global::", so C# doesn't get confused. |
| | 258 | |
| | 259 | Other .sharpFoo properties have various purposes and you'll have to poke around to see how they're used. |
| | 260 | |
| | 261 | If you have to refer to something in the generated code (as opposed to writing out its definition), default to .sharpRef unless you have an explicit reason not to. |
| | 262 | |