/// <summary> /// /// </summary> /// <param name="cancellationToken">The token to monitor for cancellation requests. The default value is <see cref="CancellationToken.None"/>.</param> /// <returns></returns> public async Task <IDictionary <string, GetDBInfoReply> > ListDBsAsync(CancellationToken cancellationToken = default) { ListDBsRequest request = new(); ListDBsReply list = await _apiClient.ListDBsAsync(request, headers : _threadContext.Metadata, cancellationToken : cancellationToken); return(list.Dbs.ToDictionary(db => ThreadId.FromBytes(db.DbID.ToByteArray()).ToString(), db => db.Info)); }
public void Should_Be_Able_To_Round_Trip_To_And_From_Bytes() { ThreadId i = ThreadId.FromRandom(Variant.Raw, 16); byte[] b = i.Bytes; ThreadId n = ThreadId.FromBytes(b); Assert.Equal(n, i); }