Skip to content

Commit 8df622d

Browse files
committed
fix: csharp
1 parent fbc24b1 commit 8df622d

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

clients/algoliasearch-client-csharp/algoliasearch/Utils/SearchClientExtensions.cs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -184,9 +184,9 @@ public partial interface ISearchClient
184184
/// <param name="options">Add extra http header or query parameters to Algolia.</param>
185185
/// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
186186
/// <typeparam name="T"></typeparam>
187-
List<BatchResponse> SaveObjectsAsync<T>(string indexName, IEnumerable<T> objects, RequestOptions options = null, CancellationToken cancellationToken = default) where T : class;
187+
Task<List<BatchResponse>> SaveObjectsAsync<T>(string indexName, IEnumerable<T> objects, RequestOptions options, CancellationToken cancellationToken = default) where T : class;
188188
/// <inheritdoc cref="SaveObjectsAsync{T}(string, IEnumerable{T}, RequestOptions, CancellationToken)"/>
189-
List<BatchResponse> SaveObjects<T>(string indexName, IEnumerable<T> objects, RequestOptions options = null, CancellationToken cancellationToken = default) where T : class;
189+
List<BatchResponse> SaveObjects<T>(string indexName, IEnumerable<T> objects, RequestOptions options, CancellationToken cancellationToken = default) where T : class;
190190

191191
/// <summary>
192192
/// Helper: Deletes every records for the given objectIDs. The `chunkedBatch` helper is used under the hood, which creates a `batch` requests with at most 1000 objectIDs in it.
@@ -609,17 +609,17 @@ public async Task<List<BatchResponse>> SaveObjectsAsync<T>(string indexName, IEn
609609
public List<BatchResponse> SaveObjects<T>(string indexName, IEnumerable<T> objects, bool waitForTasks = false, int batchSize = 1000, RequestOptions options = null,
610610
CancellationToken cancellationToken = default) where T : class =>
611611
AsyncHelper.RunSync(() => SaveObjectsAsync(indexName, objects, waitForTasks, batchSize, options, cancellationToken));
612-
612+
613613
/// <inheritdoc/>
614614
public async Task<List<BatchResponse>> SaveObjectsAsync<T>(string indexName, IEnumerable<T> objects,
615-
RequestOptions options = null,
615+
RequestOptions options,
616616
CancellationToken cancellationToken = default) where T : class
617617
{
618-
return await ChunkedBatchAsync(indexName, objects, Action.AddObject, false, 1000, options, cancellationToken).ConfigureAwait(false);
618+
return await SaveObjectsAsync(indexName, objects, false, 1000, options, cancellationToken).ConfigureAwait(false);
619619
}
620620

621621
/// <inheritdoc/>
622-
public List<BatchResponse> SaveObjects<T>(string indexName, IEnumerable<T> objects, RequestOptions options = null,
622+
public List<BatchResponse> SaveObjects<T>(string indexName, IEnumerable<T> objects, RequestOptions options,
623623
CancellationToken cancellationToken = default) where T : class =>
624624
AsyncHelper.RunSync(() => SaveObjectsAsync(indexName, objects, options, cancellationToken));
625625

0 commit comments

Comments
 (0)