diff --git a/src/Generator/Generators/CSharp/CSharpTextTemplate.cs b/src/Generator/Generators/CSharp/CSharpTextTemplate.cs index 6601ed1f..09b12da6 100644 --- a/src/Generator/Generators/CSharp/CSharpTextTemplate.cs +++ b/src/Generator/Generators/CSharp/CSharpTextTemplate.cs @@ -306,9 +306,7 @@ namespace CppSharp.Generators.CSharp continue; NewLineIfNeeded(); - - GeneratePInvokeMethod(ctor, @class); - NeedNewLine(); + GenerateFunction(ctor, @class); } foreach (var method in @class.Methods) @@ -323,9 +321,7 @@ namespace CppSharp.Generators.CSharp continue; NewLineIfNeeded(); - - GeneratePInvokeMethod(method, @class); - NeedNewLine(); + GenerateFunction(method, @class); } WriteCloseBraceIndent(); @@ -334,11 +330,6 @@ namespace CppSharp.Generators.CSharp typePrinter.PopContext(); } - private void GeneratePInvokeMethod(Method method, Class @class) - { - GenerateFunction(method, @class); - } - private void GenerateStructMarshaling(Class @class) { GenerateStructMarshalingFields(@class);