public override void ExecuteCmdlet()
        {
            PoolResizeParameters parameters = new PoolResizeParameters(this.BatchContext, this.Id, null, this.AdditionalBehaviors)
            {
                TargetDedicated = this.TargetDedicated,
                ResizeTimeout = this.ResizeTimeout,
                ComputeNodeDeallocationOption = this.ComputeNodeDeallocationOption
            };

            BatchClient.ResizePool(parameters);
        }
        protected override void ProcessRecord()
        {
            PoolResizeParameters parameters = new PoolResizeParameters(this.BatchContext, this.Id, null, this.AdditionalBehaviors)
            {
                TargetDedicated = this.TargetDedicated,
                ResizeTimeout = this.ResizeTimeout,
                ComputeNodeDeallocationOption = this.ComputeNodeDeallocationOption
            };

            BatchClient.ResizePool(parameters);
        }
        /// <summary>
        /// Resizes the specified pool.
        /// </summary>
        /// <param name="parameters">The parameters to use when resizing the pool.</param>
        public void ResizePool(PoolResizeParameters parameters)
        {
            if (parameters == null)
            {
                throw new ArgumentNullException("parameters");
            }

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

            WriteVerbose(string.Format(Resources.ResizingPool, poolId, parameters.TargetDedicated));
            PoolOperations poolOperations = parameters.Context.BatchOMClient.PoolOperations;

            poolOperations.ResizePool(poolId, parameters.TargetDedicated, parameters.ResizeTimeout, parameters.ComputeNodeDeallocationOption, parameters.AdditionalBehaviors);
        }
        /// <summary>
        /// Resizes the specified pool
        /// </summary>
        /// <param name="parameters">The parameters to use when resizing the pool</param>
        public void ResizePool(PoolResizeParameters parameters)
        {
            if (parameters == null)
            {
                throw new ArgumentNullException("parameters");
            }

            string poolName = parameters.Pool == null ? parameters.PoolName : parameters.Pool.Name;

            WriteVerbose(string.Format(Resources.SBPR_ResizingPool, poolName, parameters.TargetDedicated));
            using (IPoolManager poolManager = parameters.Context.BatchOMClient.OpenPoolManager())
            {
                poolManager.ResizePool(poolName, parameters.TargetDedicated, parameters.ResizeTimeout, parameters.DeallocationOption, parameters.AdditionalBehaviors);
            }
        }
        /// <summary>
        /// Resizes the specified pool.
        /// </summary>
        /// <param name="parameters">The parameters to use when resizing the pool.</param>
        public void ResizePool(PoolResizeParameters parameters)
        {
            if (parameters == null)
            {
                throw new ArgumentNullException("parameters");
            }

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

            WriteVerbose(string.Format(Resources.ResizingPool, poolId, parameters.TargetDedicated));
            PoolOperations poolOperations = parameters.Context.BatchOMClient.PoolOperations;
            poolOperations.ResizePool(poolId, parameters.TargetDedicated, parameters.ResizeTimeout, parameters.ComputeNodeDeallocationOption, parameters.AdditionalBehaviors);
        }
        public static void ResizePool(BatchController controller, BatchAccountContext context, string poolId, int targetDedicated)
        {
            BatchClient client = new BatchClient(controller.BatchManagementClient, controller.ResourceManagementClient);

            PoolResizeParameters parameters = new PoolResizeParameters(context, poolId, null)
            {
                TargetDedicated = targetDedicated
            };

            client.ResizePool(parameters);
        }
        /// <summary>
        /// Resizes the specified pool
        /// </summary>
        /// <param name="parameters">The parameters to use when resizing the pool</param>
        public void ResizePool(PoolResizeParameters parameters)
        {
            if (parameters == null)
            {
                throw new ArgumentNullException("parameters");
            }

            string poolName = parameters.Pool == null ? parameters.PoolName : parameters.Pool.Name;

            WriteVerbose(string.Format(Resources.SBPR_ResizingPool, poolName, parameters.TargetDedicated));
            using (IPoolManager poolManager = parameters.Context.BatchOMClient.OpenPoolManager())
            {
                poolManager.ResizePool(poolName, parameters.TargetDedicated, parameters.ResizeTimeout, parameters.DeallocationOption, parameters.AdditionalBehaviors);
            }
        }