public async Task <Operation> CompactDatabaseAsync(string databaseName, CancellationToken token = default(CancellationToken)) { using (var req = adminRequest.CompactDatabase(databaseName)) { var json = await req.ReadResponseJsonAsync().WithCancellation(token).ConfigureAwait(false); return(new Operation((AsyncServerClient)innerAsyncServerClient.ForSystemDatabase(), json.Value <long>("OperationId"))); } }
public Task CompactDatabaseAsync(string databaseName) { return(adminRequest.CompactDatabase(databaseName).ExecuteRequestAsync()); }
public async Task <Operation> CompactDatabaseAsync(string databaseName) { var jsonResponse = await adminRequest.CompactDatabase(databaseName).ReadResponseJsonAsync().ConfigureAwait(false); return(new Operation(innerAsyncServerClient, jsonResponse.Value <long>("OperationId"))); }