Microsoft.Azure.Commands.Batch.Models.BatchClient.DeletePool C# (CSharp) 메소드

DeletePool() 공개 메소드

Deletes the specified pool.
public DeletePool ( BatchAccountContext context, string poolId, IEnumerable additionBehaviors = null ) : void
context BatchAccountContext The account to use.
poolId string The id of the pool to delete.
additionBehaviors IEnumerable Additional client behaviors to perform.
리턴 void
        public void DeletePool(BatchAccountContext context, string poolId, IEnumerable<BatchClientBehavior> additionBehaviors = null)
        {
            if (string.IsNullOrWhiteSpace(poolId))
            {
                throw new ArgumentNullException("poolId");
            }

            PoolOperations poolOperations = context.BatchOMClient.PoolOperations;
            poolOperations.DeletePool(poolId, additionBehaviors);
        }

Usage Example

        /// <summary>
        /// Deletes a pool used in a Scenario test.
        /// </summary>
        public static void DeletePool(BatchController controller, BatchAccountContext context, string poolName)
        {
            YieldInjectionInterceptor interceptor = CreateHttpRecordingInterceptor();

            BatchClientBehavior[] behaviors = new BatchClientBehavior[] { interceptor };
            BatchClient           client    = new BatchClient(controller.BatchManagementClient, controller.ResourceManagementClient);

            client.DeletePool(context, poolName, behaviors);
        }
All Usage Examples Of Microsoft.Azure.Commands.Batch.Models.BatchClient::DeletePool
BatchClient