public void AddAd(IAddModel model) { foreach (var number in model.PhoneNumbers) { lock (_locker) { if (PhoneAdDictionary.ContainsKey(number)) { if (!PhoneAdDictionary[number].Contains(model.AdId)) { PhoneAdDictionary[number].Add(model.AdId); } } else { PhoneAdDictionary.Add(number, new List <uint> { model.AdId }); } } } }
public ucAddView() { InitializeComponent(); addModel = new AddModel(this); }