Exemplo n.º 1
0
        public async Task <APIResult <string[]> > GetTrytes(params string[] hashes)
        {
            GetTrytesRequest getTrytesRequest = new GetTrytesRequest()
            {
                Hashes = hashes
            };
            var response = await genericWebClient.RequestAsync <GetTrytesResponse>(getTrytesRequest);

            return(response?.RePackage(r => r.Trytes));
        }
Exemplo n.º 2
0
        public async Task <string[]> GetTrytes(params string[] hashes)
        {
            GetTrytesRequest getTrytesRequest = new GetTrytesRequest()
            {
                Hashes = hashes
            };
            var response = await genericClient.RequestAsync <GetTrytesResponse>(getTrytesRequest);

            if (response == null)
            {
                throw new NullReferenceException(nameof(response));
            }

            return(response.Trytes);
        }
Exemplo n.º 3
0
        /// <summary>
        ///
        /// </summary>
        /// <param name="hashes"></param>
        /// <returns></returns>
        public GetTrytesResponse GetTrytes(params string[] hashes)
        {
            var getTrytesRequest = new GetTrytesRequest(hashes);

            return(Request <GetTrytesRequest, GetTrytesResponse>(getTrytesRequest));
        }