Unfucked.STUN
0.0.0-beta2
dotnet add package Unfucked.STUN --version 0.0.0-beta2
NuGet\Install-Package Unfucked.STUN -Version 0.0.0-beta2
<PackageReference Include="Unfucked.STUN" Version="0.0.0-beta2" />
paket add Unfucked.STUN --version 0.0.0-beta2
#r "nuget: Unfucked.STUN, 0.0.0-beta2"
// Install Unfucked.STUN as a Cake Addin #addin nuget:?package=Unfucked.STUN&version=0.0.0-beta2&prerelease // Install Unfucked.STUN as a Cake Tool #tool nuget:?package=Unfucked.STUN&version=0.0.0-beta2&prerelease
🧰 Unfucked
Fix egregiously broken or missing functionality in .NET libraries. Inspired by underscore, jQuery, Apache Commons, Spring, and Guava.
Packages
General
- Console
- Colored text and background in strings, not tightly coupled to
Console.Write
- Enable colored output on Windows 10 1511 and later
- Clear screen and move to top-left corner
- Colored text and background in strings, not tightly coupled to
- Cryptography
- Random string generation
- Is certificate temporally valid
- Decimal math
Math
operations on 128-bitdecimal
values
- Directories
- Delete without throwing an exception on missing directories
- DNS
- Fluent resolving method
- Enumerables
- Filter out
null
values - Add multiple values at once
- Upsert into non-concurrent dictionary
- Fluent set difference method
- Filter out consecutive duplicate values
- Convert
IAsyncEnumerator
to list - First item or
null
instead ofdefault
for value types - Head and tail
- Delta changeset between two enumerables (created, updated, deleted, and unchanged items)
- Atomic swap on
ConcurrentDictionary
to upsert new value and get old value
- Filter out
- Paths
- Trim trailing slashes
- Create new empty temporary subdirectory in specific parent directory
- Convert DOS backslashes to Unix forward slashes
- Match file extension against a set
- Processes
- Command line argument marshalling with correct escaping and quoting
- String to array
- Array to string
- Run program and get output and exit code
- Get parent process of a process
- Get descendant processes recursively of a process
- Command line argument marshalling with correct escaping and quoting
- Strings
- Coerce empty strings to
null
- Fluently check if a string has any non-whitespace characters
- Fluently check if a string has any characters
- Fluent join method
- Uppercase first letter
- Lowercase first letter
- Trim multiple strings from start, end, or both
- Join enumerable into an English-style list with commas an a conjunction like
and
- Fluent conversion method to byte array
- Fluent conversion method to byte stream
- Convert DOS CRLF line breaks to Unix LF line breaks
- Repeat a string a certain number of times
- Coerce empty strings to
- Tasks
- Unbounded delay time (.NET 6 tops out at 49.7 days)
- Await multiple tasks and proceed when any of them both completes and the return value passes a predicate, or they all fail to complete or the predicate
- Return
true
if any passed orfalse
if they all failed - Return the first passing task's result, or
null
if they all failed
- Return
- Asynchronously await the cancellation of a
CancellationToken
without blocking the thread
- URIs
- Fluent method to get URI query parameters
- Check if a URI host belongs to a given domain (site locking)
- XML
- Fluent method to read an XML document from an HTTP response body
- Find all descendant elements of a parent node which have a given tag name
Caching
- For use with
System.Runtime.Caching
- Type-safe
MemoryCache<T>
Compression
- For use with SharpCompress
- TAR archives
- Symlinks
- Directories
- File owner
- File group
- File permissions
DateTime
- For use with NodaTime
- Absolute value of a
Duration
orTimeSpan
- Get midnight from a
ZonedDateTime
as aZonedDateTime
,Period
, orDuration
- Convert time zone offset to hours
- Compare two
OffsetDateTimes
to see which one happens first
DI
- For use with
Microsoft.Extensions.Hosting
dependency injection/inversion of control - Add a colored console with column formatted data
- Search for JSON configuration files in executable directory, not just current working directory
- Allow provider functions to be injected, so long-lived consumers can depend on short-lived dependencies and control their lifecycle
DNS
- For use with G6.GandiLiveDns
- Interface for Gandi LiveDNS HTTP API client to allow mocked testing isolation
ICS
- For use with Ical.Net
- Asynchronously serialize iCalendar files to a byte stream, to prevent Kestrel and IIS errors on synchronous I/O
- Converters between the three implementations of a datetime used by Ical.Net, NodaTime, and .NET
OBS
- For use with OBSClient
- Interface for Open Broadcaster Software Studio WebSocket API client to allow mocked testing isolation
PGP
- For use with PgpCore
- Detached signing, where an ASCII-armored PGP signature is generated in a sidecar file, not inline wrapping the file being signed like in clearsigning
STUN
- For use with Stun.Net
- STUN client that retains the server that it was configured with, useful for error logging
- Multi-server STUN client that transparently picks a random public STUN server from a constantly-updated list when sending a request, with retries and fallbacks if any of them fail
- Thread-safe multi-server STUN client that can be used concurrently from multiple threads without conflicts
Twitch
- For use with TwitchApi.Net
- Interface for Twitch HTTP API client to allow mocked testing isolation
Windows
- Reliably detect when computer is entering and exiting standby
- Kill the running screensaver
Related packages
Bom.Squad
Reconfigure the static shared Encoding.UTF8
instance to not emit UTF-8 byte order marks to unbreak compatibility with non-Microsoft software.
DarkNet
Turn native Windows title bars dark in WPF and Windows Forms windows.
DataSizeUnits
Parse, convert, normalize, and format amounts of data like bits, bytes, kilobytes, and megabytes.
HidClient
Automatically connect and reconnect to USB HID peripherals.
KoKo
Automatically implement INotifyPropertyChanged to allow you to create composable properties with no publisher or subscriber boilerplate.
ThrottleDebounce
Throttle, debounce, and try functions and actions.
UnionTypes
Implicitly cast multiple types to one union type, to avoid manually writing millions of method overloads.
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net8.0 is compatible. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. |
-
net8.0
- Stun.Net (>= 8.0.2)
- Unfucked (>= 0.0.0-beta2)
- Unfucked.Caching (>= 0.0.0-beta2)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
Version | Downloads | Last updated |
---|---|---|
0.0.0-beta2 | 28 | 9/8/2024 |