Beispiel #1
0
 /// <summary>
 /// Lists all of the Front Doors within an Azure subscription.
 /// </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 <FrontDoorModel> > ListNextAsync(this IFrontDoorsOperations operations, string nextPageLink, CancellationToken cancellationToken = default(CancellationToken))
 {
     using (var _result = await operations.ListNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false))
     {
         return(_result.Body);
     }
 }
Beispiel #2
0
 /// <summary>
 /// Lists all of the Front Doors within a resource group under a subscription.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='resourceGroupName'>
 /// Name of the Resource group within the Azure subscription.
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task <IPage <FrontDoorModel> > ListByResourceGroupAsync(this IFrontDoorsOperations operations, string resourceGroupName, CancellationToken cancellationToken = default(CancellationToken))
 {
     using (var _result = await operations.ListByResourceGroupWithHttpMessagesAsync(resourceGroupName, null, cancellationToken).ConfigureAwait(false))
     {
         return(_result.Body);
     }
 }
Beispiel #3
0
 /// <summary>
 /// Creates a new Front Door with a Front Door name under the specified
 /// subscription and resource group.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='resourceGroupName'>
 /// Name of the Resource group within the Azure subscription.
 /// </param>
 /// <param name='frontDoorName'>
 /// Name of the Front Door which is globally unique.
 /// </param>
 /// <param name='frontDoorParameters'>
 /// Front Door properties needed to create a new Front Door.
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task <FrontDoorModel> BeginCreateOrUpdateAsync(this IFrontDoorsOperations operations, string resourceGroupName, string frontDoorName, FrontDoorModel frontDoorParameters, CancellationToken cancellationToken = default(CancellationToken))
 {
     using (var _result = await operations.BeginCreateOrUpdateWithHttpMessagesAsync(resourceGroupName, frontDoorName, frontDoorParameters, null, cancellationToken).ConfigureAwait(false))
     {
         return(_result.Body);
     }
 }
 public static async Task <IList <FrontDoorModel> > SafeListAllAsync(this IFrontDoorsOperations operations)
 {
     try
     {
         return(await operations.ListAllAsync());
     }
     catch
     {
         return(Array.Empty <FrontDoorModel>());
     }
 }
        public static async Task <IList <FrontDoorModel> > ListAllAsync(this IFrontDoorsOperations operations)
        {
            var frontDoors = new List <FrontDoorModel>();

            var list = await operations.ListAsync();

            frontDoors.AddRange(list);

            while (list.NextPageLink != null)
            {
                list = await operations.ListNextAsync(list.NextPageLink);

                frontDoors.AddRange(list);
            }

            return(frontDoors);
        }
Beispiel #6
0
 /// <summary>
 /// Gets a Front Door with the specified Front Door name under the specified
 /// subscription and resource group.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='resourceGroupName'>
 /// Name of the Resource group within the Azure subscription.
 /// </param>
 /// <param name='frontDoorName'>
 /// Name of the Front Door which is globally unique.
 /// </param>
 public static FrontDoorModel Get(this IFrontDoorsOperations operations, string resourceGroupName, string frontDoorName)
 {
     return(operations.GetAsync(resourceGroupName, frontDoorName).GetAwaiter().GetResult());
 }
Beispiel #7
0
 /// <summary>
 /// Lists all of the Front Doors within a resource group under a subscription.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='resourceGroupName'>
 /// Name of the Resource group within the Azure subscription.
 /// </param>
 public static IPage <FrontDoorModel> ListByResourceGroup(this IFrontDoorsOperations operations, string resourceGroupName)
 {
     return(operations.ListByResourceGroupAsync(resourceGroupName).GetAwaiter().GetResult());
 }
Beispiel #8
0
 /// <summary>
 /// Lists all of the Front Doors within a resource group under a subscription.
 /// </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 <FrontDoorModel> ListByResourceGroupNext(this IFrontDoorsOperations operations, string nextPageLink)
 {
     return(operations.ListByResourceGroupNextAsync(nextPageLink).GetAwaiter().GetResult());
 }
