private void RemoveIndex(string alias, Meeting meeting) { lock (indexlock) { var value = index[alias]; if (value != null) { value.Remove(meeting); } } }
private void AddIndex(Meeting meeting) { Task.Run( () => { lock (indexlock) { meeting.Members.ForEach( m => { if (index[m.Alias] == null) { index[m.Alias] = new List<Meeting>() { meeting }; } else { index[m.Alias].Add(meeting); } }); } }); }
private void AddIndex(Meeting meeting) { Task.Run( () => { lock (Indexlock) { meeting.Members.ForEach( m => { if (index.ContainsKey(m.Alias)) { index[m.Alias].Add(meeting); } else { index[m.Alias] = new List<Meeting> { meeting }; } }); } }); }