Example #1
0
 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
     });
 }
Example #2
0
 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);
 }