コード例 #1
0
ファイル: AsyncAdminServerClient.cs プロジェクト: mow/ravendb
        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")));
            }
        }
コード例 #2
0
 public Task CompactDatabaseAsync(string databaseName)
 {
     return(adminRequest.CompactDatabase(databaseName).ExecuteRequestAsync());
 }
コード例 #3
0
        public async Task <Operation> CompactDatabaseAsync(string databaseName)
        {
            var jsonResponse = await adminRequest.CompactDatabase(databaseName).ReadResponseJsonAsync().ConfigureAwait(false);

            return(new Operation(innerAsyncServerClient, jsonResponse.Value <long>("OperationId")));
        }