This file contains 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
// Copyright 2021 Ryan Crosby | |
// This code is licensed under the MIT license | |
/// <summary> | |
/// Variations of the EnsureSuccessStatusCode() extension method for capturing and retreiving the HTTP Status Code and Response Body. | |
/// </summary> | |
public static class HttpResponseMessageExtensions | |
{ | |
public const string StatusCodeKey = "StatusCode"; | |
public const string ResponseBodyKey = "ResponseBody"; |
This file contains 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
// Copyright 2021 Ryan Crosby | |
// This code is licensed under the MIT license | |
using Microsoft.AspNetCore.Html; | |
using Microsoft.AspNetCore.Mvc.Rendering; | |
using Microsoft.AspNetCore.Mvc.ViewFeatures; | |
using Microsoft.Extensions.DependencyInjection; | |
using System; | |
using System.Linq.Expressions; |
This file contains 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
syntax on | |
set background=dark | |
set showcmd | |
set showmatch | |
set mouse= |
This file contains 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
// Copyright 2022 Ryan Crosby | |
// This code is licensed under the MIT license | |
// | |
// Methods to convert a byte array to hex, using new Span<T> | |
// | |
// C# no-alloc optimization that directly wraps the data section of the dll (similar to string constants) | |
// https://github.com/dotnet/roslyn/pull/24621 | |
private static ReadOnlySpan<byte> HexAlphabetBytes => new byte[16] |
NewerOlder