File tree Expand file tree Collapse file tree 1 file changed +9
-4
lines changed
src/Generator/Generators/CSharp Expand file tree Collapse file tree 1 file changed +9
-4
lines changed Original file line number Diff line number Diff line change @@ -20,6 +20,8 @@ public class CSharpTypePrinter : TypePrinter
20
20
public DriverOptions Options => Context . Options ;
21
21
public TypeMapDatabase TypeMapDatabase => Context . TypeMaps ;
22
22
23
+ public bool PrintModuleOutputNamespace = true ;
24
+
23
25
public CSharpTypePrinter ( BindingContext context )
24
26
{
25
27
Context = context ;
@@ -646,10 +648,13 @@ string GetName(Declaration decl)
646
648
ctx = ctx . Namespace ;
647
649
}
648
650
649
- var unit = ctx . TranslationUnit ;
650
- if ( ! unit . IsSystemHeader && unit . IsValid &&
651
- ! string . IsNullOrWhiteSpace ( unit . Module . OutputNamespace ) )
652
- names . Push ( unit . Module . OutputNamespace ) ;
651
+ if ( PrintModuleOutputNamespace )
652
+ {
653
+ var unit = ctx . TranslationUnit ;
654
+ if ( ! unit . IsSystemHeader && unit . IsValid &&
655
+ ! string . IsNullOrWhiteSpace ( unit . Module . OutputNamespace ) )
656
+ names . Push ( unit . Module . OutputNamespace ) ;
657
+ }
653
658
654
659
return QualifiedType ( string . Join ( "." , names ) ) ;
655
660
}
You can’t perform that action at this time.
0 commit comments