コード例 #1
0
 /// <summary>
 /// Create or update a Consumer
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='consumer'>
 /// The unique identifier of the new Consumer.
 /// </param>
 /// <param name='consumerUpsert'>
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task <Consumer> AddConsumerWithIdAsync(this IKongAdminAPI operations, string consumer, ConsumerUpsert consumerUpsert, CancellationToken cancellationToken = default(CancellationToken))
 {
     using (var _result = await operations.AddConsumerWithIdWithHttpMessagesAsync(consumer, consumerUpsert, null, cancellationToken).ConfigureAwait(false))
     {
         return(_result.Body);
     }
 }
コード例 #2
0
 /// <summary>
 /// Create or update a Consumer
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='consumer'>
 /// The unique identifier of the new Consumer.
 /// </param>
 /// <param name='consumerUpsert'>
 /// </param>
 public static Consumer AddConsumerWithId(this IKongAdminAPI operations, string consumer, ConsumerUpsert consumerUpsert)
 {
     return(operations.AddConsumerWithIdAsync(consumer, consumerUpsert).GetAwaiter().GetResult());
 }