/// <summary>
 /// Initializes a new instance.
 /// </summary>
 /// <param name="hasher"></param>
 /// <param name="values"></param>
 /// <param name="publisher"></param>
 public KsKademliaHashTable(IKsKademliaHasher <TKey, TNodeId> hasher, IKValueAccessor <TNodeId> values, IKPublisher <TNodeId> publisher)
 {
     this.hasher    = hasher ?? throw new ArgumentNullException(nameof(hasher));
     this.values    = values ?? throw new ArgumentNullException(nameof(values));
     this.publisher = publisher ?? throw new ArgumentNullException(nameof(publisher));
 }
Exemplo n.º 2
0
 /// <summary>
 /// Initializes a new instance.
 /// </summary>
 /// <param name="router"></param>
 /// <param name="publisher"></param>
 public KademliaController(IKRouter <KNodeId256> router, IKPublisher <KNodeId256> publisher, IKValueAccessor <KNodeId256> values)
 {
     this.router = router ?? throw new ArgumentNullException(nameof(router));
     this.values = values ?? throw new ArgumentNullException(nameof(values));
 }