protected void EvictContact(KBucket bucket, Contact toEvict) { evictionCount.TryRemove(toEvict.ID.Value, out _); Validate.IsTrue <BucketDoesNotContainContactToEvict>(bucket.Contains(toEvict.ID), "Bucket doesn't contain the contact to be evicted."); bucket.EvictContact(toEvict); ContactRemoved?.Invoke(this, new ContactEventArgs() { Contact = toEvict }); }
public void When(ContactRemoved contactRemoved) { Deleted = contactRemoved.Deleted; }