pauldeen79.CrossCutting.Utilities.Operators
3.10.2
See the version list below for details.
dotnet add package pauldeen79.CrossCutting.Utilities.Operators --version 3.10.2
NuGet\Install-Package pauldeen79.CrossCutting.Utilities.Operators -Version 3.10.2
<PackageReference Include="pauldeen79.CrossCutting.Utilities.Operators" Version="3.10.2" />
paket add pauldeen79.CrossCutting.Utilities.Operators --version 3.10.2
#r "nuget: pauldeen79.CrossCutting.Utilities.Operators, 3.10.2"
// Install pauldeen79.CrossCutting.Utilities.Operators as a Cake Addin #addin nuget:?package=pauldeen79.CrossCutting.Utilities.Operators&version=3.10.2 // Install pauldeen79.CrossCutting.Utilities.Operators as a Cake Tool #tool nuget:?package=pauldeen79.CrossCutting.Utilities.Operators&version=3.10.2
CrossCutting
Generic utilities and other stuff, usable in any layer of any solution. We're targeting .NET Standard 2.0, so you can even use .NET Framework 4.x if you want to.
This repository consists of the following packages:
Package name | Description |
---|---|
CrossCutting.Common | Provider for system date and user name, some useful extension methods on System.Object and System.String, and the Result class |
CrossCutting.Common.Testing | Helps you test constructors on null checks |
CrossCutting.Data.Abstractions | Abstraction for executing database commands using System.Data namespace (IDbConnection and IDbCommand) |
CrossCutting.Data.Core | Default implementation of database commands |
CrossCutting.Data.Sql | Extension methods for working with database commands in System.Data namespace (IDbConnection) |
CrossCutting.DataTableDumper | Produces flat-text data tables from objects |
CrossCutting.Utilities.ObjectDumper | Produces readable flat-text representation from objects, for use in logging |
CrossCutting.Utilities.Parsers | Parser for pipe-delmited data table strings, TSQL INSERT INTO statements, function strings, math expressions and formattable strings (dynamic interpolated strings) |
System.Data.Stub | Stubs for System.Data interfaces like IDbConnection, IDbCommand and IDataReader |
Using NSubstitute or Moq as mock factory for CrossCutting.Common.Testing
To use NSubstitute as a mock factory for the code in CrossCutting.Common.Testing, create a test helper project within your solution, and add the following code:
public static void ShouldThrowArgumentNullExceptionsInConstructorsOnNullArguments(
this Type type,
Func<ParameterInfo, bool>? parameterPredicate = null,
Func<ParameterInfo, object?>? parameterReplaceDelegate = null,
Func<ConstructorInfo, bool>? constructorPredicate = null)
=> ShouldThrowArgumentNullExceptionsInConstructorsOnNullArguments(
type,
t => t.CreateInstance(parameterType => Substitute.For(new[] { parameterType }, Array.Empty<object>()), parameterReplaceDelegate, constructorPredicate),
parameterPredicate,
parameterReplaceDelegate,
constructorPredicate);
You can easily replace NSubstitute with Moq, if you want, by changing the factory delegate argument to this:
t => t.CreateInstance(parameterType => ((Mock)Activator.CreateInstance(typeof(Mock<>).MakeGenericType(parameterType))).Object, parameterReplaceDelegate, constructorPredicate),
Upgrade from 2.x to 3.0
There has been a breaking change in the Result class, which lead to a new major version. To port the old code, you can fix most errors by replace this:
Result<([^>]+)>\.([^(]+)\(
With this:
Result.$2<$1>(
Product | Versions 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. |
.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 was computed. |
.NET Framework | net461 was computed. net462 was computed. net463 was computed. net47 was computed. net471 was computed. net472 was computed. 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. |
-
.NETStandard 2.0
- pauldeen79.CrossCutting.Common (>= 3.10.2)
NuGet packages (3)
Showing the top 3 NuGet packages that depend on pauldeen79.CrossCutting.Utilities.Operators:
Package | Downloads |
---|---|
pauldeen79.CrossCutting.Utilities.Parsers
Package Description |
|
pauldeen79.ExpressionFramework.Domain
Package Description |
|
pauldeen79.ExpressionFramework.Domain.Specialized
Package Description |
GitHub repositories
This package is not used by any popular GitHub repositories.
Version | Downloads | Last updated |
---|---|---|
3.13.0 | 1,061 | 10/29/2024 |
3.12.0 | 1,019 | 9/21/2024 |
3.11.0 | 709 | 9/11/2024 |
3.10.2 | 1,754 | 5/9/2024 |
3.10.1 | 857 | 5/3/2024 |
3.10.0 | 816 | 4/27/2024 |
3.9.0 | 920 | 4/16/2024 |
3.8.0 | 498 | 4/5/2024 |
3.7.0 | 1,383 | 3/22/2024 |
3.6.0 | 176 | 3/21/2024 |
3.5.0 | 742 | 3/15/2024 |
3.4.0 | 402 | 3/14/2024 |
3.3.0 | 2,201 | 11/24/2023 |
3.0.0 | 1,264 | 10/21/2023 |
2.10.0 | 1,359 | 9/13/2023 |
2.9.0 | 499 | 9/9/2023 |
2.8.0 | 405 | 9/9/2023 |
2.7.59 | 258 | 9/8/2023 |
2.7.58 | 268 | 9/6/2023 |
2.7.57 | 386 | 8/31/2023 |
2.7.56 | 247 | 8/30/2023 |
2.7.55 | 1,227 | 5/15/2023 |
2.7.54 | 263 | 5/15/2023 |
2.7.53 | 628 | 5/8/2023 |
2.7.52 | 2,836 | 5/6/2023 |
2.7.51 | 252 | 5/5/2023 |
2.7.50 | 235 | 5/2/2023 |
2.7.49 | 236 | 5/2/2023 |
2.7.48 | 203 | 5/2/2023 |
2.7.47 | 211 | 5/2/2023 |
2.7.46 | 218 | 5/2/2023 |
2.7.45 | 223 | 5/2/2023 |
2.7.44 | 214 | 5/2/2023 |
2.7.43 | 219 | 5/2/2023 |
2.7.42 | 205 | 5/1/2023 |