public void AddMailAddress(HttpUrl httpUrl, string href) { lock (this.mailAddressLock) { var mailAddressString = href.Replace("mailto:", string.Empty); var mailAddress = new MailAddress(mailAddressString); if (this.mailAddresses.SelectMany(x => x.Value).Any(x => x.Address == mailAddress.Address)) { return; } if (this.mailAddresses.ContainsKey(httpUrl)) { this.mailAddresses[httpUrl].Add(mailAddress); } else { this.mailAddresses.Add(httpUrl, new List <MailAddress> { mailAddress }); } } }