Browse Source

Merge pull request #37 from ddobrev/remove_protected_virtual_from_structs

Removed the "protected" and "virtual" modifiers of "Dispose(bool)" when the containing type is a structure.
pull/35/merge
João Matos 12 years ago
parent
commit
a946ee4826
  1. 12
      src/Generator/Generators/CSharp/CSharpTextTemplate.cs

12
src/Generator/Generators/CSharp/CSharpTextTemplate.cs

@ -1324,9 +1324,15 @@ namespace CppSharp.Generators.CSharp @@ -1324,9 +1324,15 @@ namespace CppSharp.Generators.CSharp
// Generate Dispose(bool) method
PushBlock(CSharpBlockKind.Method);
Write("protected ");
Write(hasBaseClass ? "override " : "virtual ");
if (@class.IsValueType)
{
this.Write("private ");
}
else
{
this.Write("protected ");
this.Write(hasBaseClass ? "override " : "virtual ");
}
WriteLine("void Dispose(bool disposing)");
WriteStartBraceIndent();

Loading…
Cancel
Save