com.ges.tinyutilities 1.3.16

dotnet add package com.ges.tinyutilities --version 1.3.16
                    
NuGet\Install-Package com.ges.tinyutilities -Version 1.3.16
                    
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="com.ges.tinyutilities" Version="1.3.16" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="com.ges.tinyutilities" Version="1.3.16" />
                    
Directory.Packages.props
<PackageReference Include="com.ges.tinyutilities" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add com.ges.tinyutilities --version 1.3.16
                    
#r "nuget: com.ges.tinyutilities, 1.3.16"
                    
#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.
#:package com.ges.tinyutilities@1.3.16
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=com.ges.tinyutilities&version=1.3.16
                    
Install as a Cake Addin
#tool nuget:?package=com.ges.tinyutilities&version=1.3.16
                    
Install as a Cake Tool

TinyUtilities

A lightweight collection of utilities, extensions, and helper classes for C#. It provides essential tools for mathematics, collections, asynchronous operations, logging, and system interactions without heavy dependencies.

Key Features:

  • Comprehensive extension methods for standard types (Array, List, Action, Enum, DateTime)
  • Math and Random utilities
  • Async timer and pause mechanisms
  • Safe logging system with conditional compilation
  • JSON converters for flexible schema handling
  • System process execution helpers

Table of Contents

Core

Standalone static utility classes, each focused on a single domain of functionality.

ArrayDataConverter

Provides extension methods to convert integer arrays and integer lists into byte arrays. Each integer element is explicitly cast to a byte, suitable for data serialization where size reduction is required.

AsyncPause

Implements a mechanism to pause and resume asynchronous tasks without cancellation. The Waiting method yields execution if the pause flag is active, allowing external control over task flow.

EnumUtility

Offers reflection-based tools for Enumerations. Includes methods to iterate over all enum values, execute actions on the first matching value, convert enums to arrays, retrieve value-index tuples, and count total defined values.

MathfUtility

Contains mathematical constants and functions typically found in game development frameworks. Includes trigonometric functions, min/max operations with parameter arrays, clamping, interpolation (Lerp, SmoothStep), smoothing (SmoothDamp), and power-of-two calculations.

RandomUtility

Provides a static interface for random number generation. Supports range generation for integers and floats, selecting random elements from arrays, and generating offset values based on a central point.

ShellUtility

Facilitates asynchronous execution of system processes. Includes specific helpers for WSL and PowerShell commands. Supports capturing standard output as strings or running silent processes with optional event-based logging.

TextUtility

Handles text formatting for numbers and time. Converts large integers and floats into abbreviated strings using K (thousands) and M (millions) suffixes with specific rich text formatting tags. Also formats TimeSpan objects into HH:MM:SS strings.

TimerUtility

Implements asynchronous countdown timers. Supports callbacks for updating remaining time and completion events. Includes helpers to calculate time remaining until the next day and offline tick calculations for idle progress systems.

TimeSpanUtility

Provides comparison operations for TimeSpan structures. Includes methods to find the minimum or maximum value from parameters and clamp a TimeSpan value within a defined minimum and maximum range.

Custom Types

New types introduced by the library itself — structs, classes, or records that define their own data shape or behavior, rather than adding functionality to an existing .NET type.

BlittableBool

A readonly struct that wraps a boolean value using a byte internally. Implements equality and comparison interfaces. Designed for scenarios requiring blittable types for marshalling or specific memory layout constraints.

Extensions

Extension methods that attach new functionality directly onto existing types, keeping the call syntax fluent and instance-like instead of requiring a separate utility call.

ActionExtension

Extends Action lists and arrays with invocation methods. Includes InvokeSafe variants that copy the collection before execution to prevent errors if the collection is modified during invocation. Supports generic actions with up to three parameters.

ArrayExtension

Provides manipulation methods for arrays. Includes functionality to add or remove elements, generate number sequences, check containment, calculate averages, convert to string representations, remove ranges, find indices, and reverse arrays.

BoolExtension

Adds a method to convert boolean values into capitalized string representations ("True" or "False").

CancellationTokenSourceExtension

Manages the lifecycle of CancellationTokenSource instances. Includes methods to reset, recreate, update, and safely cancel and dispose of token sources to prevent resource leaks.

DateTimeExtension

