|
|
@ -158,11 +158,9 @@ namespace CppSharp.Generators.CSharp |
|
|
|
public override bool VisitNamespace(Namespace @namespace) |
|
|
|
public override bool VisitNamespace(Namespace @namespace) |
|
|
|
{ |
|
|
|
{ |
|
|
|
var context = @namespace; |
|
|
|
var context = @namespace; |
|
|
|
|
|
|
|
|
|
|
|
var isNamespace = context is Namespace; |
|
|
|
|
|
|
|
var isTranslationUnit = context is TranslationUnit; |
|
|
|
var isTranslationUnit = context is TranslationUnit; |
|
|
|
|
|
|
|
|
|
|
|
var shouldGenerateNamespace = isNamespace && !isTranslationUnit && |
|
|
|
var shouldGenerateNamespace = !@namespace.IsInline && !isTranslationUnit && |
|
|
|
context.Declarations.Any(d => d.IsGenerated || (d is Class && !d.IsIncomplete)); |
|
|
|
context.Declarations.Any(d => d.IsGenerated || (d is Class && !d.IsIncomplete)); |
|
|
|
|
|
|
|
|
|
|
|
if (shouldGenerateNamespace) |
|
|
|
if (shouldGenerateNamespace) |
|
|
|