예제 #1
0
        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());
        }
예제 #2
0
        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());
        }
예제 #3
0
        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());
            }
        }
예제 #4
0
 protected virtual HttpRequest CreateHttpRequest(GetEntityRequest request)
 {
     return(GetHttpRequestFactory.Create(request));
 }
예제 #5
0
 protected virtual HttpRequest CreateHttpRequest(GetDatabaseRequest request)
 {
     return(GetHttpRequestFactory.Create(request));
 }