ByteDecoder.Common 1.0.0

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

// Install ByteDecoder.Common as a Cake Tool
#tool nuget:?package=ByteDecoder.Common&version=1.0.0

ByteDecoder.Common

.NET Core Maintainability Test Coverage CodeQL License

Common utility classes, guard clauses, and more.

Targeted to .Net6 onwards

Installation

Install the ByteDecoder.Common NuGet Package.

Package Manager Console

Install-Package ByteDecoder.Common

.NET Core CLI

dotnet add package ByteDecoder.Common

Documentation

All the documentation can be found on the github page.

Examples and usage

Guard Clauses

They are a piece of code in charge of protecting params at the top of methods against undesirable values.

Supported Guard Clauses:

  • IfArgumentIsNull
  • IfArgumentIsNullOrEmpty
  • IfArgumentOutOfRange

Usage examples:

using ByteDecoder.Common.GuardClauses;

// Null Argument Guard check
public void MethodOne(IEnumerable<string> collection)
{
  Guard.Break.IfArgumentIsNull(collection, nameof(collection));

  // More logic code if the param is suitable after the guard evaluates the condition.
}

// String is NUll or Empty Guard check
public void MethodTwo(string word)
{
  Guard.Break.IfArgumentIsNull(word, nameof(word));

  // More logic code if the param is suitable after the guard evaluates the condition.
}

// Calling the method and passing a null value in the param
MethodOne((IEnumerable<string>) null);  // This will throw an ArgumentNullException
MethodTwo(string.Empty);  // This will throw an ArgumentNullException

Contributing

Bug reports and pull requests are welcome on GitHub at https://github.com/ByteDecoder/ByteDecoder.Common.

Copyright (c) 2020 Rodrigo Reyes released under the MIT license

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

NuGet packages (2)

Showing the top 2 NuGet packages that depend on ByteDecoder.Common:

Package Downloads
ByteDecoder.RoyalLibrary

Collection of useful LINQ query operators

ByteDecoder.Queryology.Providers.ObjectDumper

ObjectDumper provider the minimalist Queryology Engine

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
1.0.0 671 1/2/2022
0.3.6 367 1/25/2021
0.3.5 369 1/20/2021
0.3.4 449 8/19/2020
0.3.0 1,286 7/29/2020
0.2.3 562 7/29/2020
0.2.2 452 7/29/2020
0.2.0 459 7/28/2020
0.1.0 463 7/27/2020