We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent fd11a6a commit 2e18525Copy full SHA for 2e18525
1 file changed
src/GameFrameX.SuperSocket.Primitives/CertificateOptions.cs
@@ -59,12 +59,12 @@ public X509Certificate GetCertificate()
59
}
60
else if (!string.IsNullOrEmpty(Thumbprint)) // Load certificate from certificate store
61
{
62
- using var store = new X509Store((StoreName)Enum.Parse(typeof(StoreName), StoreName), StoreLocation);
+ using var store = new X509Store(Enum.Parse<StoreName>(StoreName), StoreLocation);
63
64
store.Open(OpenFlags.ReadOnly);
65
66
return store.Certificates.OfType<X509Certificate2>()
67
- .FirstOrDefault(c => c.Thumbprint.Equals(Thumbprint, StringComparison.OrdinalIgnoreCase));
+ .FirstOrDefault(c => c.Thumbprint.Equals(Thumbprint, StringComparison.OrdinalIgnoreCase));
68
69
else
70
0 commit comments