public static void DisableAutoScale(BatchController controller, BatchAccountContext context, string poolId)
        {
            RequestInterceptor interceptor = CreateHttpRecordingInterceptor();
            BatchClientBehavior[] behaviors = new BatchClientBehavior[] { interceptor };
            BatchClient client = new BatchClient(controller.BatchManagementClient, controller.ResourceManagementClient);

            PoolOperationParameters parameters = new PoolOperationParameters(context, poolId, null, behaviors);
            client.DisableAutoScale(parameters);
        }
        /// <summary>
        /// Disables automatic scaling on the specified pool.
        /// </summary>
        /// <param name="parameters">The parameters specifying the target pool.</param>
        public void DisableAutoScale(PoolOperationParameters parameters)
        {
            if (parameters == null)
            {
                throw new ArgumentNullException("parameters");
            }

            string poolId = parameters.Pool == null ? parameters.PoolId : parameters.Pool.Id;

            WriteVerbose(string.Format(Resources.DisableAutoScale, poolId));
            PoolOperations poolOperations = parameters.Context.BatchOMClient.PoolOperations;
            poolOperations.DisableAutoScale(poolId, parameters.AdditionalBehaviors);
        }
 public override void ExecuteCmdlet()
 {
     PoolOperationParameters parameters = new PoolOperationParameters(this.BatchContext, this.Id, null, this.AdditionalBehaviors);
     BatchClient.DisableAutoScale(parameters);
 }
        public static void DisableAutoScale(BatchController controller, BatchAccountContext context, string poolId)
        {
            BatchClient client = new BatchClient(controller.BatchManagementClient, controller.ResourceManagementClient);

            PoolOperationParameters parameters = new PoolOperationParameters(context, poolId, null);
            client.DisableAutoScale(parameters);
        }
 protected override void ProcessRecord()
 {
     PoolOperationParameters parameters = new PoolOperationParameters(this.BatchContext, this.Id, null, this.AdditionalBehaviors);
     BatchClient.DisableAutoScale(parameters);
 }