static void Main(string[] args) { if (!GCSettings.IsServerGC) { throw new InvalidOperationException("Requires server GC"); } Parser.Default.ParseArguments <HttpMockOptions>(args).WithParsed(o => { Options = o; Run(); }); }
public static string HostHeader(this HttpMockOptions mockOptions) => $"{mockOptions.RequestHeaderPrefix}-host";
public static string RequestKeyHeader(this HttpMockOptions mockOptions) => $"{mockOptions.RequestHeaderPrefix}-requestkey";
public HttpContextManager(HttpContext httpContext, IOptionsSnapshot <HttpMockOptions> mockOptions) { _httpContext = httpContext; _mockOptions = mockOptions.Value; }
public static string ActionHeader(this HttpMockOptions mockOptions) => $"{mockOptions.RequestHeaderPrefix}-action";