Browse Source

Added support for the GenerateLibraryNamespace option in the C# generator.

pull/1/head
triton 12 years ago
parent
commit
6b711dc205
  1. 10
      src/Generator/Generators/CSharp/CSharpTextTemplate.cs

10
src/Generator/Generators/CSharp/CSharpTextTemplate.cs

@ -52,12 +52,16 @@ namespace Cxxi.Generators.CSharp
WriteLine("using System.Runtime.InteropServices;"); WriteLine("using System.Runtime.InteropServices;");
NewLine(); NewLine();
WriteLine("namespace {0}", SafeIdentifier(Driver.Options.LibraryName)); if (Options.GenerateLibraryNamespace)
WriteStartBraceIndent(); {
WriteLine("namespace {0}", SafeIdentifier(Driver.Options.LibraryName));
WriteStartBraceIndent();
}
GenerateDeclarations(); GenerateDeclarations();
WriteCloseBraceIndent(); if (Options.GenerateLibraryNamespace)
WriteCloseBraceIndent();
} }
public void GenerateStart() public void GenerateStart()

Loading…
Cancel
Save