Beispiel #9
0
 /// <summary>
 /// Deletes an existing Front Door with the specified parameters.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='resourceGroupName'>
 /// Name of the Resource group within the Azure subscription.
 /// </param>
 /// <param name='frontDoorName'>
 /// Name of the Front Door which is globally unique.
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task BeginDeleteAsync(this IFrontDoorsOperations operations, string resourceGroupName, string frontDoorName, CancellationToken cancellationToken = default(CancellationToken))
 {
     (await operations.BeginDeleteWithHttpMessagesAsync(resourceGroupName, frontDoorName, null, cancellationToken).ConfigureAwait(false)).Dispose();
 }
Beispiel #10
0
 /// <summary>
 /// Deletes an existing Front Door with the specified parameters.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='resourceGroupName'>
 /// Name of the Resource group within the Azure subscription.
 /// </param>
 /// <param name='frontDoorName'>
 /// Name of the Front Door which is globally unique.
 /// </param>
 public static void BeginDelete(this IFrontDoorsOperations operations, string resourceGroupName, string frontDoorName)
 {
     operations.BeginDeleteAsync(resourceGroupName, frontDoorName).GetAwaiter().GetResult();
 }
Beispiel #11
0
 /// <summary>
 /// Lists all of the Front Doors within an Azure subscription.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 public static IPage <FrontDoorModel> List(this IFrontDoorsOperations operations)
 {
     return(operations.ListAsync().GetAwaiter().GetResult());
 }
Beispiel #12
0
 /// <summary>
 /// Creates a new Front Door with a Front Door name under the specified
 /// subscription and resource group.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='resourceGroupName'>
 /// Name of the Resource group within the Azure subscription.
 /// </param>
 /// <param name='frontDoorName'>
 /// Name of the Front Door which is globally unique.
 /// </param>
 /// <param name='frontDoorParameters'>
 /// Front Door properties needed to create a new Front Door.
 /// </param>
 public static FrontDoorModel BeginCreateOrUpdate(this IFrontDoorsOperations operations, string resourceGroupName, string frontDoorName, FrontDoorModel frontDoorParameters)
 {
     return(operations.BeginCreateOrUpdateAsync(resourceGroupName, frontDoorName, frontDoorParameters).GetAwaiter().GetResult());
 }
Beispiel #13
0
 /// <summary>
 /// Validates the custom domain mapping to ensure it maps to the correct Front
 /// Door endpoint in DNS.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='resourceGroupName'>
 /// Name of the Resource group within the Azure subscription.
 /// </param>
 /// <param name='frontDoorName'>
 /// Name of the Front Door which is globally unique.
 /// </param>
 /// <param name='customDomainProperties'>
 /// Custom domain to be validated.
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task <ValidateCustomDomainOutput> ValidateCustomDomainAsync(this IFrontDoorsOperations operations, string resourceGroupName, string frontDoorName, ValidateCustomDomainInput customDomainProperties, CancellationToken cancellationToken = default(CancellationToken))
 {
     using (var _result = await operations.ValidateCustomDomainWithHttpMessagesAsync(resourceGroupName, frontDoorName, customDomainProperties, null, cancellationToken).ConfigureAwait(false))
     {
         return(_result.Body);
     }
 }
Beispiel #14
0
 /// <summary>
 /// Validates the custom domain mapping to ensure it maps to the correct Front
 /// Door endpoint in DNS.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='resourceGroupName'>
 /// Name of the Resource group within the Azure subscription.
 /// </param>
 /// <param name='frontDoorName'>
 /// Name of the Front Door which is globally unique.
 /// </param>
 /// <param name='customDomainProperties'>
 /// Custom domain to be validated.
 /// </param>
 public static ValidateCustomDomainOutput ValidateCustomDomain(this IFrontDoorsOperations operations, string resourceGroupName, string frontDoorName, ValidateCustomDomainInput customDomainProperties)
 {
     return(operations.ValidateCustomDomainAsync(resourceGroupName, frontDoorName, customDomainProperties).GetAwaiter().GetResult());
 }