Exemplo n.º 1
0
 /// <summary>
 /// Get a delegate from given parameters asynchronously 
 /// </summary>
 /// <returns>DelegatesResponse with delegates</returns>
 public async Task<DelegateResponse> GetDelegateAsync(DelegateRequest req)
 {
     _url.Path = Constants.ApiGetDelegate;
     _url.Query = req.ToQuery();
     var response = await _client.GetJsonAsync<DelegateResponse>(_url.ToString());
     ResetPath();
     return response;
 }
Exemplo n.º 2
0
        /// <summary>
        /// Get a delegate from given parameters synchronously 
        /// </summary>
        /// <returns>DelegatesResponse with delegates</returns>
        public DelegateResponse GetDelegate(DelegateRequest req)
        {
            var response = GetDelegateAsync(req).GetAwaiter().GetResult();

            return response;
        }