Exemple #1
0
 /// <summary>
 /// Initializes a new instance of the <see cref="Certificates.KeyVaultCertificate"/> for mocking purposes.
 /// </summary>
 /// <param name="properties">Sets the <see cref="Certificates.KeyVaultCertificate.Properties"/> property.</param>
 /// <param name="keyId">Sets the <see cref="Certificates.KeyVaultCertificate.KeyId"/> property.</param>
 /// <param name="secretId">Sets the <see cref="Certificates.KeyVaultCertificate.SecretId"/> property.</param>
 /// <param name="contentType">Sets the <see cref="Certificates.KeyVaultCertificate.ContentType"/> property.</param>
 /// <param name="cer">Sets the <see cref="Certificates.KeyVaultCertificate.Cer"/> property.</param>
 /// <returns>A new instance of the <see cref="Certificates.KeyVaultCertificate"/> for mocking purposes.</returns>
 public static KeyVaultCertificate KeyVaultCertificate(
     CertificateProperties properties,
     Uri keyId    = default,
     Uri secretId = default,
     CertificateContentType contentType = default,
     byte[] cer = default) => new KeyVaultCertificate(properties)
 {
     KeyId       = keyId,
     SecretId    = secretId,
     ContentType = contentType,
     Cer         = cer,
 };
Exemple #2
0
 /// <summary>
 /// Initializes a new instance of the <see cref="Certificates.KeyVaultCertificateWithPolicy"/> for mocking purposes.
 /// </summary>
 /// <param name="properties">Sets the <see cref="Certificates.KeyVaultCertificate.Properties"/> property.</param>
 /// <param name="keyId">Sets the <see cref="Certificates.KeyVaultCertificate.KeyId"/> property.</param>
 /// <param name="secretId">Sets the <see cref="Certificates.KeyVaultCertificate.SecretId"/> property.</param>
 /// <param name="contentType">Sets the <see cref="Certificates.KeyVaultCertificate.ContentType"/> property.</param>
 /// <param name="cer">Sets the <see cref="Certificates.KeyVaultCertificate.Cer"/> property.</param>
 /// <param name="policy">Sets the <see cref="Certificates.KeyVaultCertificateWithPolicy.Policy"/> property.</param>
 /// <returns>A new instance of the <see cref="Certificates.KeyVaultCertificateWithPolicy"/> for mocking purposes.</returns>
 public static KeyVaultCertificateWithPolicy KeyVaultCertificateWithPolicy(
     CertificateProperties properties,
     Uri keyId    = default,
     Uri secretId = default,
     CertificateContentType contentType = default,
     byte[] cer = default,
     CertificatePolicy policy = default) => new KeyVaultCertificateWithPolicy(properties)
 {
     KeyId       = keyId,
     SecretId    = secretId,
     ContentType = contentType,
     Cer         = cer,
     Policy      = policy,
 };
Exemple #3
0
 /// <summary>
 /// Initializes a new instance of the <see cref="Certificates.DeletedCertificate"/> for mocking purposes.
 /// </summary>
 /// <param name="properties">Sets the <see cref="Certificates.KeyVaultCertificate.Properties"/> property.</param>
 /// <param name="keyId">Sets the <see cref="Certificates.KeyVaultCertificate.KeyId"/> property.</param>
 /// <param name="secretId">Sets the <see cref="Certificates.KeyVaultCertificate.SecretId"/> property.</param>
 /// <param name="contentType">Sets the <see cref="Certificates.KeyVaultCertificate.ContentType"/> property.</param>
 /// <param name="cer">Sets the <see cref="Certificates.KeyVaultCertificate.Cer"/> property.</param>
 /// <param name="policy">Sets the <see cref="Certificates.KeyVaultCertificateWithPolicy.Policy"/> property.</param>
 /// <param name="recoveryId">Sets the <see cref="Certificates.DeletedCertificate.RecoveryId"/> property.</param>
 /// <param name="deletedOn">Sets the <see cref="Certificates.DeletedCertificate.DeletedOn"/> property.</param>
 /// <param name="scheduledPurgeDate">Sets the <see cref="Certificates.DeletedCertificate.ScheduledPurgeDate"/> property.</param>
 /// <returns>A new instance of the <see cref="Certificates.DeletedCertificate"/> for mocking purposes.</returns>
 public static DeletedCertificate DeletedCertificate(
     CertificateProperties properties,
     Uri keyId    = default,
     Uri secretId = default,
     CertificateContentType contentType = default,
     byte[] cer = default,
     CertificatePolicy policy          = default,
     Uri recoveryId                    = default,
     DateTimeOffset?deletedOn          = default,
     DateTimeOffset?scheduledPurgeDate = default) => new DeletedCertificate(properties)
 {
     KeyId              = keyId,
     SecretId           = secretId,
     ContentType        = contentType,
     Cer                = cer,
     Policy             = policy,
     RecoveryId         = recoveryId,
     DeletedOn          = deletedOn,
     ScheduledPurgeDate = scheduledPurgeDate,
 };
 public bool Equals(CertificateContentType other)
 {
     return(string.CompareOrdinal(_value, other._value) == 0);
 }