/// <summary> /// Returns true if the contact, by ID, exists in our bucket list. /// </summary> public bool ContactExists(Contact sender) { lock (this) { return(Buckets.SelectMany(b => b.Contacts).Any(c => c.ID == sender.ID)); } }
internal Node FindNode(NodeId id) { return(Buckets.SelectMany(b => b.Nodes).FirstOrDefault(n => n.Id.Equals(id))); }