public void GenerateInvoker(StreamWriter sw, string indent, CodeGenerationOptions opt, GenBase container) { GenerateCallbacks(sw, indent, opt, container); Getter.GenerateIdField(sw, indent, opt, invoker: true); if (Setter != null) { Setter.GenerateIdField(sw, indent, opt, invoker: true); } sw.WriteLine("{0}public unsafe {1} {2} {{", indent, opt.GetOutputName(Getter.ReturnType), AdjustedName); sw.WriteLine("{0}\tget {{", indent); Getter.GenerateInvokerBody(sw, indent + "\t\t", opt); sw.WriteLine("{0}\t}}", indent); if (Setter != null) { string pname = Setter.Parameters [0].Name; Setter.Parameters [0].Name = "value"; sw.WriteLine("{0}\tset {{", indent); Setter.GenerateInvokerBody(sw, indent + "\t\t", opt); sw.WriteLine("{0}\t}}", indent); Setter.Parameters [0].Name = pname; } sw.WriteLine("{0}}}", indent); sw.WriteLine(); }