Пример #1
0
 /// <summary>
 /// List all operations provided by Microsoft.Confluent.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='nextPageLink'>
 /// The NextLink from the previous successful call to List operation.
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task <IPage <OperationResult> > ListNextAsync(this IOrganizationOperations operations, string nextPageLink, CancellationToken cancellationToken = default(CancellationToken))
 {
     using (var _result = await operations.ListNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false))
     {
         return(_result.Body);
     }
 }
Пример #2
0
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='id'>
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task <Organization> GetAsync(this IOrganizationOperations operations, string id, CancellationToken cancellationToken = default(CancellationToken))
 {
     using (var _result = await operations.GetWithHttpMessagesAsync(id, null, cancellationToken).ConfigureAwait(false))
     {
         return(_result.Body);
     }
 }
Пример #3
0
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='body'>
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task <Organization> CreateAsync(this IOrganizationOperations operations, OrganizationCreateModel body = default(OrganizationCreateModel), CancellationToken cancellationToken = default(CancellationToken))
 {
     using (var _result = await operations.CreateWithHttpMessagesAsync(body, null, cancellationToken).ConfigureAwait(false))
     {
         return(_result.Body);
     }
 }
Пример #4
0
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='id'>
 /// </param>
 public static Organization Get(this IOrganizationOperations operations, string id)
 {
     return(operations.GetAsync(id).GetAwaiter().GetResult());
 }
Пример #5
0
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='body'>
 /// </param>
 public static Organization Create(this IOrganizationOperations operations, OrganizationCreateModel body = default(OrganizationCreateModel))
 {
     return(operations.CreateAsync(body).GetAwaiter().GetResult());
 }
Пример #6
0
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 public static IList <Organization> GetAll(this IOrganizationOperations operations)
 {
     return(operations.GetAllAsync().GetAwaiter().GetResult());
 }
Пример #7
0
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='id'>
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task DeleteAsync(this IOrganizationOperations operations, string id, CancellationToken cancellationToken = default(CancellationToken))
 {
     (await operations.DeleteWithHttpMessagesAsync(id, null, cancellationToken).ConfigureAwait(false)).Dispose();
 }
Пример #8
0
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='id'>
 /// </param>
 public static void Delete(this IOrganizationOperations operations, string id)
 {
     operations.DeleteAsync(id).GetAwaiter().GetResult();
 }
Пример #9
0
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='id'>
 /// </param>
 /// <param name='body'>
 /// </param>
 public static Organization Update(this IOrganizationOperations operations, string id, OrganizationUpdateModel body = default(OrganizationUpdateModel))
 {
     return(operations.UpdateAsync(id, body).GetAwaiter().GetResult());
 }
Пример #10
0
 /// <summary>
 /// List all operations provided by Microsoft.Confluent.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='nextPageLink'>
 /// The NextLink from the previous successful call to List operation.
 /// </param>
 public static IPage <OperationResult> ListNext(this IOrganizationOperations operations, string nextPageLink)
 {
     return(operations.ListNextAsync(nextPageLink).GetAwaiter().GetResult());
 }
Пример #11
0
 /// <summary>
 /// List all operations provided by Microsoft.Confluent.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 public static IPage <OperationResult> List(this IOrganizationOperations operations)
 {
     return(operations.ListAsync().GetAwaiter().GetResult());
 }