Cuemon Namespace
The Cuemon namespace is the root of the Cuemon for .NET framework. It provides foundational types — value types, reference types, factories, utility classes, interfaces, attributes, and rich delegates — that underpin every Cuemon package. Use these types when you need common utilities like Decorator, DateSpan, StringUtility, or the functional delegates that enable a more expressive coding style.
If you are new to Cuemon for .NET, start with Decorator<T> for wrapping and extending existing instances, DateSpan for human-readable date ranges, or the Condition delegate for predicate-based control flow. For extension methods on core .NET types, see the Cuemon.Extensions namespace.
For mutable tuple scenarios, start with MutableTuple<T1> — the one-arity variant that serves as the anchor for all arity levels. Higher-arity variants (MutableTuple<T1, T2> through MutableTuple<T1, ..., T20>) follow the same pattern; choose the arity that matches your number of tuple elements.
For Try-style delegate scenarios, start with TesterFunc<TResult, TSuccess> — the two-arity variant that serves as the anchor for the full family. Higher-arity variants follow the same pattern; choose the arity that matches your number of input parameters plus the result and success type parameters.
For exception handling scenarios, start with ExceptionHandler<T> (one type parameter) or ExceptionHandler<T, T> (two type parameters). The one-parameter variant handles a single exception type, while the two-parameter variant handles distinct input and exception types. Choose the variant that matches your handler's input and exception requirements.
For exception invocation scenarios, start with ExceptionInvoker<T> to invoke operations with one type parameter or ExceptionInvoker<T1, T2> for two type parameters. Higher-arity variants follow the same pattern; choose the arity that matches your exception handler's needs.
Availability: .NET 10, .NET 9 and .NET Standard 2.0
Complements: System namespace 🔗
Related: Cuemon.Extensions namespace 📘
Extension Members
| Type | Ext | Methods |
|---|---|---|
| IDecorator<Byte[]> | ⬇️ | ToEncodedString, ToHexadecimalString, ToBinaryString, ToUrlEncodedBase64String, ToBase64String, TryDetectUnicodeEncoding, ToStream |
| IDecorator<IEnumerable |
⬇️ | ToEnumerable, ToStringEquivalent |
| IDecorator |
⬇️ | GetUnixEpoch, ToUnixEpochTime, ToUtcKind, ToLocalKind, ToDefaultKind |
| IDecorator |
⬇️ | ResolveDelegateInfo |
| IDecorator |
⬇️ | ToTimeSpan |
| IDecorator |
⬇️ | Flatten |
| IDecorator |
⬇️ | Max, Min, IsPrime, IsCountableSequence, IsEven, IsOdd |
| IDecorator | ⬇️ | ChangeType, ChangeType<T>, ChangeTypeOrDefault<T>, DefaultPropertyValueResolver |
| IDecorator |
⬇️ | Difference, ToByteArray, FromUrlEncodedBase64, ToCasing, ToAsciiEncodedString, ToStream, ToUri, StartsWith, ContainsAny |
| IDecorator |
⬇️ | TraverseWhileNotEmpty<TSource> |
| IDecorator |
⬇️ | ToFriendlyName, IsNullable, IsComplex, IsSimple, HasAnonymousCharacteristics, HasDefaultConstructor, HasEqualityComparerImplementation, HasComparableImplementation, HasComparerImplementation, HasEnumerableImplementation, HasDictionaryImplementation, HasKeyValuePairImplementation, HasTypes, HasInterfaces, HasAttribute, HasCircularReference, MatchMember, GetDefaultValue, GetAllProperties, GetAllFields, GetAllEvents, GetAllMethods, GetRuntimePropertiesExceptOf<T>, GetInheritedTypes, GetDerivedTypes, GetHierarchyTypes |
Classes
- ActionFactory<TTuple>
Provides a way of invoking an Action delegate regardless of the amount of parameters provided.
- Alphanumeric
Provides a set of alphanumeric constant and static fields that consists of both letters, numbers and other symbols (such as punctuation marks and mathematical symbols).
- ArgumentReservedKeywordException
The exception that is thrown when the value of an argument is a reserved keyword.
- ByteArrayDecoratorExtensions
Extension methods for the byte array hidden behind the IDecorator<T> interface.
- Calculator
Provides a set of static methods for generic arithmetic assignment operations.
- CharDecoratorExtensions
Extension methods for the char struct hidden behind the IDecorator<T> interface.
- Condition
Provide ways to verify conditions a generic way for countless scenarios using true/false propositions.
- ConditionalValue
Represents the base class to determine whether an operation was a success or not.
- ConditionalValue<TResult>
Represents the base class to support the Try-Parse pattern of an operation that may be asynchronous in nature.
- Convertible
Provides static helper methods for converting IConvertible values to and from byte arrays, including support for configurable encoding, byte order, and custom converters.
- ConvertibleConverterDictionary
Represents a collection of converters that map IConvertible implementations to byte arrays.
- ConvertibleOptions
Configuration options for Convertible.
- DataPair
Represents a generic way to provide information about arbitrary data.
- DataPair<T>
Represents a generic way to provide information about arbitrary data.
- DateTimeDecoratorExtensions
Extension methods for the DateTime struct hidden behind the IDecorator<T> interface.
- DateTimeRange
Represents a period of time between two DateTime values.
- DayPart
Represents a part of a day. The built-in parts of day supports a roughly way to determine whether it is; Night, Morning, Forenoon, Afternoon or Evening. Keep in mind that there is no exact science for day parts; it is as much a cultural as it is a personal preference.
- Decorator
Provides a way to support hiding of non-common extension methods by enclosing/wrapping an object within the IDecorator<T> interface.
- Decorator<T>
Provides a generic way to support hiding of non-common extension methods by enclosing/wrapping an object within the IDecorator<T> interface.
- DelegateDecoratorExtensions
Extension methods for the Delegate hidden behind the IDecorator<T> interface.
- DelimitedString
Provides a set of static methods to convert a sequence into a delimited string and break a delimited string into substrings.
- DelimitedStringOptions
Configuration options for Split(string, Action<DelimitedStringOptions>).
- DelimitedStringOptions<T>
Configuration options for DelimitedString.
- Disposable
Provides a mechanism for releasing both managed and unmanaged resources with focus on the former.
- DisposableOptions
Configuration options for IDisposable.
- DoubleDecoratorExtensions
Extension methods for the double struct hidden behind the IDecorator<T> interface.
- EndianOptions
Configuration options for BitConverter.
- Eradicate
Provides a set of static methods for eradicating different types of values or sequences of values.
- ExceptionCondition<TException>
Provides a fluent and generic way to setup a condition for raising an Exception.
- ExceptionDecoratorExtensions
Extension methods for the Exception class hidden behind the IDecorator<T> interface.
- ExceptionHandler<TException>
Provides a generic way to handle an Exception.
- ExceptionHandler<TException, TResult>
Provides a generic way to handle an Exception.
- ExceptionInsights
Provides a set of static methods for embedding environment specific insights to an exception.
- ExceptionInvoker<TException>
Provides a generic way to throw an Exception.
- ExceptionInvoker<TException, TResult>
Provides a generic way to throw an Exception.
- FinalizeDisposable
Provides a mechanism for releasing both managed and unmanaged resources with focus on the latter. Implements the Disposable
- FormattingOptions
Configuration options for IFormatProvider.
- FuncFactory<TTuple, TResult>
Provides a way of invoking an Func<TResult> delegate regardless of the amount of parameters provided.
- Generate
Provides a set of static methods for generating different types of values or sequences of values.
- IntegerDecoratorExtensions
Extension methods for the short, int and long structs hidden behind the IDecorator<T> interface.
- MutableTuple
Represents a MutableTuple with an empty value.
- MutableTupleFactory<TTuple>
Provides a base-class for delegate based factories.
- MutableTuple<T1>
Represents a MutableTuple with a single generic value.
- MutableTuple<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10>
Represents a MutableTuple with ten generic values.
- MutableTuple<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11>
Represents a MutableTuple with eleven generic values.
- MutableTuple<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12>
Represents a MutableTuple with twelve generic values.
- MutableTuple<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13>
Represents a MutableTuple with thirteen generic values.
- MutableTuple<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14>
Represents a MutableTuple with fourteen generic values.
- MutableTuple<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15>
Represents a MutableTuple with fifteen generic values.
- MutableTuple<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16>
Represents a MutableTuple with sixteen generic values.
- MutableTuple<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17>
Represents a MutableTuple with seventeen generic values.
- MutableTuple<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18>
Represents a MutableTuple with eighteen generic values.
- MutableTuple<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19>
Represents a MutableTuple with nineteen generic values.
- MutableTuple<T1, T2>
Represents a MutableTuple with two generic values.
- MutableTuple<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20>
Represents a MutableTuple with twenty generic values.
- MutableTuple<T1, T2, T3>
Represents a MutableTuple with three generic values.
- MutableTuple<T1, T2, T3, T4>
Represents a MutableTuple with four generic values.
- MutableTuple<T1, T2, T3, T4, T5>
Represents a MutableTuple with five generic values.
- MutableTuple<T1, T2, T3, T4, T5, T6>
Represents a MutableTuple with six generic values.
- MutableTuple<T1, T2, T3, T4, T5, T6, T7>
Represents a MutableTuple with seven generic values.
- MutableTuple<T1, T2, T3, T4, T5, T6, T7, T8>
Represents a MutableTuple with eight generic values.
- MutableTuple<T1, T2, T3, T4, T5, T6, T7, T8, T9>
Represents a MutableTuple with nine generic values.
- ObjectDecoratorExtensions
Extension methods for the object class hidden behind the IDecorator<T> interface.
- ObjectFormattingOptions
Configuration options for FromObject() and methods of ObjectDecoratorExtensions.
- ObjectPortrayalOptions
Configuration options for ObjectPortrayal(object, Action<ObjectPortrayalOptions>).
- Patterns
Provides a generic way to support different types of design patterns and practices with small utility methods.
- Range<T>
Represents a period of time between two
T.
- StringDecoratorExtensions
Extension methods for the string class hidden behind the IDecorator<T> interface.
- StringFactory
Provides access to factory methods for creating encoded string representations.
- SuccessfulValue
Provides a way to indicate a successful operation. This class cannot be inherited.
- SuccessfulValue<TResult>
Provides a way to indicate a successful operation. This class cannot be inherited.
- TesterFuncFactory<TTuple, TResult, TSuccess>
Provides a way of invoking an TesterFunc<TResult, TSuccess> function delegate regardless of the amount of parameters provided.
- Tweaker
Provides a way to change any instance of the same generic type.
- TypeArgumentException
The exception that is thrown when one of the type arguments provided to a method is not valid.
- TypeArgumentOutOfRangeException
The exception that is thrown when the value of an type argument is outside the allowable range of values as defined by the invoked method.
- TypeDecoratorExtensions
Extension methods for the Type class hidden behind the IDecorator<T> interface.
- UnsuccessfulValue
Provides a way to indicate a faulted operation. This class cannot be inherited.
- UnsuccessfulValue<TResult>
Provides a way to indicate a faulted operation. This class cannot be inherited.
- Validator
Provides a generic way to validate different types of arguments passed to members.
Structs
- StringReplacePair
Defines a oldValue/newValue pair that can be set or retrieved for string replace operations.
Interfaces
- IData
Provides a way to supply information about the class implementing this interface.
- IDecorator<T>
Defines a decorator that exposes the inner wrapped type.
Enums
- AssignmentOperator
Defines the most common assignment operators for numeric operands.
- CasingMethod
Specifies ways that a string must be converted in terms of casing.
- DateTimeFormatPattern
Defines the default pattern to use when formatting date- and time values.
- Endianness
Defines the order in which a sequence of bytes are represented.
- GuidFormats
Specifies allowed GUID formats in parsing related methods.
- SortOrder
Specifies the direction of a sort operation.
- SystemSnapshots
Specifies the system states to capture runtime.
Delegates
- TesterFunc<T1, T2, T3, T4, T5, T6, T7, T8, TResult, TSuccess>
Encapsulates a method that has five parameters and returns a value that indicates success of the type specified by the
TSuccessparameter and returns a out result value of the type specified by theTResultparameter.
- TesterFunc<T1, T2, T3, T4, T5, T6, T7, T8, T9, TResult, TSuccess>
Encapsulates a method that has five parameters and returns a value that indicates success of the type specified by the
TSuccessparameter and returns a out result value of the type specified by theTResultparameter.
- TesterFunc<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, TResult, TSuccess>
Encapsulates a method that has five parameters and returns a value that indicates success of the type specified by the
TSuccessparameter and returns a out result value of the type specified by theTResultparameter.
- TesterFunc<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, TResult, TSuccess>
Encapsulates a method that has five parameters and returns a value that indicates success of the type specified by the
TSuccessparameter and returns a out result value of the type specified by theTResultparameter.
- TesterFunc<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, TResult, TSuccess>
Encapsulates a method that has five parameters and returns a value that indicates success of the type specified by the
TSuccessparameter and returns a out result value of the type specified by theTResultparameter.
- TesterFunc<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, TResult, TSuccess>
Encapsulates a method that has five parameters and returns a value that indicates success of the type specified by the
TSuccessparameter and returns a out result value of the type specified by theTResultparameter.
- TesterFunc<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, TResult, TSuccess>
Encapsulates a method that has five parameters and returns a value that indicates success of the type specified by the
TSuccessparameter and returns a out result value of the type specified by theTResultparameter.
- TesterFunc<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, TResult, TSuccess>
Encapsulates a method that has five parameters and returns a value that indicates success of the type specified by the
TSuccessparameter and returns a out result value of the type specified by theTResultparameter.
- TesterFunc<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, TResult, TSuccess>
Encapsulates a method that has five parameters and returns a value that indicates success of the type specified by the
TSuccessparameter and returns a out result value of the type specified by theTResultparameter.
- TesterFunc<TResult, TSuccess>
Encapsulates a method and returns a value that indicates success of the type specified by the
TSuccessparameter and returns a out result value of the type specified by theTResultparameter.
- TesterFunc<T, TResult, TSuccess>
Encapsulates a method that has one parameter and returns a value that indicates success of the type specified by the
TSuccessparameter and returns a out result value of the type specified by theTResultparameter.
- TesterFunc<T1, T2, TResult, TSuccess>
Encapsulates a method that has two parameters and returns a value that indicates success of the type specified by the
TSuccessparameter and returns a out result value of the type specified by theTResultparameter.
- TesterFunc<T1, T2, T3, TResult, TSuccess>
Encapsulates a method that has three parameters and returns a value that indicates success of the type specified by the
TSuccessparameter and returns a out result value of the type specified by theTResultparameter.
- TesterFunc<T1, T2, T3, T4, TResult, TSuccess>
Encapsulates a method that has four parameters and returns a value that indicates success of the type specified by the
TSuccessparameter and returns a out result value of the type specified by theTResultparameter.
- TesterFunc<T1, T2, T3, T4, T5, TResult, TSuccess>
Encapsulates a method that has five parameters and returns a value that indicates success of the type specified by the
TSuccessparameter and returns a out result value of the type specified by theTResultparameter.
- TesterFunc<T1, T2, T3, T4, T5, T6, TResult, TSuccess>
Encapsulates a method that has five parameters and returns a value that indicates success of the type specified by the
TSuccessparameter and returns a out result value of the type specified by theTResultparameter.
- TesterFunc<T1, T2, T3, T4, T5, T6, T7, TResult, TSuccess>
Encapsulates a method that has five parameters and returns a value that indicates success of the type specified by the
TSuccessparameter and returns a out result value of the type specified by theTResultparameter.