Unfucked.STUN 0.0.0-beta2

This is a prerelease version of Unfucked.STUN.
dotnet add package Unfucked.STUN --version 0.0.0-beta2                
NuGet\Install-Package Unfucked.STUN -Version 0.0.0-beta2                
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Unfucked.STUN" Version="0.0.0-beta2" />                
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add Unfucked.STUN --version 0.0.0-beta2                
#r "nuget: Unfucked.STUN, 0.0.0-beta2"                
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
// 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

GitHub Actions Testspace Coveralls

Fix egregiously broken or missing functionality in .NET libraries. Inspired by underscore, jQuery, Apache Commons, Spring, and Guava.

Unfuck your house

Packages

General

NuGet

  • 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
  • Cryptography
    • Random string generation
    • Is certificate temporally valid
  • Decimal math
    • Math operations on 128-bit decimal 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 of default 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
  • 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
  • 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
  • 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 or false if they all failed
      • Return the first passing task's result, or null if they all failed
    • 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

NuGet

  • For use with System.Runtime.Caching
  • Type-safe MemoryCache<T>

Compression

NuGet

  • For use with SharpCompress
  • TAR archives
    • Symlinks
    • Directories
    • File owner
    • File group
    • File permissions

DateTime

NuGet

  • For use with NodaTime
  • Absolute value of a Duration or TimeSpan
  • Get midnight from a ZonedDateTime as a ZonedDateTime, Period, or Duration
  • Convert time zone offset to hours
  • Compare two OffsetDateTimes to see which one happens first

DI

NuGet

  • 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

NuGet

  • For use with G6.GandiLiveDns
  • Interface for Gandi LiveDNS HTTP API client to allow mocked testing isolation

ICS

NuGet

  • 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

NuGet

  • For use with OBSClient
  • Interface for Open Broadcaster Software Studio WebSocket API client to allow mocked testing isolation

PGP

NuGet

  • 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

NuGet

  • 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

NuGet

  • For use with TwitchApi.Net
  • Interface for Twitch HTTP API client to allow mocked testing isolation

Windows

NuGet

  • Reliably detect when computer is entering and exiting standby
  • Kill the running screensaver
Bom.Squad

NuGet

Reconfigure the static shared Encoding.UTF8 instance to not emit UTF-8 byte order marks to unbreak compatibility with non-Microsoft software.

DarkNet

NuGet

Turn native Windows title bars dark in WPF and Windows Forms windows.

DataSizeUnits

NuGet

Parse, convert, normalize, and format amounts of data like bits, bytes, kilobytes, and megabytes.

HidClient

NuGet

Automatically connect and reconnect to USB HID peripherals.

KoKo

NuGet

Automatically implement INotifyPropertyChanged to allow you to create composable properties with no publisher or subscriber boilerplate.

ThrottleDebounce

NuGet

Throttle, debounce, and try functions and actions.

UnionTypes

NuGet

Implicitly cast multiple types to one union type, to avoid manually writing millions of method overloads.

Product 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. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

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