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
<Query Kind="Program"> | |
<NuGetReference>ByteSize</NuGetReference> | |
<Namespace>ByteSizeLib</Namespace> | |
<Namespace>System.Diagnostics.CodeAnalysis</Namespace> | |
<Namespace>System.Runtime.InteropServices</Namespace> | |
<Namespace>System.Security</Namespace> | |
<Namespace>System.Text.Json</Namespace> | |
</Query> | |
string filePath = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.Desktop), "unraidMap.Json"); |
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 sealed record ApplicationInsightsOptions : ILoggerOptions | |
{ | |
public bool Enabled { get; init; } | |
public string? InstrumentationKey { get; init; } | |
} |
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 readonly struct InterpolatedStringFormatter : IReadOnlyList<KeyValuePair<string, object>> | |
{ | |
internal const int MaxCachedFormatters = 1024; | |
private const string NullFormat = "[null]"; | |
private static int _count; | |
private static ConcurrentDictionary<string, StringValuesFormatter> _formatters = new ConcurrentDictionary<string, StringValuesFormatter>(); | |
private readonly StringValuesFormatter _formatter; | |
private readonly object[] _values; | |
private readonly string _originalMessage; |
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
// This file isn't necessary it just provides some handy Methods in a Endpoint Subclass | |
public abstract partial class APIEndpoint<TRequest, TResponse, TMapper> : APIEndpoint<TRequest, TResponse>, IHasMapper<TMapper>, IEndpoint where TRequest : notnull, new() where TResponse : notnull where TMapper : notnull, IMapper, new() | |
{ | |
/// <summary> | |
/// the entity mapper for the endpoint | |
/// <para>HINT: entity mappers are singletons for performance reasons. do not maintain state in the mappers.</para> | |
/// </summary> | |
public static TMapper Map { get; } = new(); | |
} |