/// <summary>
        /// Creates a pool.
        /// </summary>
        /// <param name="poolName"></param>
        /// <param name="vmSize"></param>
        /// <param name="targetDedicated"></param>
        /// <param name="autoScaleFormula"></param>
        /// <param name="communicationEnabled"></param>
        /// <param name="osFamily"></param>
        /// <param name="osVersion"></param>
        /// <param name="maxTasksPerVM"></param>
        /// <param name="timeout"></param>
        /// <returns></returns>
        public async Task CreatePoolAsync(
            string poolName,
            string vmSize,
            int?targetDedicated,
            string autoScaleFormula,
            bool communicationEnabled,
            string osFamily,
            string osVersion,
            int maxTasksPerVM,
            TimeSpan?timeout)
        {
            using (IPoolManager poolManager = this.Client.OpenPoolManager())
            {
                ICloudPool unboundPool = poolManager.CreatePool(
                    poolName,
                    osFamily: osFamily,
                    vmSize: vmSize,
                    targetDedicated: targetDedicated);

                unboundPool.TargetOSVersion = osVersion;
                unboundPool.Communication   = communicationEnabled;
                unboundPool.ResizeTimeout   = timeout;
                unboundPool.MaxTasksPerVM   = maxTasksPerVM;

                if (!string.IsNullOrEmpty(autoScaleFormula))
                {
                    unboundPool.AutoScaleEnabled = true;
                    unboundPool.AutoScaleFormula = autoScaleFormula;
                }

                await unboundPool.CommitAsync();
            }
        }