public ListIniEntry GetOrAddListEntry(string name) { var entry = GetListEntry(name); if (entry != null) { return(entry); } entry = new ListIniEntry(name, new List <string>()); return(entry); }
public ListIniEntry?GetListEntry(string name) { if (!_entries.TryGetValue(name, out var value)) { return(null); } if (value is ListIniEntry multi) { return(multi); } multi = new ListIniEntry((SingleIniEntry)value); _entries[multi.Key] = multi; return(multi); }
public ListIniEntry GetListEntry(string name) { IniEntry value; if (!_entries.TryGetValue(name, out value)) return null; var multi = value as ListIniEntry; if (multi != null) return multi; multi = new ListIniEntry((SingleIniEntry) value); _entries[multi.Key] = multi; return multi; }
public ListIniEntry GetOrAddListEntry(string name) { ListIniEntry entry = GetListEntry(name); if (entry != null) return entry; entry = new ListIniEntry(name, new List<string>()); return entry; }