https://github.com/aybe/whatever
Whatever, as title says.
https://github.com/aybe/whatever
Last synced: 11 months ago
JSON representation
Whatever, as title says.
- Host: GitHub
- URL: https://github.com/aybe/whatever
- Owner: aybe
- Created: 2023-11-07T05:36:08.000Z (over 2 years ago)
- Default Branch: master
- Last Pushed: 2024-07-23T06:55:48.000Z (almost 2 years ago)
- Last Synced: 2025-04-02T10:55:17.086Z (about 1 year ago)
- Language: C#
- Homepage:
- Size: 1.25 MB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# 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
| Type | Description |
| - | - |
| ConvertExtensions | `To[[S]Byte\|[U]Int[16\|32\|64]\|Single\|Double\|Decimal]()` instead of `Convert.To...`. |
| DictionaryExtensions | `IDictionary.GetOrAdd(..., Func valueFactory)`. |
| Disposable | `IDisposable` base class. |
| DisposableAsync | `IDisposableAsync` base class. |
| EnumExtensions | `Enum.HasFlags(...)`, type-safe enum flag-checking.|
| SharedBuffer | `Span` alternative for async scenarios. |
| Singleton | Generic singleton base class. |
| SpanMemoryManager | `MemoryManager` for `Span` as `Memory` in async scenarios. |
| SparseProgress | `IProgress` with granularity so it doesn't overwhelm consumers. |
| StreamExtensions |`[Get\|Set]Endianness[Scope]`, gets/sets endianness for endian-aware stuff. |
| |`[Read\|Write][Async](endianness?)`, for reading/writing unmanaged types. |
| |`ReadExactly[Async](...)` for .NET Standard 2.1. |
| |`[Read\|Write]StringAscii[Async]`, because it never gets old. |
| TextProgressBar | Text-mode progress bar, e.g. `████████████░░░░░░░░░░░░░░░░░░ 42.86%`.|
| TypeExtensions | `GetNiceName`, friendlier version of `Type.ToString()`.|
### Templates
| Name | Description |
| - | - |
| Default.csproj | NuGet package, SourceLink, versioning, code analysis/style. |