public virtual async Task <GetDatabaseResponse> GetAsync(GetDatabaseRequest request) { var httpRequest = GetHttpRequestFactory.Create(request); using (var httpResponse = await SendAsync(httpRequest).ForAwait()) return(await GetDatabaseResponseFactory.CreateAsync(httpResponse).ForAwait()); }
public virtual async Task <GetDatabaseResponse> GetAsync(CancellationToken cancellationToken = default) { var request = new GetDatabaseRequest(Connection.DbName); var httpRequest = GetHttpRequestFactory.Create(request); using (var httpResponse = await SendAsync(httpRequest, cancellationToken).ForAwait()) return(await GetDatabaseResponseFactory.CreateAsync(httpResponse).ForAwait()); }
public virtual async Task <GetEntityResponse <T> > GetAsync <T>(GetEntityRequest request) where T : class { var httpRequest = GetHttpRequestFactory.Create(request); using (var res = await SendAsync(httpRequest).ForAwait()) { return(await EntityResponseFactory.CreateAsync <GetEntityResponse <T>, T>(res).ForAwait()); } }
protected virtual HttpRequest CreateHttpRequest(GetEntityRequest request) { return(GetHttpRequestFactory.Create(request)); }
protected virtual HttpRequest CreateHttpRequest(GetDatabaseRequest request) { return(GetHttpRequestFactory.Create(request)); }