Пример #1
0
 /// <summary>
 /// Get a directory tenant by name.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='resourceGroupName'>
 /// The resource group the resource is located under.
 /// </param>
 /// <param name='tenant'>
 /// Directory tenant name.
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task <DirectoryTenant> GetAsync(this IDirectoryTenantsOperations operations, string resourceGroupName, string tenant, CancellationToken cancellationToken = default(CancellationToken))
 {
     using (var _result = await operations.GetWithHttpMessagesAsync(resourceGroupName, tenant, null, cancellationToken).ConfigureAwait(false))
     {
         return(_result.Body);
     }
 }
Пример #2
0
 /// <summary>
 /// Lists all the directory tenants under the current subscription and given
 /// resource group name.
 /// </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 <DirectoryTenant> > ListNextAsync(this IDirectoryTenantsOperations operations, string nextPageLink, CancellationToken cancellationToken = default(CancellationToken))
 {
     using (var _result = await operations.ListNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false))
     {
         return(_result.Body);
     }
 }
Пример #3
0
 /// <summary>
 /// Get a directory tenant by name.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='resourceGroupName'>
 /// The resource group the resource is located under.
 /// </param>
 /// <param name='tenant'>
 /// Directory tenant name.
 /// </param>
 public static DirectoryTenant Get(this IDirectoryTenantsOperations operations, string resourceGroupName, string tenant)
 {
     return(operations.GetAsync(resourceGroupName, tenant).GetAwaiter().GetResult());
 }
Пример #4
0
 /// <summary>
 /// Lists all the directory tenants under the current subscription and given
 /// resource group name.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='resourceGroupName'>
 /// The resource group the resource is located under.
 /// </param>
 public static IPage <DirectoryTenant> List(this IDirectoryTenantsOperations operations, string resourceGroupName)
 {
     return(operations.ListAsync(resourceGroupName).GetAwaiter().GetResult());
 }
Пример #5
0
 /// <summary>
 /// Lists all the directory tenants under the current subscription and given
 /// resource group name.
 /// </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 <DirectoryTenant> ListNext(this IDirectoryTenantsOperations operations, string nextPageLink)
 {
     return(operations.ListNextAsync(nextPageLink).GetAwaiter().GetResult());
 }
Пример #6
0
 /// <summary>
 /// Create or updates a directory tenant.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='resourceGroupName'>
 /// The resource group the resource is located under.
 /// </param>
 /// <param name='tenant'>
 /// Directory tenant name.
 /// </param>
 /// <param name='newTenant'>
 /// New directory tenant properties.
 /// </param>
 public static DirectoryTenant CreateOrUpdate(this IDirectoryTenantsOperations operations, string resourceGroupName, string tenant, DirectoryTenant newTenant)
 {
     return(operations.CreateOrUpdateAsync(resourceGroupName, tenant, newTenant).GetAwaiter().GetResult());
 }
Пример #7
0
 /// <summary>
 /// Delete a directory tenant under a resource group.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='resourceGroupName'>
 /// The resource group the resource is located under.
 /// </param>
 /// <param name='tenant'>
 /// Directory tenant name.
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task DeleteAsync(this IDirectoryTenantsOperations operations, string resourceGroupName, string tenant, CancellationToken cancellationToken = default(CancellationToken))
 {
     (await operations.DeleteWithHttpMessagesAsync(resourceGroupName, tenant, null, cancellationToken).ConfigureAwait(false)).Dispose();
 }
Пример #8
0
 /// <summary>
 /// Delete a directory tenant under a resource group.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='resourceGroupName'>
 /// The resource group the resource is located under.
 /// </param>
 /// <param name='tenant'>
 /// Directory tenant name.
 /// </param>
 public static void Delete(this IDirectoryTenantsOperations operations, string resourceGroupName, string tenant)
 {
     operations.DeleteAsync(resourceGroupName, tenant).GetAwaiter().GetResult();
 }