Пример #1
0
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='model'>
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task <ErrorResponse> SendAsync(this ISmsSenderAPI operations, SmsModel model = default(SmsModel), CancellationToken cancellationToken = default(CancellationToken))
 {
     using (var _result = await operations.SendWithHttpMessagesAsync(model, null, cancellationToken).ConfigureAwait(false))
     {
         return(_result.Body);
     }
 }
Пример #2
0
 /// <summary>
 /// Checks service is alive
 /// </summary>
 /// <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 ISmsSenderAPI operations, CancellationToken cancellationToken = default(CancellationToken))
 {
     using (var _result = await operations.IsAliveWithHttpMessagesAsync(null, cancellationToken).ConfigureAwait(false))
     {
         return(_result.Body);
     }
 }
Пример #3
0
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='model'>
 /// </param>
 public static ErrorResponse Send(this ISmsSenderAPI operations, SmsModel model = default(SmsModel))
 {
     return(operations.SendAsync(model).GetAwaiter().GetResult());
 }
Пример #4
0
 /// <summary>
 /// Checks service is alive
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 public static object IsAlive(this ISmsSenderAPI operations)
 {
     return(operations.IsAliveAsync().GetAwaiter().GetResult());
 }