示例#1
0
 public async Task Self_Key_Exists()
 {
     IpfsClient ipfs = TestFixture.Ipfs;
     var keys = await ipfs.Key.ListAsync();
     var self = keys.Single(k => k.Name == "self");
     var me = await ipfs.IdAsync();
     Assert.AreEqual("self", self.Name);
     Assert.AreEqual(me.Id, self.Id);
 }
示例#2
0
 /// <summary>
 ///   Information about an IPFS peer.
 /// </summary>
 /// <param name="id">
 ///   The <see cref="string"/> ID of the IPFS peer.
 /// </param>
 /// <param name="cancel">
 ///   Is used to stop the task.  When cancelled, the <see cref="TaskCanceledException"/> is raised.
 /// </param>
 public Task <PeerNode> FindPeerAsync(string id, CancellationToken cancel = default(CancellationToken))
 {
     return(ipfs.IdAsync(id, cancel));
 }
示例#3
0
 /// <summary>
 ///   Information about an IPFS peer.
 /// </summary>
 /// <param name="id">
 ///   The <see cref="string"/> ID of the IPFS peer.
 /// </param>
 public Task <PeerNode> FindPeerAsync(string id)
 {
     return(ipfs.IdAsync(id));
 }
示例#4
0
 public Task <Peer> FindPeerAsync(MultiHash id, CancellationToken cancel = default(CancellationToken))
 {
     return(ipfs.IdAsync(id, cancel));
 }