oehen.arguard
2.6.3
.NET 6.0
This package targets .NET 6.0. The package is compatible with this framework or higher.
.NET Standard 2.0
This package targets .NET Standard 2.0. The package is compatible with this framework or higher.
.NET Framework 4.7.2
This package targets .NET Framework 4.7.2. The package is compatible with this framework or higher.
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
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#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
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
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
Product | Versions 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,708 | 9/25/2024 |
2.6.2 | 2,857 | 6/4/2024 |
2.6.1 | 210 | 5/9/2024 |
2.6.0 | 232 | 3/8/2024 |
2.5.5 | 116 | 3/7/2024 |
2.5.4 | 117 | 3/7/2024 |
2.5.3 | 331 | 5/3/2023 |
2.5.2 | 385 | 12/23/2022 |
2.5.1 | 513 | 10/1/2022 |
2.5.0 | 477 | 10/1/2022 |
2.4.0 | 431 | 8/22/2022 |
2.3.0 | 443 | 8/11/2022 |
2.2.0 | 444 | 8/11/2022 |
2.1.0 | 496 | 5/4/2022 |
2.0.0 | 679 | 9/27/2021 |
1.0.1 | 488 | 8/1/2021 |
1.0.0 | 448 | 5/30/2021 |
0.12.0 | 403 | 5/30/2021 |
0.11.2 | 460 | 5/29/2021 |
0.11.1 | 400 | 5/28/2021 |
0.11.0 | 411 | 5/25/2021 |
0.9.2 | 659 | 2/18/2021 |
0.9.1 | 379 | 2/18/2021 |
0.9.0 | 418 | 1/22/2021 |
0.7.0 | 474 | 11/19/2020 |
0.5.0 | 524 | 11/1/2020 |
0.4.0 | 540 | 10/31/2020 |
0.3.11 | 533 | 9/6/2020 |
0.2.5 | 437 | 10/31/2020 |
0.2.2 | 489 | 10/31/2020 |