Skip to content

Repository files navigation

Whatever

Things I eventually got tired to rewrite over and over in different projects.

Just like a flea market, random things next to totally unrelated stuff.

Whatever.Extensions

Mostly extension methods, few base classes and helpers.

https://www.nuget.org/packages/Whatever.Extensions/

Types

TypeDescription
ConvertExtensionsTo[[S]Byte|[U]Int[16|32|64]|Single|Double|Decimal]() instead of Convert.To....
DictionaryExtensionsIDictionary.GetOrAdd(..., Func<TKey> valueFactory).
DisposableIDisposable base class.
DisposableAsyncIDisposableAsync base class.
EnumExtensionsEnum.HasFlags<T>(...), type-safe enum flag-checking.
SharedBufferSpan<T> alternative for async scenarios.
SingletonGeneric singleton base class.
SpanMemoryManagerMemoryManager<T> for Span<T> as Memory<T> in async scenarios.
SparseProgressIProgress<T> with granularity so it doesn't overwhelm consumers.
StreamExtensions[Get|Set]Endianness[Scope], gets/sets endianness for endian-aware stuff.
[Read|Write]<T>[Async](endianness?), for reading/writing unmanaged types.
ReadExactly[Async](...) for .NET Standard 2.1.
[Read|Write]StringAscii[Async], because it never gets old.
TextProgressBarText-mode progress bar, e.g. ████████████░░░░░░░░░░░░░░░░░░ 42.86%.
TypeExtensionsGetNiceName, friendlier version of Type.ToString().

Templates

NameDescription
Default.csprojNuGet package, SourceLink, versioning, code analysis/style.

About

Whatever, as title says.

Resources

Stars

1 star

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages