-
Notifications
You must be signed in to change notification settings - Fork 358
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1849 from fowl2/OutputTypeAttribute-AzureCertificate
AzureCertificate: unify output production, add OutputType Attribute
- Loading branch information
Showing
3 changed files
with
87 additions
and
52 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
using PnP.PowerShell.Commands.Utilities; | ||
|
||
using System; | ||
using System.Collections.Generic; | ||
using System.Security.Cryptography.X509Certificates; | ||
using System.Text; | ||
|
||
namespace PnP.PowerShell.Commands.Model | ||
{ | ||
public sealed class AzureCertificate | ||
{ | ||
internal AzureCertificate(string subject, DateTime notBefore, DateTime notAfter, string thumbprint, string/*?*/ pfxBase64, string keyCredentials, string certificate, string privateKey) | ||
{ | ||
Subject = subject ?? throw new ArgumentNullException(nameof(subject)); | ||
NotBefore = notBefore; | ||
NotAfter = notAfter; | ||
Thumbprint = thumbprint ?? throw new ArgumentNullException(nameof(thumbprint)); | ||
PfxBase64 = pfxBase64; | ||
KeyCredentials = keyCredentials ?? throw new ArgumentNullException(nameof(keyCredentials)); | ||
Certificate = certificate ?? throw new ArgumentNullException(nameof(certificate)); | ||
PrivateKey = privateKey ?? throw new ArgumentNullException(nameof(privateKey)); | ||
} | ||
|
||
public string Subject { get; } | ||
public DateTime NotBefore { get; } | ||
public DateTime NotAfter { get; } | ||
public string Thumbprint { get; } | ||
public string/*?*/ PfxBase64 { get; } | ||
public string KeyCredentials { get; } | ||
public string Certificate { get; } | ||
public string PrivateKey { get; } | ||
|
||
} | ||
} |