private void Add(INamespaceName item) { var position = item.GetHashCode() & NamespaceNamesMask; var nodes = _NamespaceNames[position]; if (nodes == null) { _NamespaceNames[position] = nodes = new NamespaceNameCollection(); } nodes.Add(item); }
private static string ToName(this INamespaceName name) { if (name.IsGlobalNamespace) { return(""); } // TODO @seb: fix analysis and remove this check then if (name.ParentNamespace == null) { return(""); } return(string.Format("{0}{1}/", name.ParentNamespace.ToName(), name.Name)); }
public NamespaceName(INamespaceName parent, string fullName) { FullName = fullName; Parent = parent; if (parent.IsGlobal) { Root = this; } else { Root = parent.Root; } }
private bool TryGet(string key, out INamespaceName item) { var position = key.GetHashCode() & NamespaceNamesMask; var nodes = _NamespaceNames[position]; if (nodes != null) { return(nodes.TryGet(key, out item)); } else { item = default(INamespaceName); return(false); } }
public void Import(INamespaceName namespaceName) { ImportedNamespaceNames.Add(namespaceName); }
public NamespaceDeclarationFormatterContext(IFormatterContext parent, INamespaceName namespaceName) { Parent = parent; NamespaceName = namespaceName; }
private static INamespaceName ToAnonymousName(INamespaceName @namespace) { return(Names.Namespace(@namespace.Identifier.ToHash())); }