Browse Source

Use the type printer from CSharpGenerator in CSharpSources.

The code generator depends on the it being the same due to side effects from type printer context handling.
pull/761/head
Joao Matos 9 years ago
parent
commit
0d39c03bc9
  1. 2
      src/Generator/Generators/CSharp/CSharpGenerator.cs
  2. 2
      src/Generator/Generators/CSharp/CSharpSources.cs

2
src/Generator/Generators/CSharp/CSharpGenerator.cs

@ -17,7 +17,7 @@ namespace CppSharp.Generators.CSharp @@ -17,7 +17,7 @@ namespace CppSharp.Generators.CSharp
{
var outputs = new List<CodeGenerator>();
var gen = new CSharpSources(Context, units);
var gen = new CSharpSources(Context, units) { TypePrinter = typePrinter };
outputs.Add(gen);
return outputs;

2
src/Generator/Generators/CSharp/CSharpSources.cs

@ -124,7 +124,7 @@ namespace CppSharp.Generators.CSharp @@ -124,7 +124,7 @@ namespace CppSharp.Generators.CSharp
public class CSharpSources : CodeGenerator
{
public CSharpTypePrinter TypePrinter { get; protected set; }
public CSharpTypePrinter TypePrinter { get; set; }
public CSharpExpressionPrinter ExpressionPrinter { get; protected set; }
public override string FileExtension => "cs";

Loading…
Cancel
Save