EgonsoftHU.Extensions.Bcl 2.1.0

The ID prefix of this package has been reserved for one of the owners of this package by NuGet.org. Prefix Reserved

Requires NuGet 4.1.0 or higher.

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

// Install EgonsoftHU.Extensions.Bcl as a Cake Tool
#tool nuget:?package=EgonsoftHU.Extensions.Bcl&version=2.1.0

Egonsoft.HU BCL Extensions

C# extension methods for Base Class Library types.

Summary

  • Extension methods for throwing ArgumentNullException
  • Extension methods for throwing ArgumentOutOfRangeException
  • Extension methods for specific types
  • Extension methods with generic type parameters
  • Predefined (const / readonly) values
  • More information

Extension methods for throwing ArgumentNullException

  • For generic T type:
    • ThrowIfNull<T>()
  • For System.String type:
    • ThrowIfNullOrEmpty()
    • ThrowIfNullOrWhiteSpace()
  • For System.Guid type:
    • ThrowIfEmptyGuid()

Extension methods for throwing ArgumentOutOfRangeException

Can't wait for the new static methods in ArgumentOutOfRangeException that will be introduced in .NET 8?
In this package they are available as extension methods.

  • For IEquatable<T> type:
    • ThrowIfEqualTo()
    • ThrowIfNotEqualTo()
  • For IComparable<T> type:
    • ThrowIfLessThan()
    • ThrowIfLessThanOrEqualTo()
    • ThrowIfGreaterThan
    • ThrowIfGreaterThanOrEqualTo()
  • For numeric types:
    System.SByte, System.Int16, System.Int32, System.Int64,
    System.Byte, System.UInt16, System.UInt32, System.UInt64,
    System.Half, System.Single, System.Double, System.Decimal
    • ThrowIfZero()
    • ThrowIfNegative()
    • ThrowIfNegativeOrZero()
    • ThrowIfPositive()
    • ThrowIfPositiveOrZero()

Extension methods for specific types

This package contains extension methods for these types:

  • System.Collections.Generic.ICollection<T>
  • System.Collections.Generic.IDictionary<TKey, TValue>
  • System.Collections.Generic.IEnumerable<T>
  • System.DateTimeOffset
  • System.IO.Stream
  • System.Reflection.Assembly
  • System.Reflection.MemberInfo
  • System.Reflection.ParameterInfo
  • System.String
  • System.Type
  • Numeric types:
    System.SByte, System.Int16, System.Int32, System.Int64,
    System.Byte, System.UInt16, System.UInt32, System.UInt64,
    System.Half, System.Single, System.Double, System.Decimal

Extension methods with generic type parameters

  • IEnumerable-related
  • Reflection-related
  • value selectors

Predefined (const / readonly) values

  • GuidFormat
  • GenericTypeDefinitions

More information

Learn more at https://github.com/gcsizmadia/EgonsoftHU.Extensions.Bcl

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 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 is compatible. 
.NET Standard netstandard2.0 is compatible.  netstandard2.1 is compatible. 
.NET Framework net461 was computed.  net462 is compatible.  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.

NuGet packages (3)

Showing the top 3 NuGet packages that depend on EgonsoftHU.Extensions.Bcl:

Package Downloads
EgonsoftHU.Extensions.DependencyInjection.Abstractions The ID prefix of this package has been reserved for one of the owners of this package by NuGet.org.

Abstractions for dependency injection. Commonly Used Types: EgonsoftHU.Extensions.DependencyInjection.IAssemblyRegistry EgonsoftHU.Extensions.DependencyInjection.DefaultAssemblyRegistry

EgonsoftHU.Extensions.Logging.Serilog The ID prefix of this package has been reserved for one of the owners of this package by NuGet.org.

Serilog.ILogger extensions: - Enrich log events with the name of the source member (method, property, etc.) in which the log event occurs. - Enrich log events with multiple properties at once using PropertyBagEnricher. - Populate Exception.Data dictionary with the log event properties.

EgonsoftHU.Text.Json The ID prefix of this package has been reserved for one of the owners of this package by NuGet.org.

System.Text.Json extensions. Includes a JsonStringEnumConverter that supports EnumMemberAttribute. Commonly Used Types: EgonsoftHU.Text.Json.Serialization.JsonStringEnumConverter

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
2.1.0 575 8/27/2023
2.0.0 5,546 6/21/2022
1.0.3 1,011 5/4/2022
1.0.2 4,240 3/13/2022
1.0.1 821 3/2/2022
1.0.0 800 2/4/2022