Example #1
0
        internal CertificateOperation(Response <CertificateOperationProperties> properties, CertificateClient client)
        {
            Properties = properties;

            Id      = properties.Value.Id.ToString();
            _client = client;
        }
Example #2
0
        internal CertificateOperation(Response <CertificateOperationProperties> properties, CertificateClient client)
        {
            Properties = properties;

            Id      = Properties.Id.AbsoluteUri;
            _client = client;
        }
        /// <summary>
        /// Initializes a new instance of the <see cref="CertificateOperation"/> class.
        /// You must call <see cref="UpdateStatus(CancellationToken)"/> or <see cref="UpdateStatusAsync(CancellationToken)"/> before you can get the <see cref="Value"/>.
        /// </summary>
        /// <param name="client">A <see cref="CertificateClient"/> for the Key Vault where the operation was started.</param>
        /// <param name="name">The name of the certificate being created.</param>
        public CertificateOperation(CertificateClient client, string name)
        {
            Argument.AssertNotNull(client, nameof(client));
            Argument.AssertNotNullOrEmpty(name, nameof(name));

            Properties = new CertificateOperationProperties(client.VaultUri, name);

            Id      = Properties.Id.ToString();
            _client = client;
        }