示例#1
0
 static string ToHexString(byte[] bytes)
 {
     Preconditions.CheckNotNull(bytes);
     return(BitConverter.ToString(bytes).Replace("-", string.Empty));
 }
示例#2
0
 internal static X509Certificate2 ParseManifestTrustedBundleCerts(string manifestTrustedCACerts)
 {
     Preconditions.CheckNotNull(manifestTrustedCACerts, nameof(manifestTrustedCACerts));
     return(GetCertificatesFromPem(ParsePemCerts(manifestTrustedCACerts)).FirstOrDefault());
 }
示例#3
0
 internal static IEnumerable <X509Certificate2> ParseTrustBundleResponse(TrustBundleResponse response)
 {
     Preconditions.CheckNotNull(response, nameof(response));
     return(ParseTrustedBundleCerts(response.Certificate));
 }
示例#4
0
 internal static IEnumerable <X509Certificate2> ParseTrustedBundleCerts(string trustedCACerts)
 {
     Preconditions.CheckNotNull(trustedCACerts, nameof(trustedCACerts));
     return(GetCertificatesFromPem(ParsePemCerts(trustedCACerts)));
 }
示例#5
0
文件: Try.cs 项目: yphuangms/iotedge
 public Try(Exception exception)
 {
     this.value     = default(T);
     this.Exception = Preconditions.CheckNotNull(exception);
 }