Browse Source

Fixed QualifiedIdentifier when QualifiedName is empty (case of namespaces)

pull/228/merge
marcos henrich 11 years ago committed by triton
parent
commit
7794e52103
  1. 12
      src/Generator/Generators/CLI/CLITextTemplate.cs

12
src/Generator/Generators/CLI/CLITextTemplate.cs

@ -81,15 +81,17 @@ namespace CppSharp.Generators.CLI
public string QualifiedIdentifier(Declaration decl) public string QualifiedIdentifier(Declaration decl)
{ {
var ids = new List<string>();
if (Options.GenerateLibraryNamespace) 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.Format("{0}::{1}", Options.OutputNamespace, decl.QualifiedName);
}
return string.Join("::", ids); return decl.QualifiedName;
} }
public string GetMethodName(Method method) public string GetMethodName(Method method)

Loading…
Cancel
Save