Skip to content

Commit

Permalink
Merge pull request #459 from iwedaz/iwedaz/cancellation_tokens
Browse files Browse the repository at this point in the history
Forward missed CancellationTokens
  • Loading branch information
DiscoPYF authored Jan 16, 2023
2 parents 3a6465e + 4a44144 commit ebaf170
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 17 deletions.
32 changes: 16 additions & 16 deletions arangodb-net-standard/AqlFunctionApi/AqlFunctionApiClient.cs
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ public virtual async Task<PostAqlFunctionResponse> PostAqlFunctionAsync(
{
var content = GetContent(body, new ApiClientSerializationOptions(true, true));

using (var response = await _transport.PostAsync(_apiPath, content).ConfigureAwait(false))
using (var response = await _transport.PostAsync(_apiPath, content, token: token).ConfigureAwait(false))
{
if (response.IsSuccessStatusCode)
{
Expand Down Expand Up @@ -92,7 +92,7 @@ public virtual async Task<DeleteAqlFunctionResponse> DeleteAqlFunctionAsync(
uri += "?" + query.ToQueryString();
}

using (var response = await _transport.DeleteAsync(uri).ConfigureAwait(false))
using (var response = await _transport.DeleteAsync(uri, token: token).ConfigureAwait(false))
{
if (response.IsSuccessStatusCode)
{
Expand Down Expand Up @@ -120,7 +120,7 @@ public virtual async Task<GetAqlFunctionsResponse> GetAqlFunctionsAsync(
uri += "?" + query.ToQueryString();
}

using (var response = await _transport.GetAsync(uri).ConfigureAwait(false))
using (var response = await _transport.GetAsync(uri, token: token).ConfigureAwait(false))
{
if (response.IsSuccessStatusCode)
{
Expand Down Expand Up @@ -150,7 +150,7 @@ public virtual async Task<PostExplainAqlQueryResponse> PostExplainAqlQueryAsync(
string uri = "_api/explain";

var content = GetContent(body, new ApiClientSerializationOptions(true, true));
using (var response = await _transport.PostAsync(uri, content).ConfigureAwait(false))
using (var response = await _transport.PostAsync(uri, content, token: token).ConfigureAwait(false))
{
if (response.IsSuccessStatusCode)
{
Expand Down Expand Up @@ -180,7 +180,7 @@ public virtual async Task<PostParseAqlQueryResponse> PostParseAqlQueryAsync(
string uri = "_api/query";

var content = GetContent(body, new ApiClientSerializationOptions(true, true));
using (var response = await _transport.PostAsync(uri, content).ConfigureAwait(false))
using (var response = await _transport.PostAsync(uri, content, token: token).ConfigureAwait(false))
{
if (response.IsSuccessStatusCode)
{
Expand Down Expand Up @@ -227,7 +227,7 @@ public virtual async Task<ResponseBase> DeleteKillRunningAqlQueryAsync(
uri += "?" + query.ToQueryString();
}

using (var response = await _transport.DeleteAsync(uri).ConfigureAwait(false))
using (var response = await _transport.DeleteAsync(uri, token: token).ConfigureAwait(false))
{
if (response.IsSuccessStatusCode)
{
Expand Down Expand Up @@ -262,7 +262,7 @@ public virtual async Task<ResponseBase> DeleteClearSlowAqlQueriesAsync(
uri += "?" + query.ToQueryString();
}

using (var response = await _transport.DeleteAsync(uri).ConfigureAwait(false))
using (var response = await _transport.DeleteAsync(uri, token: token).ConfigureAwait(false))
{
if (response.IsSuccessStatusCode)
{
Expand Down Expand Up @@ -305,7 +305,7 @@ public virtual async Task<List<SlowAqlQuery>> GetSlowAqlQueriesAsync(
uri += "?" + query.ToQueryString();
}

using (var response = await _transport.GetAsync(uri).ConfigureAwait(false))
using (var response = await _transport.GetAsync(uri, token: token).ConfigureAwait(false))
{
if (response.IsSuccessStatusCode)
{
Expand All @@ -329,7 +329,7 @@ public virtual async Task<ResponseBase> DeleteClearAqlQueryCacheAsync(
{
string uri = "_api/query-cache";

using (var response = await _transport.DeleteAsync(uri).ConfigureAwait(false))
using (var response = await _transport.DeleteAsync(uri, token: token).ConfigureAwait(false))
{
if (response.IsSuccessStatusCode)
{
Expand All @@ -354,7 +354,7 @@ public virtual async Task<List<CachedAqlQueryResult>> GetCachedAqlQueryResultsAs
CancellationToken token = default)
{
string uri = "_api/query-cache/entries";
using (var response = await _transport.GetAsync(uri).ConfigureAwait(false))
using (var response = await _transport.GetAsync(uri, token: token).ConfigureAwait(false))
{
if (response.IsSuccessStatusCode)
{
Expand All @@ -377,7 +377,7 @@ public virtual async Task<QueryCacheGlobalProperties> GetQueryCacheGlobalPropert
CancellationToken token = default)
{
string uri = "_api/query-cache/properties";
using (var response = await _transport.GetAsync(uri).ConfigureAwait(false))
using (var response = await _transport.GetAsync(uri, token: token).ConfigureAwait(false))
{
if (response.IsSuccessStatusCode)
{
Expand Down Expand Up @@ -412,7 +412,7 @@ public virtual async Task<QueryCacheGlobalProperties> PutAdjustQueryCacheGlobalP
string uri = "_api/query-cache/properties";

var content = GetContent(body, new ApiClientSerializationOptions(true, true));
using (var response = await _transport.PutAsync(uri, content).ConfigureAwait(false))
using (var response = await _transport.PutAsync(uri, content, token: token).ConfigureAwait(false))
{
if (response.IsSuccessStatusCode)
{
Expand All @@ -433,7 +433,7 @@ public virtual async Task<QueryTrackingConfiguration> GetQueryTrackingConfigurat
CancellationToken token = default)
{
string uri = "_api/query/properties";
using (var response = await _transport.GetAsync(uri).ConfigureAwait(false))
using (var response = await _transport.GetAsync(uri, token: token).ConfigureAwait(false))
{
if (response.IsSuccessStatusCode)
{
Expand Down Expand Up @@ -467,7 +467,7 @@ public virtual async Task<QueryTrackingConfiguration> PutChangeQueryTrackingConf
string uri = "_api/query/properties";

var content = GetContent(body, new ApiClientSerializationOptions(true, true));
using (var response = await _transport.PutAsync(uri, content).ConfigureAwait(false))
using (var response = await _transport.PutAsync(uri, content, token: token).ConfigureAwait(false))
{
if (response.IsSuccessStatusCode)
{
Expand Down Expand Up @@ -498,7 +498,7 @@ public virtual async Task<List<RunningAqlQuery>> GetCurrentlyRunningAqlQueriesAs
uri += "?" + query.ToQueryString();
}

using (var response = await _transport.GetAsync(uri).ConfigureAwait(false))
using (var response = await _transport.GetAsync(uri, token: token).ConfigureAwait(false))
{
if (response.IsSuccessStatusCode)
{
Expand All @@ -523,7 +523,7 @@ public virtual async Task<List<GetQueryRule>> GetQueryRulesAsync(CancellationTok
{
string uri = "_api/query/rules";

using (var response = await _transport.GetAsync(uri).ConfigureAwait(false))
using (var response = await _transport.GetAsync(uri, token: token).ConfigureAwait(false))
{
if (response.IsSuccessStatusCode)
{
Expand Down
2 changes: 1 addition & 1 deletion arangodb-net-standard/ViewApi/ViewsApiClient.cs
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ public virtual async Task<ViewResponse> PostCreateViewAsync(ViewDetails body, bo
useCamelCasePropertyNames: true,
ignoreNullValues: ignoreNullValuesOnSerialization,
applySerializationOptionsToDictionaryValues: true));
using (var response = await _transport.PostAsync(uri, content).ConfigureAwait(false))
using (var response = await _transport.PostAsync(uri, content, token: token).ConfigureAwait(false))
{
if (response.IsSuccessStatusCode)
{
Expand Down

0 comments on commit ebaf170

Please sign in to comment.