internal SectionNames(ConfigSnapshot cfg) { IDictionary <string, string> sec = new LinkedHashMap <string, string>(); IDictionary <string, ICollection <string> > sub = new Dictionary <string, ICollection <string> >(); while (cfg != null) { foreach (ConfigLine e in cfg.entryList) { if (e.section == null) { continue; } string l1 = StringUtils.ToLowerCase(e.section); if (!sec.ContainsKey(l1)) { sec.Put(l1, e.section); } if (e.subsection == null) { continue; } ICollection <string> m = sub.Get(l1); if (m == null) { m = new LinkedHashSet <string>(); sub.Put(l1, m); } m.AddItem(e.subsection); } cfg = cfg.baseState; } sections = new ConfigSnapshot.CaseFoldingSet(sec); subsections = sub; }
internal ConfigSnapshot(IList <ConfigLine> entries, NGit.ConfigSnapshot @base) { entryList = entries; cache = new ConcurrentHashMap <object, object>(16, 0.75f, 1); baseState = @base; }