Omnifactotum 0.4.0
See the version list below for details.
dotnet add package Omnifactotum --version 0.4.0
NuGet\Install-Package Omnifactotum -Version 0.4.0
<PackageReference Include="Omnifactotum" Version="0.4.0" />
paket add Omnifactotum --version 0.4.0
#r "nuget: Omnifactotum, 0.4.0"
// Install Omnifactotum as a Cake Addin #addin nuget:?package=Omnifactotum&version=0.4.0 // Install Omnifactotum as a Cake Tool #tool nuget:?package=Omnifactotum&version=0.4.0
Omnifactotum
Provides own helper and functional classes as well as extension methods for standard .NET classes.
Note: Factotum
is a Latin word literally meaning "do everything" (that is, a handyman or Jack-of-all-trades).
Release Notes
Status and Statistics
The non-exaustive list of .NET classes covered
- Reflection
Assembly
extension methodsICustomAttributeProvider
extension methods (ICustomAttributeProvider
is implemented byAssembly
,MethodInfo
,PropertyInfo
,Type
etc.)MethodBase
extension methodsType
extension methods
- Array (
T[]
) and collection (IEnumerable<T>
andICollection<T>
) extension methods DateTime
extension methodsDateTimeOffset
extension methodsDictionary<TKey, TValue>
extension methodsIDisposable
extension methodsEnum
extension methodsException
extension methodsExpression<TDelegate>
extension methods- Arbitrary
Object
generic extension methods - Math extension methods for numeric types
Nullable<Boolean> (bool?)
extension methodsISet
extension methodsString
extension methodsTimeSpan
extension methods
The non-exaustive list of own helper classes
AsyncFactotum
EnumFactotum
Factotum
The non-exaustive list of own functional classes
ByReferenceEqualityComparer<T>
ColoredConsoleTraceListener
ObjectValidator
DirectedGraph<T>
andDirectedGraphNode<T>
EnumFixedSizeDictionary<TKey, TValue>
FixedSizeDictionary<TKey, TValue>
KeyedEqualityComparer<T, TKey>
ReadOnlyDictionary<TKey, TValue>
- NOTE:
.NET Framework 4.0
only; as of.NET Framework 4.5+
System.Collections.ObjectModel.ReadOnlyDictionary<TKey, TValue>
is available.
- NOTE:
ReadOnlyItemCollection<T>
(the read-only wrapper forICollection<T>
)ReadOnlySet<T>
ValueRange<T>
VirtualTreeNode<T>
andVirtualTreeNodeRoot<T>
WeakReferenceBasedCache<TKey, TValue>
Dealing with Compatibility Issues
Due to certain inconsistencies between .NET Standard 2.0
and .NET Core 2.x
, you may need to apply one or more workarounds as described below when using Omnifactotum
with your projects compiled for .NET Standard 2.0
or .NET Core 2.x
-or- a mix of .NET Standard 2.0
and/or .NET Core 2.x
and/or .NET Framework 4.x
:
Omnifactotum's Class or Method | Workaround |
---|---|
System.Collections.Generic.KeyValuePair |
Use Omnifactotum.OmnifactotumKeyValuePair . |
<code>OmnifactotumCollectionExtensions.ToHashSet(...)</code> | Use static method invocation instead of extension method invocation. That is: OmnifactotumCollectionExtensions.ToHashSet(collection) instead of collection.ToHashSet() . |
<code>OmnifactotumDictionaryExtensions.GetValueOrDefault</code> | Use static method invocation instead of extension method invocation. That is: OmnifactotumDictionaryExtensions.GetValueOrDefault(dictionary) instead of dictionary.GetValueOrDefault() . |
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net5.0 is compatible. 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. |
.NET Core | netcoreapp2.0 was computed. netcoreapp2.1 was computed. netcoreapp2.2 was computed. netcoreapp3.0 was computed. netcoreapp3.1 was computed. |
.NET Standard | netstandard2.0 is compatible. netstandard2.1 is compatible. |
.NET Framework | net40 is compatible. net403 was computed. net45 was computed. net451 was computed. net452 was computed. net46 was computed. net461 is compatible. net462 was computed. net463 was computed. net47 was computed. net471 was computed. net472 is compatible. net48 was computed. net481 was computed. |
MonoAndroid | monoandroid was computed. |
MonoMac | monomac was computed. |
MonoTouch | monotouch was computed. |
Tizen | tizen40 was computed. tizen60 was computed. |
Xamarin.iOS | xamarinios was computed. |
Xamarin.Mac | xamarinmac was computed. |
Xamarin.TVOS | xamarintvos was computed. |
Xamarin.WatchOS | xamarinwatchos was computed. |
-
.NETFramework 4.0
- No dependencies.
-
.NETFramework 4.6.1
- No dependencies.
-
.NETFramework 4.7.2
- No dependencies.
-
.NETStandard 2.0
- No dependencies.
-
.NETStandard 2.1
- No dependencies.
-
net5.0
- No dependencies.
NuGet packages (2)
Showing the top 2 NuGet packages that depend on Omnifactotum:
Package | Downloads |
---|---|
Omnifactotum.Wpf
Omnifactotum.Wpf is the ultimate solution for WPF .NET developers who want to streamline their development process. It provides its own helper and functional types as well as the extension methods for the standard .NET types. It's the perfect way to reduce errors and save time, allowing developers to focus on creating quality code. |
|
Omnifactotum.NUnit
Omnifactotum.NUnit: Provides helper and functional classes for testing with NUnit. |
GitHub repositories
This package is not used by any popular GitHub repositories.
Version | Downloads | Last updated |
---|---|---|
0.22.0 | 463 | 9/3/2024 |
0.20.0 | 509 | 5/23/2024 |
0.19.0 | 534 | 2/15/2024 |
0.18.0 | 568 | 1/2/2024 |
0.17.0 | 749 | 10/18/2023 |
0.16.0 | 998 | 6/23/2023 |
0.15.0 | 769 | 6/1/2023 |
0.14.1 | 871 | 5/1/2023 |
0.14.0 | 930 | 3/20/2023 |
0.13.0 | 887 | 3/10/2023 |
0.12.0 | 954 | 2/2/2023 |
0.11.0 | 1,195 | 1/2/2023 |
0.10.0 | 1,134 | 9/30/2022 |
0.9.0 | 1,038 | 9/19/2022 |
0.8.0 | 1,257 | 5/30/2022 |
0.7.0 | 1,135 | 12/27/2021 |
0.6.0 | 1,173 | 11/15/2021 |
0.5.0 | 1,106 | 9/21/2021 |
0.4.1 | 927 | 5/31/2021 |
0.4.0 | 861 | 5/25/2021 |
0.3.0.119 | 3,610 | 7/7/2015 |
0.3.0.114 | 1,710 | 3/23/2015 |
0.3.0.101 | 1,935 | 12/10/2014 |
### Changes in 0.4.0 (since 0.3.0.119)
#### Major Updates
- `Omnifactotum` is now the multi-target package for:
- .NET Framework 4.0, 4.6.1, and 4.7.2
- .NET Standard 2.0 and 2.1
- .NET 5.0
- Addressed multi-target compatibility issues in:
- `ColoredConsoleTraceListener`
- `OmnifactotumAssemblyExtensions`
- `OmnifactotumCollectionExtensions`
- `OmnifactotumDictionaryExtensions`
- `OmnifactotumOperationContextExtensions`
- `KeyValuePair` (static helper)
- Omnifactotum's `ReadOnlyDictionary<TKey, TValue>`
- `WinEventLog`
- Added `OmnifactotumKeyValuePair` static helper for facilitating migration from .NET Framework to .NET Standard/Core
#### Breaking Changes
- `Factotum`: Removed the methods `ToPropertyString` and `AreEqualByContents` in favor of methods `ToPropertyString` and `IsEqualByContentsTo` in `OmnifactotumGenericObjectExtensions`
- `OmnifactotumArrayExtensions`: The method `AsReadOnly()` moved to `OmnifactotumCollectionExtensions`
- `OmnifactotumCustomAttributeProviderExtensions`: Removed the obsolete method `GetCustomAttributes`
- `OmnifactotumGenericObjectExtensions`: Removed the methods `Affirm` and `ComputePredicate`
- `OmnifactotumMathExtensions`: Removed the methods `Sqr(decimal)`, `SqrChecked(float)`, `SqrChecked(double)` since their expected behavior cannot be achieved
#### New features
- `OmnifactotumCollectionExtensions`: Added `ToUIString` implementation for collections of strings and collections of nullable value type instances
- `OmnifactotumGenericObjectExtensions`: Implemented `Morph()` overloads for nullable value types (to complement already existing method for the reference types)
- `OmnifactotumNullableBooleanExtensions`: Added an overload of `ToString` accepting value provider delegates
- Added `ReadOnlyItemCollection<T>` (read-only wrapper for `ICollection<T>`)
- Added partial support of Nullable Reference Types:
- `OmnifactotumGenericObjectExtensions.EnsureNotNull`
- Exposed the class `OmnifactotumRepresentationConstants` (formerly `OmnifactotumConstants`)
- Applied `PureAttribute`, `InstantHandleAttribute`, and `NoEnumerationAttribute` annotations in certain appropriate cases
#### Fixes and improvements
- Improved documentation
- `KeyedEqualityComparer<T, TKey>`: `IEqualityComparer.Equals` and `IEqualityComparer.GetHashCode` now don't throw an exception f an argument is not compatible with the type `T`
- `OmnifactotumAssemblyExtensions`
- `OmnifactotumCollectionHashCodeHelper` (as per the fix in `OmnifactotumHashCodeHelper`)
- `OmnifactotumDateTimeOffsetExtensions`
- `OmnifactotumEnumExtensions`: `GetName`, `GetQualifiedName`, `GetFullName`, `EnsureDefined`, and `IsDefined`
- `OmnifactotumGenericObjectExtensions`:
- `ToUIString()` now uses the invariant culture if the value is `IFormattable`
- Fix in `IsEqualByContentsTo()` for the case of a type with no fields
- `OmnifactotumHashCodeHelper`: Fix in CombineHashCodeValues (for case when the next hash code is zero)
- `OmnifactotumMethodBaseExtensions`
- `OmnifactotumTypeExtensions`
- Updated JetBrains Annotations in `Omnifactotum.Annotations`
### Changes in 0.3.0.119 (since 0.3.0.117)
- Omnifactotum: Removed NuGet dependency to the `MSBuildTasks` package since it is only used for development
### Changes in 0.3.0.117 (since 0.3.0.114)
- Omnifactotum: `Factotum` and `Factotum.For<TObject>`: Improved annotations
### Changes in 0.3.0.114 (since 0.3.0.101)
- `OmnifactotumAssemblyExtensions`: Improvements
- **BREAKING CHANGE**: `OmnifactotumDisposableExtensions`: `DisposeSafely` now works only for reference and nullable types (2 overloads)
- **BREAKING CHANGE**: `OmnifactotumCollectionExtensions`: `DisposeCollectionItemsSafely` now works only for reference and nullable types (2 overloads)
- **BREAKING CHANGE**: `Factotum`: `DisposeAndNull` now works also for nullable types (besides reference types)
- Introduced the `AsyncFactotum` class with the overloaded methods `ComputeAsync` and `ExecuteAsync`
- Fix in `MemberConstraintBase.CastTo<T>` (and hence in `TypedMemberConstraintBase`) for nullable types
- Improved annotations in Object Validator and related classes
- Minor improvements
### Changes in 0.3.0.101 (since 0.3.0.90)
- `KeyedEqualityComparer<T, TKey>`: Fixes and improvements
- `KeyedEqualityComparer` static helper class has been introduced
- `Factotum`: `CreateEmptyCompletedTask` and `CreateEmptyFaultedTask` methods have been introduced
- `OmnifactotumGenericObjectExtensions`: `EnsureNotNull` (for nullable) has been introduced
- `IValueContainer<T>` has been introduced for `ValueContainer<T>` and `SyncValueContainer<T>`
- `ValueContainer` and `SyncValueContainer` helper static classes have been introduced
- Improvements and fixes in `OmnifactotumMethodBaseExtensions` and `OmnifactotumTypeExtensions`
- `OmnifactotumStringExtensions`: `TrimSafely`, `TrimStartSafely`, `TrimEndSafely` and `Shorten` methods now never return null
### Changes in 0.3.0.90 (since 0.3.0.86)
- **BREAKING CHANGE** `OmnifactotumCustomAttributeProviderExtensions`: `GetCustomAttributes` has been renamed to `GetCustomAttributeArray` (for compatibility with FW 4.5+)
### Changes in 0.3.0.86 (since 0.3.0.83)
- **BREAKING CHANGE** `OmnifactotumDictionaryExtensions`: The method `GetValueOrCreate` has been renamed to `GetOrCreateValue` for readablity and in order to avoid confusion with `GetValueOrDefault`
- `OmnifactotumDictionaryExtensions`: Improved annotations
- `ValueContainer` and `SyncValueContainer`:
- Support for equality comparison
- Added `DebuggerDisplay` attribute and `ToString()` method
- `OmnifactotumMathExtensions` class has been introduced:
- `Sqr` (square)
- `Sqrt` (square root)
- `Abs` (absolute value)
### Changes in 0.3.0.83 (since 0.3.0.82)
- `FixedSizeDictionary`: Improved annotations
- `FixedSizeDictionary`: Implemented version verification in the enumerator
### Changes in 0.3.0.82 (since 0.3.0.80)
- `FixedSizeDictionary`: Removed index verification in the internal determinant since this verification highly affected performance
### Changes in 0.3.0.80 (since 0.3.0.79)
- `EnumFixedSizeDictionary`: Fix in determining the size
### Changes in 0.3.0.79 (since 0.3.0.74)
- `FixedSizeDictionary` and `EnumFixedSizeDictionary` have been introduced.
- Applied Omnifactotum Annotations to the `Factotum` and `OmnifactotumGenericObjectExtensions` classes.
### Changes in 0.3.0.74 (since 0.2.0.59)
- **BREAKING CHANGE** Object Validation: Redesign and support of `IEnumerable`.
- **BREAKING CHANGE** Renamed `EnumHelper` to `EnumFactotum`.
- **BREAKING CHANGE** `OmnifactotumExpressionExtensions` is now in the namespace `System.Linq.Expressions` (instead of System).