Inheritance: Microsoft.Azure.Commands.Batch.Models.PoolOperationParameters
        /// <summary>
        /// Gets the result of evaluating an automatic scaling formula on the specified pool.
        /// </summary>
        /// <param name="parameters">The parameters specifying the pool and autoscale formula.</param>
        public PSAutoScaleEvaluation EvaluateAutoScale(EvaluateAutoScaleParameters parameters)
        {
            if (parameters == null)
            {
                throw new ArgumentNullException("parameters");
            }

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

            WriteVerbose(string.Format(Resources.EvaluateAutoScale, poolId, parameters.AutoScaleFormula));
            PoolOperations      poolOperations = parameters.Context.BatchOMClient.PoolOperations;
            AutoScaleEvaluation evaluation     = poolOperations.EvaluateAutoScale(poolId, parameters.AutoScaleFormula, parameters.AdditionalBehaviors);

            return(new PSAutoScaleEvaluation(evaluation));
        }
        /// <summary>
        /// Gets the result of evaluating an automatic scaling formula on the specified pool.
        /// </summary>
        /// <param name="parameters">The parameters specifying the pool and autoscale formula.</param>
        public PSAutoScaleRun EvaluateAutoScale(EvaluateAutoScaleParameters parameters)
        {
            if (parameters == null)
            {
                throw new ArgumentNullException("parameters");
            }

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

            WriteVerbose(string.Format(Resources.EvaluateAutoScale, poolId, parameters.AutoScaleFormula));
            PoolOperations poolOperations = parameters.Context.BatchOMClient.PoolOperations;
            AutoScaleRun evaluation = poolOperations.EvaluateAutoScale(poolId, parameters.AutoScaleFormula, parameters.AdditionalBehaviors);
            return new PSAutoScaleRun(evaluation);
        }
 public override void ExecuteCmdlet()
 {
     EvaluateAutoScaleParameters parameters = new EvaluateAutoScaleParameters(this.BatchContext, this.Id, null,
         this.AutoScaleFormula, this.AdditionalBehaviors);
     WriteObject(BatchClient.EvaluateAutoScale(parameters));
 }