Shuttle.Core.Contract 11.1.0

The ID prefix of this package has been reserved for one of the owners of this package by NuGet.org. Prefix Reserved
dotnet add package Shuttle.Core.Contract --version 11.1.0
NuGet\Install-Package Shuttle.Core.Contract -Version 11.1.0
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="Shuttle.Core.Contract" Version="11.1.0" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add Shuttle.Core.Contract --version 11.1.0
#r "nuget: Shuttle.Core.Contract, 11.1.0"
#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.
// Install Shuttle.Core.Contract as a Cake Addin
#addin nuget:?package=Shuttle.Core.Contract&version=11.1.0

// Install Shuttle.Core.Contract as a Cake Tool
#tool nuget:?package=Shuttle.Core.Contract&version=11.1.0

Shuttle.Core.Contract

PM> Install-Package Shuttle.Core.Contract

A guard implementation that performs assertions/assumptions to prevent invalid code execution.

Guard

void Against<TException>(bool assertion, string message) 
	where TException : Exception

Throws exception TException with the given message if the assertion is false. If exception type TException does not have a constructor that accepts a message then an InvalidOperationException is thrown instead.


T AgainstNull<T>(T value, string name)

Throws a NullReferenceException if the given value is null; else returns the value.


string AgainstNullOrEmptyString(string value, string name)

Throws a NullReferenceException if the given value is null or empty/whitespace; else returns the value.


TEnum AgainstUndefinedEnum<TEnum>(object value, string name)

Throws an InvalidOperationException if the provided value cannot be found in the given TEnum; else returns the value as TEnum.


IEnumerable<T> AgainstEmptyEnumerable<T>(IEnumerable<T> enumerable, string name)

Throws an InvalidOperationException if the given enumerable does not contain any entries; else returns the enumerable.


public static void AgainstEmptyGuid(Guid value, string name)

Throws and ArgumentException when the value is equal to an empty Guid ({00000000-0000-0000-0000-000000000000}); else returns the value.

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. 
.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 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. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

This package has no dependencies.

NuGet packages (32)

Showing the top 5 NuGet packages that depend on Shuttle.Core.Contract:

Package Downloads
Shuttle.Esb The ID prefix of this package has been reserved for one of the owners of this package by NuGet.org.

Contains the core Shuttle.Esb assembly that should always be referenced when building Shuttle.Esb solutions.

Shuttle.Core.Logging The ID prefix of this package has been reserved for one of the owners of this package by NuGet.org.

Logging adapter.

Shuttle.Core.Reflection The ID prefix of this package has been reserved for one of the owners of this package by NuGet.org.

Reflection infrastructure components.

Shuttle.Core.Threading The ID prefix of this package has been reserved for one of the owners of this package by NuGet.org.

Thread-based processing.

Shuttle.Core.Serialization The ID prefix of this package has been reserved for one of the owners of this package by NuGet.org.

Serialization adapter.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
11.1.0 1,595 4/30/2024
11.0.0 22,175 12/1/2022
10.1.0 38,750 5/27/2022
10.0.4 927 5/21/2022
10.0.3 95,691 11/26/2020
10.0.2 16,218 2/13/2020
10.0.1 140,954 7/3/2018
10.0.0 90,288 12/27/2017