Esempio n. 1
0
 /// <summary>
 /// Get status of an operation on a managed hosting environment.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='resourceGroupName'>
 /// Name of resource group
 /// </param>
 /// <param name='name'>
 /// Name of managed hosting environment
 /// </param>
 /// <param name='operationId'>
 /// operation identifier GUID
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task <object> GetManagedHostingEnvironmentOperationAsync(this IManagedHostingEnvironmentsOperations operations, string resourceGroupName, string name, string operationId, CancellationToken cancellationToken = default(CancellationToken))
 {
     using (var _result = await operations.GetManagedHostingEnvironmentOperationWithHttpMessagesAsync(resourceGroupName, name, operationId, null, cancellationToken).ConfigureAwait(false))
     {
         return(_result.Body);
     }
 }
Esempio n. 2
0
 /// <summary>
 /// Delete a managed hosting environment.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='resourceGroupName'>
 /// Name of resource group
 /// </param>
 /// <param name='name'>
 /// Name of managed hosting environment
 /// </param>
 /// <param name='forceDelete'>
 /// Delete even if the managed hosting environment contains resources
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task <object> BeginDeleteManagedHostingEnvironmentAsync(this IManagedHostingEnvironmentsOperations operations, string resourceGroupName, string name, bool?forceDelete = default(bool?), CancellationToken cancellationToken = default(CancellationToken))
 {
     using (var _result = await operations.BeginDeleteManagedHostingEnvironmentWithHttpMessagesAsync(resourceGroupName, name, forceDelete, null, cancellationToken).ConfigureAwait(false))
     {
         return(_result.Body);
     }
 }
Esempio n. 3
0
 /// <summary>
 /// Create or update a managed hosting environment.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='resourceGroupName'>
 /// Name of resource group
 /// </param>
 /// <param name='name'>
 /// Name of managed hosting environment
 /// </param>
 /// <param name='managedHostingEnvironmentEnvelope'>
 /// Properties of managed hosting environment
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task <HostingEnvironment> CreateOrUpdateManagedHostingEnvironmentAsync(this IManagedHostingEnvironmentsOperations operations, string resourceGroupName, string name, HostingEnvironment managedHostingEnvironmentEnvelope, CancellationToken cancellationToken = default(CancellationToken))
 {
     using (var _result = await operations.CreateOrUpdateManagedHostingEnvironmentWithHttpMessagesAsync(resourceGroupName, name, managedHostingEnvironmentEnvelope, null, cancellationToken).ConfigureAwait(false))
     {
         return(_result.Body);
     }
 }
Esempio n. 4
0
 /// <summary>
 /// Create or update a managed hosting environment.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='resourceGroupName'>
 /// Name of resource group
 /// </param>
 /// <param name='name'>
 /// Name of managed hosting environment
 /// </param>
 /// <param name='managedHostingEnvironmentEnvelope'>
 /// Properties of managed hosting environment
 /// </param>
 public static HostingEnvironment CreateOrUpdateManagedHostingEnvironment(this IManagedHostingEnvironmentsOperations operations, string resourceGroupName, string name, HostingEnvironment managedHostingEnvironmentEnvelope)
 {
     return(Task.Factory.StartNew(s => ((IManagedHostingEnvironmentsOperations)s).CreateOrUpdateManagedHostingEnvironmentAsync(resourceGroupName, name, managedHostingEnvironmentEnvelope), operations, CancellationToken.None, TaskCreationOptions.None, TaskScheduler.Default).Unwrap().GetAwaiter().GetResult());
 }
Esempio n. 5
0
 /// <summary>
 /// Get all serverfarms (App Service Plans) on the managed hosting environment.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='resourceGroupName'>
 /// Name of resource group
 /// </param>
 /// <param name='name'>
 /// Name of managed hosting environment
 /// </param>
 public static ServerFarmCollection GetManagedHostingEnvironmentServerFarms(this IManagedHostingEnvironmentsOperations operations, string resourceGroupName, string name)
 {
     return(Task.Factory.StartNew(s => ((IManagedHostingEnvironmentsOperations)s).GetManagedHostingEnvironmentServerFarmsAsync(resourceGroupName, name), operations, CancellationToken.None, TaskCreationOptions.None, TaskScheduler.Default).Unwrap().GetAwaiter().GetResult());
 }
Esempio n. 6
0
 /// <summary>
 /// Get all serverfarms (App Service Plans) on the managed hosting environment.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='resourceGroupName'>
 /// Name of resource group
 /// </param>
 /// <param name='name'>
 /// Name of managed hosting environment
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task <ServerFarmCollection> GetManagedHostingEnvironmentWebHostingPlansAsync(this IManagedHostingEnvironmentsOperations operations, string resourceGroupName, string name, CancellationToken cancellationToken = default(CancellationToken))
 {
     using (var _result = await operations.GetManagedHostingEnvironmentWebHostingPlansWithHttpMessagesAsync(resourceGroupName, name, null, cancellationToken).ConfigureAwait(false))
     {
         return(_result.Body);
     }
 }
Esempio n. 7
0
 /// <summary>
 /// Get all sites on the managed hosting environment.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='resourceGroupName'>
 /// Name of resource group
 /// </param>
 /// <param name='name'>
 /// Name of managed hosting environment
 /// </param>
 /// <param name='propertiesToInclude'>
 /// Comma separated list of site properties to include
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task <SiteCollection> GetManagedHostingEnvironmentSitesAsync(this IManagedHostingEnvironmentsOperations operations, string resourceGroupName, string name, string propertiesToInclude = default(string), CancellationToken cancellationToken = default(CancellationToken))
 {
     using (var _result = await operations.GetManagedHostingEnvironmentSitesWithHttpMessagesAsync(resourceGroupName, name, propertiesToInclude, null, cancellationToken).ConfigureAwait(false))
     {
         return(_result.Body);
     }
 }
Esempio n. 8
0
 /// <summary>
 /// Delete a managed hosting environment.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='resourceGroupName'>
 /// Name of resource group
 /// </param>
 /// <param name='name'>
 /// Name of managed hosting environment
 /// </param>
 /// <param name='forceDelete'>
 /// Delete even if the managed hosting environment contains resources
 /// </param>
 public static object BeginDeleteManagedHostingEnvironment(this IManagedHostingEnvironmentsOperations operations, string resourceGroupName, string name, bool?forceDelete = default(bool?))
 {
     return(Task.Factory.StartNew(s => ((IManagedHostingEnvironmentsOperations)s).BeginDeleteManagedHostingEnvironmentAsync(resourceGroupName, name, forceDelete), operations, CancellationToken.None, TaskCreationOptions.None, TaskScheduler.Default).Unwrap().GetAwaiter().GetResult());
 }