Enables serialization of DateTime objects to XML strings and parsing them back. Includes a helper to determine if a given date falls on the next day relative to another date.

DictionaryExtensions

Adds functionality to dictionaries with integer values. The AddOrSet method increments an existing value by a specified amount or sets the initial value if the key does not exist.

DisposableExtension

Provides bulk disposal methods for collections. Iterates over arrays, lists, or dictionary values implementing IDisposable and calls Dispose on each element.

EnumExtension

Implements bitwise flag checking for Enumerations. Converts enum values to unsigned shorts to perform Is, IsNot, and Any checks against provided flags.

FuncExtension

Extends lists and arrays of Func<bool>. Provides invocation methods that iterate through the functions and stop execution once a target boolean result is achieved. Includes safe invocation variants.

IntExtension

Adds a method to check if an integer value matches any value within a provided parameter array.

ListExtension

Extends List<T> with manipulation tools. Includes adding ranges with exclusion predicates, checking containment, counting unique elements based on hash codes, verifying uniqueness, retrieving values by hash, and converting lists to string representations.

ObjectExtension

Provides a generic method to ensure an object instance exists. Returns the current object if not null, otherwise creates and returns a new instance using the parameterless constructor.

TimeConvertExtension

Provides conversion methods between seconds and milliseconds. Converts float seconds to integer milliseconds and integer or double milliseconds to float seconds.

TimeSpanExtension

Extends TimeSpan with serialization and calculation helpers. Includes XML serialization, parsing, custom total hours and minutes calculations, and subtraction of seconds.

JSON Converters

Custom serialization/deserialization logic for handling JSON shapes.

JsonStringOrArrayConverter

A System.Text.Json converter for string arrays. Allows a JSON field to be deserialized from either a single string (converted to a single-element array) or a standard JSON array. Serializes single-element arrays as a raw string and multi-element arrays as a JSON array.

Logger

A small, self-contained logging pipeline.

DebugUtility

Centralized logging system wrapped in conditional compilation (DEBUG). Supports log levels, dividers, exception logging, and value dumping. Includes a marker method that logs the calling method's signature via stack trace. Supports desktop console coloring and event-based message updates.

DebugDisplay

Low-level logging helper that writes messages to the console with colors based on log type or sends messages to the system debug output.

LogType

Enumeration defining the severity levels for logging: Log, Warning, and Error. Used to determine console coloring and log categorization.

Product Compatible and additional computed target framework versions.
.NET net5.0 was computed.  net5.0-windows was computed.  net6.0 was computed.  net6.0-android was computed.  net6.0-ios was computed.  net6.0-maccatalyst was computed.  net6.0-macos was computed.  net6.0-tvos was computed.  net6.0-windows was computed.  net7.0 was computed.  net7.0-android was computed.  net7.0-ios was computed.  net7.0-maccatalyst was computed.  net7.0-macos was computed.  net7.0-tvos was computed.  net7.0-windows was computed.  net8.0 was computed.  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.  net9.0 was computed.  net9.0-android was computed.  net9.0-browser was computed.  net9.0-ios was computed.  net9.0-maccatalyst was computed.  net9.0-macos was computed.  net9.0-tvos was computed.  net9.0-windows was computed.  net10.0 was computed.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed. 
.NET Core netcoreapp3.0 was computed.  netcoreapp3.1 was computed. 
.NET Standard netstandard2.1 is compatible. 
MonoAndroid monoandroid was computed. 
MonoMac monomac was computed. 
MonoTouch monotouch was computed. 
Tizen tizen60 was computed. 
Xamarin.iOS xamarinios was computed. 
Xamarin.Mac xamarinmac was computed. 
Xamarin.TVOS xamarintvos was computed. 
Xamarin.WatchOS xamarinwatchos was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages (1)

Showing the top 1 NuGet packages that depend on com.ges.tinyutilities:

Package Downloads
com.ges.tinyreactive

Reactive fields and extensions.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
1.3.16 141 7/29/2026
1.3.15 93 7/29/2026
1.3.14 128 7/28/2026
1.3.13 138 7/22/2026
1.3.7 113 7/8/2026
1.3.6 323 7/4/2026
1.3.5 96 7/4/2026
1.3.4 100 7/4/2026