Inheritance: BatchClientParametersBase
        public override void ExecuteCmdlet()
        {
            CertificateOperationParameters parameters = new CertificateOperationParameters(this.BatchContext,
                this.ThumbprintAlgorithm, this.Thumbprint, this.AdditionalBehaviors);

            BatchClient.CancelDeleteCertificate(parameters);
        }
        protected override void ProcessRecord()
        {
            CertificateOperationParameters parameters = new CertificateOperationParameters(this.BatchContext,
                this.ThumbprintAlgorithm, this.Thumbprint, this.AdditionalBehaviors);

            BatchClient.CancelDeleteCertificate(parameters);
        }
        public override void ExecuteCmdlet()
        {
            CertificateOperationParameters parameters = new CertificateOperationParameters(this.BatchContext,
                this.ThumbprintAlgorithm, this.Thumbprint, this.AdditionalBehaviors);

            ConfirmAction(
                Resources.RemoveCertificate,
                this.Thumbprint,
                () => BatchClient.DeleteCertificate(parameters));
        }
        /// <summary>
        /// Deletes the specified certificate.
        /// </summary>
        /// <param name="parameters">The parameters indicating which certificate to delete.</param>
        public void DeleteCertificate(CertificateOperationParameters parameters)
        {
            if (parameters == null)
            {
                throw new ArgumentNullException("parameters");
            }

            CertificateOperations certOperations = parameters.Context.BatchOMClient.CertificateOperations;

            certOperations.DeleteCertificate(parameters.ThumbprintAlgorithm, parameters.Thumbprint, parameters.AdditionalBehaviors);
        }
        /// <summary>
        /// Cancels a failed deletion of the specified certificate.
        /// </summary>
        /// <param name="parameters">The parameters indicating which certificate to failed to delete.</param>
        public void CancelDeleteCertificate(CertificateOperationParameters parameters)
        {
            if (parameters == null)
            {
                throw new ArgumentNullException("parameters");
            }

            WriteVerbose(string.Format(Resources.CancelCertificateDelete, parameters.Thumbprint));
            CertificateOperations certOperations = parameters.Context.BatchOMClient.CertificateOperations;

            certOperations.CancelDeleteCertificate(parameters.ThumbprintAlgorithm, parameters.Thumbprint, parameters.AdditionalBehaviors);
        }
        protected override void ProcessRecord()
        {
            CertificateOperationParameters parameters = new CertificateOperationParameters(this.BatchContext,
                this.ThumbprintAlgorithm, this.Thumbprint, this.AdditionalBehaviors);

            ConfirmAction(
                Force.IsPresent,
                string.Format(Resources.RemoveCertificateConfirm, this.Thumbprint),
                Resources.RemoveCertificate,
                this.Thumbprint,
                () => BatchClient.DeleteCertificate(parameters));
        }
        /// <summary>
        /// Deletes a certificate.
        /// </summary>
        public static void DeleteTestCertificate(BatchController controller, BatchAccountContext context, string thumbprintAlgorithm, string thumbprint)
        {
            BatchClient client = new BatchClient(controller.BatchManagementClient, controller.ResourceManagementClient);

            CertificateOperationParameters parameters = new CertificateOperationParameters(context, thumbprintAlgorithm,
                thumbprint);

            client.DeleteCertificate(parameters);
        }
        /// <summary>
        /// Cancels a failed deletion of the specified certificate.
        /// </summary>
        /// <param name="parameters">The parameters indicating which certificate to failed to delete.</param>
        public void CancelDeleteCertificate(CertificateOperationParameters parameters)
        {
            if (parameters == null)
            {
                throw new ArgumentNullException("parameters");
            }

            WriteVerbose(string.Format(Resources.CancelCertificateDelete, parameters.Thumbprint));
            CertificateOperations certOperations = parameters.Context.BatchOMClient.CertificateOperations;
            certOperations.CancelDeleteCertificate(parameters.ThumbprintAlgorithm, parameters.Thumbprint, parameters.AdditionalBehaviors);
        }
        /// <summary>
        /// Deletes the specified certificate.
        /// </summary>
        /// <param name="parameters">The parameters indicating which certificate to delete.</param>
        public void DeleteCertificate(CertificateOperationParameters parameters)
        {
            if (parameters == null)
            {
                throw new ArgumentNullException("parameters");
            }

            CertificateOperations certOperations = parameters.Context.BatchOMClient.CertificateOperations;
            certOperations.DeleteCertificate(parameters.ThumbprintAlgorithm, parameters.Thumbprint, parameters.AdditionalBehaviors);
        }