From 7794e521034ab72a751cd4aeb766e492cb410f55 Mon Sep 17 00:00:00 2001 From: marcos henrich Date: Wed, 16 Apr 2014 16:00:32 +0100 Subject: [PATCH] Fixed QualifiedIdentifier when QualifiedName is empty (case of namespaces) --- src/Generator/Generators/CLI/CLITextTemplate.cs | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/src/Generator/Generators/CLI/CLITextTemplate.cs b/src/Generator/Generators/CLI/CLITextTemplate.cs index b0ce8501..58c2755e 100644 --- a/src/Generator/Generators/CLI/CLITextTemplate.cs +++ b/src/Generator/Generators/CLI/CLITextTemplate.cs @@ -81,15 +81,17 @@ namespace CppSharp.Generators.CLI public string QualifiedIdentifier(Declaration decl) { - var ids = new List(); if (Options.GenerateLibraryNamespace) - ids.Add(Options.OutputNamespace); - if (!string.IsNullOrWhiteSpace(decl.QualifiedName)) - ids.Add(decl.QualifiedName); + { + if (string.IsNullOrEmpty(decl.QualifiedName)) + return string.Format("{0}", Options.OutputNamespace); - return string.Join("::", ids); + return string.Format("{0}::{1}", Options.OutputNamespace, decl.QualifiedName); + } + + return decl.QualifiedName; } public string GetMethodName(Method method)