async Task <IViewQueryResult> QueryInternal(ViewQuery query) { var response = await StartQuery(uriConstructor.GetQueryUri(query)); if (!response.IsSuccessStatusCode) { var error = new CouchError(parent.Settings.Serializer, response); error.ThrowDatabaseMissingExceptionIfNedded(uriConstructor); error.ThrowViewNotFoundExceptionIfNedded(query); error.ThrowCouchCommunicationException(); } using (var reader = await response.Content.ReadAsUtf8TextReaderAsync()) return(ViewQueryResultParser.Parse(reader, query)); }
async Task<IViewQueryResult> QueryInternal(ViewQuery query) { var response = await StartQuery(uriConstructor.GetQueryUri(query)); if (!response.IsSuccessStatusCode) { var error = new CouchError(parent.Settings.Serializer, response); error.ThrowDatabaseMissingExceptionIfNedded(uriConstructor); error.ThrowViewNotFoundExceptionIfNedded(query); error.ThrowCouchCommunicationException(); } using (var reader = await response.Content.ReadAsUtf8TextReaderAsync()) return ViewQueryResultParser.Parse(reader, query); }