Пример #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
     });
 }
Пример #2
0
 public void When(ContactRemoved contactRemoved)
 {
     Deleted = contactRemoved.Deleted;
 }