diff --git a/src/Generator/Generators/CSharp/CSharpSources.cs b/src/Generator/Generators/CSharp/CSharpSources.cs index ee3c502c..538e66f9 100644 --- a/src/Generator/Generators/CSharp/CSharpSources.cs +++ b/src/Generator/Generators/CSharp/CSharpSources.cs @@ -22,10 +22,21 @@ namespace CppSharp.Generators.CSharp public override string FileExtension => "cs"; + public CSharpSources(BindingContext context) + : base(context) + { + Init(); + } + public CSharpSources(BindingContext context, IEnumerable units) : base(context, units) { - TypePrinter = new CSharpTypePrinter(context); + Init(); + } + + private void Init() + { + TypePrinter = new CSharpTypePrinter(Context); ExpressionPrinter = new CSharpExpressionPrinter(TypePrinter); }