A repository of handy C# utilities.
- RangeEnumerator. Use ranges in your foreach loops like
foreach (int i in 0..9). - TimeSpan.GetAwaiter.
awaitaTimeSpan. - A
GenericBenchmarkclass for repurposing the test explorer GUI for a benchmark suite. - A
TypedFactory<T>class which is effectively a macro ofserviceProvider.GetRequiredService<T>(). My primary use case for this is to more easily consume typedHttpClients in Singleton services. - A
.WhenAllextension method forTasks andValueTasks. Now you can further chain your async LINQ.
Please reference the unit tests.
- NativeAOT compat