示例#1
0
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='type'>
 /// </param>
 /// <param name='message'>
 /// </param>
 /// <param name='format'>
 /// Specifies response output format
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task <ThrowTypeResponse> CreateAsync(this IThrowTypeOperations operations, string type, string message = default(string), string format = "json", CancellationToken cancellationToken = default(CancellationToken))
 {
     using (var _result = await operations.CreateWithHttpMessagesAsync(type, message, format, null, cancellationToken).ConfigureAwait(false))
     {
         return(_result.Body);
     }
 }
示例#2
0
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='type'>
 /// </param>
 /// <param name='message'>
 /// </param>
 /// <param name='format'>
 /// Specifies response output format
 /// </param>
 public static ThrowTypeResponse Post(this IThrowTypeOperations operations, string type, string message = default(string), string format = "json")
 {
     return(operations.PostAsync(type, message, format).GetAwaiter().GetResult());
 }