From b78af2d5213af5c241d48009424939b697b36212 Mon Sep 17 00:00:00 2001 From: triton Date: Tue, 19 Mar 2013 15:15:49 +0000 Subject: [PATCH] Fixed the declaration qualified name printing to take into account library namespaces. --- src/Generator/Generators/CLI/CLITypePrinter.cs | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/src/Generator/Generators/CLI/CLITypePrinter.cs b/src/Generator/Generators/CLI/CLITypePrinter.cs index cf43b825..93d6f9c3 100644 --- a/src/Generator/Generators/CLI/CLITypePrinter.cs +++ b/src/Generator/Generators/CLI/CLITypePrinter.cs @@ -195,8 +195,17 @@ namespace Cxxi.Generators.CLI public string VisitDeclaration(Declaration decl) { - var name = decl.Visit(this); - return string.Format("{0}::{1}", decl.Namespace.QualifiedName, name); + var names = new List(); + + if (Options.GenerateLibraryNamespace) + names.Add(Library.Name); + + if (!string.IsNullOrEmpty(decl.Namespace.QualifiedName)) + names.Add(decl.Namespace.QualifiedName); + + names.Add(decl.Visit(this)); + + return string.Join("::", names); } public string VisitClassDecl(Class @class)