mirror of
https://github.com/QL-Win/QuickLook.git
synced 2026-01-13 07:05:24 +08:00
Introduces QuickLook.Plugin.CertViewer for viewing certificate files (.pfx, .cer, .pem, etc.) in QuickLook. The plugin loads and displays certificate details or raw content, and is integrated into the solution and project files.
23 lines
722 B
C#
23 lines
722 B
C#
using System.Security.Cryptography.X509Certificates;
|
|
|
|
namespace QuickLook.Plugin.CertViewer;
|
|
|
|
internal sealed class CertLoadResult
|
|
{
|
|
public bool Success { get; }
|
|
public X509Certificate2 Certificate { get; }
|
|
public string Message { get; }
|
|
public string RawContent { get; }
|
|
|
|
public CertLoadResult(bool success, X509Certificate2 certificate, string message, string rawContent)
|
|
{
|
|
Success = success;
|
|
Certificate = certificate;
|
|
Message = message;
|
|
RawContent = rawContent;
|
|
}
|
|
|
|
public static CertLoadResult From(bool success, X509Certificate2 certificate, string message, string rawContent)
|
|
=> new CertLoadResult(success, certificate, message, rawContent);
|
|
}
|