oehen.arguard 2.6.0

dotnet add package oehen.arguard --version 2.6.0
NuGet\Install-Package oehen.arguard -Version 2.6.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="oehen.arguard" Version="2.6.0" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add oehen.arguard --version 2.6.0
#r "nuget: oehen.arguard, 2.6.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 oehen.arguard as a Cake Addin
#addin nuget:?package=oehen.arguard&version=2.6.0

// Install oehen.arguard as a Cake Tool
#tool nuget:?package=oehen.arguard&version=2.6.0

oehen.arguard

oehen.arguard is a dotnet argument and parameter validator extension library.

Installation

Use the nuget package manager to install oehen.arguard:

Package oehen.arguard is publish to nuget.org.

dotnet add package oehen.arguard --version <VERSION>

Usage

Usage in a constructor

This example shows a solution to check constructor parameter and assign them to local fields in one line.

    public class ClassA
    {
        private readonly string _text;
        private readonly int _number;

        public ClassA(string name, int number)
        {
            // name should not be null or whitespace
            _text_ = text.ThrowIfIsNullOrWhiteSpace(nameof(text));

            // number should be greater than zero
            _number = number.ThrowIfIsLessThanZero(nameof(number));

            // ...
        }
    }

Usage in a method

This example shows a solution to check the parameter of a public method.

    public void DoSomethingWithThisApple(Apple apple)
    {
        apple.ThrowIfNull(nameof(apple));

        // ...
    }

Documentation

The latest documentation can find at https://eoehen.github.io/arguard/.

License

License

Product Compatible and additional computed target framework versions.
.NET net5.0 was computed.  net5.0-windows was computed.  net6.0 is compatible.  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 is compatible.  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 is compatible.  net48 is compatible.  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.
  • .NETFramework 4.7.2

    • No dependencies.
  • .NETFramework 4.8

    • No dependencies.
  • .NETStandard 2.0

    • No dependencies.
  • .NETStandard 2.1

    • No dependencies.
  • net6.0

    • No dependencies.
  • net8.0

    • No dependencies.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
2.6.0 112 3/8/2024
2.5.5 77 3/7/2024
2.5.4 88 3/7/2024
2.5.3 304 5/3/2023
2.5.2 351 12/23/2022
2.5.1 484 10/1/2022
2.5.0 451 10/1/2022
2.4.0 405 8/22/2022
2.3.0 417 8/11/2022
2.2.0 418 8/11/2022
2.1.0 471 5/4/2022
2.0.0 635 9/27/2021
1.0.1 462 8/1/2021
1.0.0 423 5/30/2021
0.12.0 380 5/30/2021
0.11.2 432 5/29/2021
0.11.1 377 5/28/2021
0.11.0 385 5/25/2021
0.9.2 635 2/18/2021
0.9.1 357 2/18/2021
0.9.0 395 1/22/2021
0.7.0 449 11/19/2020
0.5.0 496 11/1/2020
0.4.0 514 10/31/2020
0.3.11 508 9/6/2020
0.2.5 410 10/31/2020
0.2.2 465 10/31/2020