From 259aeb036d8afc8b984a66a87b22ebf50a18f6db Mon Sep 17 00:00:00 2001 From: triton Date: Mon, 6 May 2013 02:47:30 +0100 Subject: [PATCH] Deal correctly with base classes when generating native constructors. --- src/Generator/Generators/CSharp/CSharpTextTemplate.cs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/Generator/Generators/CSharp/CSharpTextTemplate.cs b/src/Generator/Generators/CSharp/CSharpTextTemplate.cs index b2d94ad4..91f9f4c4 100644 --- a/src/Generator/Generators/CSharp/CSharpTextTemplate.cs +++ b/src/Generator/Generators/CSharp/CSharpTextTemplate.cs @@ -751,6 +751,11 @@ namespace Cxxi.Generators.CSharp private void GenerateNativeConstructor(Class @class) { WriteLine("internal {0}(System.IntPtr native)", SafeIdentifier(@class.Name)); + + var hasBaseClass = @class.HasBaseClass && @class.BaseClass.IsRefType; + if (hasBaseClass) + WriteLineIndent(": base(native)"); + WriteStartBraceIndent(); if (@class.IsRefType)