Ejemplo n.º 1
0
        public async Task list_witnesses()
        {
            var args = new ListWitnessesArgs();
            var resp = await Api.ListWitnessesAsync(args, CancellationToken.None).ConfigureAwait(false);

            TestPropetries(resp);
        }
Ejemplo n.º 2
0
        public void list_witnesses()
        {
            var args = new ListWitnessesArgs();
            var resp = Api.ListWitnesses(args, CancellationToken.None);

            WriteLine(resp);
            Assert.IsFalse(resp.IsError);

            var obj = Api.CustomGetRequest <JObject>(KnownApiNames.DatabaseApi, "list_witnesses", args, CancellationToken.None);

            TestPropetries(resp.Result.GetType(), obj.Result);
            WriteLine("----------------------------------------------------------------------------");
            WriteLine(obj);
        }
Ejemplo n.º 3
0
        ///////////////
        // Witnesses //
        ///////////////

        /// <summary>
        /// API name: list_witnesses
        ///
        /// </summary>
        /// <param name="args">API type: list_witnesses_args</param>
        /// <param name="token">Throws a <see cref="T:System.OperationCanceledException" /> if this token has had cancellation requested.</param>
        /// <returns>API type: list_witnesses_return</returns>
        /// <exception cref="T:System.OperationCanceledException">The token has had cancellation requested.</exception>
        public Task <JsonRpcResponse <ListWitnessesReturn> > ListWitnesses(ListWitnessesArgs args, CancellationToken token)
        {
            return(CustomGetRequest <ListWitnessesReturn>(KnownApiNames.DatabaseApi, "list_witnesses", args, token));
        }