private CodeNamespace addNamespace(string name)
{
const string PREFIX = "addNamespace(string) - ";
if (log.IsDebugEnabled) log.DebugFormat(PREFIX + "name = \"{0}\"", name);
if (string.IsNullOrEmpty(name))
throw new ArgumentNullException("name", "name cannot be null.");
if (log.IsDebugEnabled) log.DebugFormat("addNamespace(string) - name = \"{0}\"", name);
CodeNamespace ns = null;
if (!_NamespaceLookup.TryGetValue(name, out ns))
{
ns = new CodeNamespace(name);
_CompileUnit.Namespaces.Add(ns);
_NamespaceLookup.Add(name, ns);
}
return ns;
}