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

Loading…
Cancel
Save