diff --git a/src/Generator/Driver.cs b/src/Generator/Driver.cs index ff3b4368..edb88042 100644 --- a/src/Generator/Driver.cs +++ b/src/Generator/Driver.cs @@ -122,8 +122,7 @@ namespace CppSharp public List GenerateCode() { - var outputs = Generator.Generate(); - return outputs; + return Generator.Generate(); } public void WriteCode(List outputs) @@ -146,9 +145,7 @@ namespace CppSharp Diagnostics.EmitMessage(DiagnosticId.FileGenerated, "Generated '{0}'", fileName); var filePath = Path.Combine(outputPath, fileName); - - var text = template.GenerateText(); - File.WriteAllText(Path.GetFullPath(filePath), text); + File.WriteAllText(Path.GetFullPath(filePath), template.Generate()); } } } @@ -177,6 +174,7 @@ namespace CppSharp GeneratePartialClasses = true; OutputInteropIncludes = true; MaxIndent = 80; + CommentPrefix = "///"; } // General options @@ -218,6 +216,7 @@ namespace CppSharp public bool WriteOnlyWhenChanged; public Func GenerateName; public int MaxIndent; + public string CommentPrefix; } public class InvalidOptionException : Exception diff --git a/src/Generator/Generators/CLI/CLIGenerator.cs b/src/Generator/Generators/CLI/CLIGenerator.cs index 5bf9735b..2f79c4aa 100644 --- a/src/Generator/Generators/CLI/CLIGenerator.cs +++ b/src/Generator/Generators/CLI/CLIGenerator.cs @@ -17,9 +17,9 @@ namespace CppSharp.Generators.CLI Type.TypePrinterDelegate += type => type.Visit(typePrinter); } - public override List Generate(TranslationUnit unit) + public override List