/// <summary> /// Initializes a new instance of the <see cref="Certificates.CertificateIssuer"/> for mocking purposes. /// </summary> /// <param name="properties">Sets the <see cref="Certificates.CertificateIssuer.Id"/>, <see cref="Certificates.CertificateIssuer.Name"/>, and <see cref="Certificates.CertificateIssuer.Provider"/> properties.</param> /// <param name="createdOn">Sets the <see cref="Certificates.CertificateIssuer.CreatedOn"/> property.</param> /// <param name="updatedOn">Sets the <see cref="Certificates.CertificateIssuer.UpdatedOn"/> property.</param> /// <returns>A new instance of the <see cref="Certificates.CertificateIssuer"/> for mocking purposes.</returns> public static CertificateIssuer CertificateIssuer( IssuerProperties properties, DateTimeOffset?createdOn = default, DateTimeOffset?updatedOn = default) => new CertificateIssuer(properties) { CreatedOn = createdOn, UpdatedOn = updatedOn, };
/// <summary> /// Initializes a new instance of the <see cref="CertificateIssuer"/> class. /// You can use this constructor to initialize a <see cref="CertificateIssuer"/> for /// <see cref="CertificateClient.CreateIssuer(CertificateIssuer, CancellationToken)"/> or /// <see cref="CertificateClient.CreateIssuerAsync(CertificateIssuer, CancellationToken)"/>. /// </summary> /// <param name="name">The name of the issuer, including values from <see cref="WellKnownIssuerNames"/>.</param> /// <param name="provider">The provider name of the certificate issuer.</param> /// <exception cref="ArgumentException"><paramref name="name"/> or <paramref name="provider"/> is empty.</exception> /// <exception cref="ArgumentNullException"><paramref name="name"/> or <paramref name="provider"/> is null.</exception> public CertificateIssuer(string name, string provider) { Argument.AssertNotNullOrEmpty(name, nameof(name)); Argument.AssertNotNullOrEmpty(provider, nameof(provider)); _properties = new IssuerProperties(name) { Provider = provider, }; }
/// <summary> /// Creates an issuer with the specified name /// </summary> /// <param name="name">The name of the issuer</param> public Issuer(string name) { Properties = new IssuerProperties(name); }
internal Issuer() { Properties = new IssuerProperties(); }
/// <summary> /// Initializes a new instance of the <see cref="CertificateIssuer"/> class with the given <paramref name="name"/>. /// </summary> /// <param name="name">The name of the issuer, including values from <see cref="WellKnownIssuerNames"/>.</param> public CertificateIssuer(string name) { Properties = new IssuerProperties(name); }
internal CertificateIssuer(IssuerProperties properties = null) { Properties = properties ?? new IssuerProperties(); }
/// <summary> /// Initializes a new instance of the <see cref="CertificateIssuer"/> class. /// You can use this constructor to initialize a <see cref="CertificateIssuer"/> for /// <see cref="CertificateClient.UpdateIssuer(CertificateIssuer, CancellationToken)"/> or /// <see cref="CertificateClient.UpdateIssuerAsync(CertificateIssuer, CancellationToken)"/>. /// </summary> /// <param name="name">The name of the issuer, including values from <see cref="WellKnownIssuerNames"/>.</param> /// <exception cref="ArgumentException"><paramref name="name"/> is empty.</exception> /// <exception cref="ArgumentNullException"><paramref name="name"/> is null.</exception> public CertificateIssuer(string name) { Argument.AssertNotNullOrEmpty(name, nameof(name)); _properties = new IssuerProperties(name); }