I hereby claim:
- I am flq on github.
- I am fquednau (https://keybase.io/fquednau) on keybase.
- I have a public key ASDraf_OUnnhDWmgwKEoWTSV7QHQ1pjDPm0pCCSGME0ttwo
To claim this, I am signing this object:
using Microsoft.AspNetCore.Builder; | |
using Microsoft.AspNetCore.Http; | |
using Microsoft.AspNetCore.Hosting; | |
using Microsoft.AspNetCore.StaticFiles; | |
using Microsoft.Extensions.Hosting; | |
using System; | |
using System.IO; | |
using System.Linq; | |
using System.Text.Encodings.Web; | |
using System.Threading.Tasks; |
using System.Net.Mime; | |
using Microsoft.AspNetCore.StaticFiles; | |
var builder = WebApplication.CreateBuilder(args); | |
builder.Services.AddSingleton(new RootDirectory(args[0])); | |
var app = builder.Build(); | |
app.MapGet("/{*path}", (string? path, RootDirectory dir) => | |
{ | |
var fsItem = dir.Combine(path); |
#nullable enable | |
using System; | |
using System.Collections.Generic; | |
using System.IO; | |
using System.Threading; | |
using System.Threading.Tasks; | |
namespace Utilities; | |
public class AsyncEnumerableStream(IAsyncEnumerable<byte[]> source) : Stream |
using System; | |
using System.Linq; | |
using System.Reflection; | |
using Microsoft.Extensions.DependencyInjection; | |
namespace DIPlaygroundWebApp.ServiceCollectionInfrastructure | |
{ | |
public static class AssemblyPoolRegistrar | |
{ | |
public static AssembliesForRegistration UseBulkRegistration(this IServiceCollection svcCollection, |
.NET snippets | |
1. Deconstruct a regex match group collection |
using System; | |
using System.Runtime.Remoting.Proxies; | |
internal class Program | |
{ | |
private static void Main(string[] args) | |
{ | |
var c = new CrazyObject(); | |
Console.WriteLine(c.Hello()); | |
Console.ReadLine(); | |
} |
function indent([parameter(ValueFromPipeline)]$Content) | |
{ | |
$StringWriter = New-Object System.IO.StringWriter | |
$XmlWriter = New-Object System.XMl.XmlTextWriter $StringWriter | |
$xmlWriter.Formatting = "indented" | |
$xmlWriter.Indentation = 2 | |
$Content.WriteContentTo($XmlWriter) | |
$XmlWriter.Flush() | |
$StringWriter.Flush() | |
Write-Output $StringWriter.ToString() |
module BitempTests | |
type TimePoint<'S> = { | |
recorded : int; | |
actual : int; | |
state : 'S; | |
} | |
type HistoryEntry<'S> = { | |
time : int; |
I hereby claim:
To claim this, I am signing this object:
using System.Collections.Generic; | |
using Xunit; | |
using static NMeasure.U; | |
using static NMeasure.Tests.IiUnits; | |
namespace NMeasure.Tests | |
{ | |
public class IIUnitsTests | |
{ | |
public IIUnitsTests() |