This file contains hidden or 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
using Microsoft.Extensions.Options; | |
internal sealed class PathBaseSettings | |
{ | |
/// <summary> | |
/// The path prefix, if any, which will be stripped from the request path and added to the request path base. | |
/// During development, this might be empty, but then set when the application is deployed behind a reverse proxy. | |
/// Example: "/my-api" | |
/// </summary> | |
public string PathBase { get; set; } = string.Empty; |
This file contains hidden or 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
public static class ShellLink | |
{ | |
public static string Resolve(string shortcutPath) | |
{ | |
var link = new CShellLink(); | |
((IPersistFile)link).Load(shortcutPath, STGM_READ); | |
var result = new StringBuilder(MAX_PATH); | |
// ReSharper disable once RedundantAssignment |
This file contains hidden or 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
using System; | |
using System.ComponentModel; | |
using System.Diagnostics; | |
using System.IO; | |
using System.Reflection; | |
using System.Runtime.InteropServices; | |
using System.Text; | |
using System.Text.RegularExpressions; | |
using System.Windows.Forms; |
This file contains hidden or 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
using System; | |
using System.ComponentModel; | |
using System.Runtime.InteropServices; | |
using System.Security.Cryptography.X509Certificates; | |
public static class PublicKeyToken | |
{ | |
public static string FromCertificate(X509Certificate cert) | |
{ | |
var publicKeyBlob = GetCspPublicKeyBlob(cert); |