private Item[] DoGetConstructorsNamed(CsGlobalNamespace globals, ref string stem) { Profile.Start("AutoComplete::DoGetConstructorsNamed"); var items = new List<Item>(); var namespaces = new List<string>(); int j = stem.LastIndexOf('.'); if (j > 0) { string ns = stem.Substring(0, j); stem = stem.Substring(j + 1); DoAddConstructors(ns, stem, items); } else { DoAddConstructors(null, stem, items); namespaces.AddIfMissing(string.Empty); for (int i = 0; i < globals.Namespaces.Length; ++i) { DoAddConstructors(globals.Namespaces[i].Name, stem, items); namespaces.AddIfMissing(globals.Namespaces[i].Name); } for (int i = 0; i < globals.Uses.Length; ++i) { DoAddConstructors(globals.Uses[i].Namespace, stem, items); namespaces.AddIfMissing(globals.Uses[i].Namespace); } } items.AddIfMissingRange(m_database.GetStemmedCtors(namespaces.ToArray(), stem)); Profile.Stop("AutoComplete::DoGetConstructorsNamed"); return items.ToArray(); }
private void DoAddRealTypes(List<Item> items, CsGlobalNamespace globals, string stem) { var namespaces = new List<string>(); DoAddParsedTypes(items, (string) null, stem); namespaces.AddIfMissing(string.Empty); for (int i = 0; i < globals.Namespaces.Length; ++i) { DoAddParsedTypes(items, globals.Namespaces[i].Name, stem); namespaces.AddIfMissing(globals.Namespaces[i].Name); } for (int i = 0; i < globals.Uses.Length; ++i) { DoAddParsedTypes(items, globals.Uses[i].Namespace, stem); namespaces.AddIfMissing(globals.Uses[i].Namespace); } items.AddIfMissingRange(m_database.GetStemmedTypes(namespaces.ToArray(), stem)); }