Beispiel #1
0
 protected override void BeforeAppendStaticMethod(Tabulator tabulator, Method value)
 {
     tabulator.AppendLine("[DllImport(Version.Dll)]");
     if (value.ResulTypeName == "bool")
     {
         tabulator.AppendLine("[return: MarshalAs(UnmanagedType.I1)]");
     }
 }
Beispiel #2
0
 public override void Format(CodeFile file, Tabulator tabulator)
 {
     _file = file;
     tabulator.AppendFormatLine("using System;");
     tabulator.AppendFormatLine("using System.Runtime.InteropServices;");
     tabulator.AppendLine("");
     base.Format(file, tabulator);
 }
Beispiel #3
0
 protected override void BeforeAppendStruct(Tabulator tabulator, Struct value)
 {
     tabulator.AppendLine("[StructLayout(LayoutKind.Sequential)]");
 }