예제 #1
0
        protected override void ExecuteCmdletImpl()
        {
            CertificateOperationParameters parameters = new CertificateOperationParameters(this.BatchContext,
                                                                                           this.ThumbprintAlgorithm, this.Thumbprint, this.AdditionalBehaviors);

            BatchClient.CancelDeleteCertificate(parameters);
        }
예제 #2
0
        /// <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);
        }
예제 #3
0
        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 a certificate.
        /// </summary>
        public static void DeleteTestCertificate(BatchController controller, BatchAccountContext context, string thumbprintAlgorithm, string thumbprint)
        {
            RequestInterceptor interceptor = CreateHttpRecordingInterceptor();

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

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

            client.DeleteCertificate(parameters);
        }
        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));
        }