예제 #1
0
파일: Dht.cs 프로젝트: mitacha/Kademlia-1
 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;
 }