oehen.arguard 2.6.3

dotnet add package oehen.arguard --version 2.6.3                
NuGet\Install-Package oehen.arguard -Version 2.6.3                
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.3" />                
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add oehen.arguard --version 2.6.3                
#r "nuget: oehen.arguard, 2.6.3"                
#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.3

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

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.3 2,457 9/25/2024
2.6.2 2,788 6/4/2024
2.6.1 209 5/9/2024
2.6.0 231 3/8/2024
2.5.5 115 3/7/2024
2.5.4 116 3/7/2024
2.5.3 330 5/3/2023
2.5.2 384 12/23/2022
2.5.1 512 10/1/2022
2.5.0 476 10/1/2022
2.4.0 430 8/22/2022
2.3.0 442 8/11/2022
2.2.0 443 8/11/2022
2.1.0 495 5/4/2022
2.0.0 678 9/27/2021
1.0.1 487 8/1/2021
1.0.0 447 5/30/2021
0.12.0 402 5/30/2021
0.11.2 459 5/29/2021
0.11.1 399 5/28/2021
0.11.0 410 5/25/2021
0.9.2 658 2/18/2021
0.9.1 378 2/18/2021
0.9.0 417 1/22/2021
0.7.0 473 11/19/2020
0.5.0 521 11/1/2020
0.4.0 539 10/31/2020
0.3.11 532 9/6/2020
0.2.5 436 10/31/2020
0.2.2 488 10/31/2020