Skip to content

Commit

Permalink
Merge pull request #382 from DiscoPYF/missingConfigureAwait
Browse files Browse the repository at this point in the history
Apply ConfigureAwait(false) to inner method calls of bulk operations API
  • Loading branch information
tjoubert authored Jun 1, 2022
2 parents abff3f1 + a8ce128 commit a490d81
Showing 1 changed file with 6 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -85,9 +85,10 @@ public virtual async Task<ImportDocumentsResponse> PostImportDocumentArraysAsync
var options = new ApiClientSerializationOptions(true, true);
foreach (var valueArr in body.ValueArrays)
{
sb.AppendLine(GetContentString(valueArr, options) );
sb.AppendLine(GetContentString(valueArr, options));
}
return await PostImportDocumentArraysAsync(query, sb.ToString());
return await PostImportDocumentArraysAsync(query, sb.ToString())
.ConfigureAwait(false);
}

/// <summary>
Expand Down Expand Up @@ -155,7 +156,7 @@ public virtual async Task<ImportDocumentsResponse> PostImportDocumentObjectsAsyn
{
throw new ArgumentException("body is required", nameof(body));
}

if (body.Documents == null || body.Documents.Count() < 1)
{
throw new ArgumentException("Documents is required", nameof(body.Documents));
Expand All @@ -177,7 +178,8 @@ public virtual async Task<ImportDocumentsResponse> PostImportDocumentObjectsAsyn
//body should be one array of JSON objects
sb.Append(GetContentString(body.Documents, options));
}
return await PostImportDocumentObjectsAsync(query, sb.ToString());
return await PostImportDocumentObjectsAsync(query, sb.ToString())
.ConfigureAwait(false);
}

/// <summary>
Expand Down

0 comments on commit a490d81

Please sign in to comment.