Пример #1
0
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='clientId'>
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task <IList <HistoryEntry> > GetHistoryAsync(this IOperationsCacheAPI operations, string clientId = default(string), CancellationToken cancellationToken = default(CancellationToken))
 {
     using (var _result = await operations.GetHistoryWithHttpMessagesAsync(clientId, null, cancellationToken).ConfigureAwait(false))
     {
         return(_result.Body);
     }
 }
Пример #2
0
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task <object> IsAliveAsync(this IOperationsCacheAPI operations, CancellationToken cancellationToken = default(CancellationToken))
 {
     using (var _result = await operations.IsAliveWithHttpMessagesAsync(null, cancellationToken).ConfigureAwait(false))
     {
         return(_result.Body);
     }
 }
 public void Dispose()
 {
     if (_apiClient == null)
     {
         return;
     }
     _apiClient.Dispose();
     _apiClient = null;
 }
 public OperationsCacheClient(string serviceUrl, ILog log)
 {
     _log       = log;
     _apiClient = new OperationsCacheAPI(new Uri(serviceUrl));
 }
Пример #5
0
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='clientId'>
 /// </param>
 /// <param name='operationId'>
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task DeleteCashOperationAsync(this IOperationsCacheAPI operations, string clientId = default(string), string operationId = default(string), CancellationToken cancellationToken = default(CancellationToken))
 {
     (await operations.DeleteCashOperationWithHttpMessagesAsync(clientId, operationId, null, cancellationToken).ConfigureAwait(false)).Dispose();
 }
Пример #6
0
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='clientId'>
 /// </param>
 /// <param name='operationId'>
 /// </param>
 public static void DeleteCashOperation(this IOperationsCacheAPI operations, string clientId = default(string), string operationId = default(string))
 {
     operations.DeleteCashOperationAsync(clientId, operationId).GetAwaiter().GetResult();
 }
Пример #7
0
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='clientId'>
 /// </param>
 public static IList <HistoryEntry> GetHistory(this IOperationsCacheAPI operations, string clientId = default(string))
 {
     return(operations.GetHistoryAsync(clientId).GetAwaiter().GetResult());
 }
Пример #8
0
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 public static object IsAlive(this IOperationsCacheAPI operations)
 {
     return(operations.IsAliveAsync().GetAwaiter().GetResult());
 }