Namespace Tharga.Toolkit
Classes
- Base32Encoding
Provides RFC 4648 Base32 encoding and decoding using the standard alphabet (A-Z, 2-7).
- ByteSizeExtensions
Provides extension methods for converting byte counts into human-readable size strings.
- ClaimsExtensions
Extension methods for extracting and verifying identity keys from claims. Works with IdentityKey to provide a portable, serialized identity representation.
- ConcurrentTwoLevelDictionary<TMainKey, TSubKey, TData>
A thread-safe two-level dictionary that uses a main key to access a sub-dictionary keyed by a sub key.
- DateTimeExtensions
Extension methods for formatting DateTime and TimeSpan values as human-readable strings, including localized duration strings (e.g. "2 hours ago").
- DurationOptions
Configuration options for formatting a duration, including the range of time units and string formatting options.
- DurationStringOptions
Defines string formatting options for rendering a duration, including unit labels and special-case labels for near-zero values.
- EnumExtensions
Provides extension methods for mapping between enum types by name.
- EnumerableExtensions
Extension methods for IEnumerable<T>: random selection, ordering, chunking, and null handling.
- EnumerableExtensionsAsync
Async extension methods for IAsyncEnumerable<T>.
- Enumeration
Base class for creating enumeration types that behave like strongly-typed enum alternatives with rich behavior.
- Hash
Represents a raw hash value as a byte array. Supports implicit conversion to and from
byte[].
- HashExtensions
Extension methods for computing hash values from bytes, strings, URIs, and streams.
- HashString
Represents a hash value formatted as a string (e.g. hex, Base64, Base32). Inherits from Hash and retains the raw bytes alongside the formatted string.
- IdentityKey
A portable, serialized identity key derived from claims. Contains a Base64-encoded JSON dictionary of identity claim types and their values.
- IntegerExtensions
Provides extension methods for integer values.
- Luhn
Provides extension methods for computing and validating Luhn check digits.
- ObservableConcurrentDictionary<TKey, TValue>
A thread-safe dictionary that raises collection and property change notifications when items are added, removed, or modified.
- OrgNoExtensions
Provides extension methods for parsing and validating Swedish organization numbers.
- SemaphoreExecutor<TKey>
Allows execution of one thread at a time, for a specific key. Threads with different keys will be executed in parallel. Thread with the same key will be executed one at a time.
- StringExtension
Extension methods and utilities for string manipulation, random string generation, and Base64 encoding.
- TimeSpanStringOptions
Defines string formatting options for rendering a TimeSpan, including unit labels for each time unit.
- UnitOption
Represents the display options for a single time unit, including its value format and singular/plural labels.
- UriExtensions
Extension methods for working with Uri instances.
Enums
- EUnit
Represents the time units available for duration formatting, ordered from largest to smallest.
- ErrorType
Represents the types of validation errors that can occur.
- HashFormat
Specifies the output text format used when converting a computed hash to a string.
- HashType
Specifies the type of hash algorithm to use.
- Language
Represents supported languages for localized output.