From 0d39c03bc91e76c8ab800783f817a75d56bc0869 Mon Sep 17 00:00:00 2001 From: Joao Matos Date: Tue, 14 Feb 2017 15:35:14 +0000 Subject: [PATCH] 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. --- src/Generator/Generators/CSharp/CSharpGenerator.cs | 2 +- src/Generator/Generators/CSharp/CSharpSources.cs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Generator/Generators/CSharp/CSharpGenerator.cs b/src/Generator/Generators/CSharp/CSharpGenerator.cs index 3282c3d6..d31a0852 100644 --- a/src/Generator/Generators/CSharp/CSharpGenerator.cs +++ b/src/Generator/Generators/CSharp/CSharpGenerator.cs @@ -17,7 +17,7 @@ namespace CppSharp.Generators.CSharp { var outputs = new List(); - var gen = new CSharpSources(Context, units); + var gen = new CSharpSources(Context, units) { TypePrinter = typePrinter }; outputs.Add(gen); return outputs; diff --git a/src/Generator/Generators/CSharp/CSharpSources.cs b/src/Generator/Generators/CSharp/CSharpSources.cs index 700ba75f..bae87c73 100644 --- a/src/Generator/Generators/CSharp/CSharpSources.cs +++ b/src/Generator/Generators/CSharp/CSharpSources.cs @@ -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";