Dlouhy.NetCoreUtils 1.0.0

There is a newer version of this package available.
See the version list below for details.
dotnet add package Dlouhy.NetCoreUtils --version 1.0.0                
NuGet\Install-Package Dlouhy.NetCoreUtils -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="Dlouhy.NetCoreUtils" Version="1.0.0" />                
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add Dlouhy.NetCoreUtils --version 1.0.0                
#r "nuget: Dlouhy.NetCoreUtils, 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 Dlouhy.NetCoreUtils as a Cake Addin
#addin nuget:?package=Dlouhy.NetCoreUtils&version=1.0.0

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

What is NetCoreUtils?

NetCoreUtils is a collection of C# reusable functions and methods.

Requirements

NetCoreUtils can be used with .NET 6, .NET 7 or .NET 8

How to install

Install NetCoreUtils via NuGet package

PM> Install-Package Dlouhy.NetCoreUtils

Examples of using

DateTimeRange value object example

string[] formats = { "dd/MM/yyyy" };
Result<DateTimeRange> rangeOrFailure = DateTimeRange.Create("01/06/2024", "01/07/2024", formats);

if (rangeOrFailure.IsSuccess)
{
   rangeOrFailure.Value;
}

Email value object example

string emailValue = "john.doe@example.com";
Result<string> emailOrFailure = Email.Create(emailValue);

if (emailOrFailure.IsSuccess)
{
   emailOrFailure.Value;
}

ByteHelper example

string hex = "FF0A1B";
byte[] result = hex.HexStringToByteArray();

StringHelper example

string input = "��������";
string outputWithoutDiacritics = input.RemoveDiacritics();

string input = "hello world";
string output = input.FirstCharToUpper();

IPAddressHelper example

uint testIPAddress = 0x01020304; // Represents IP 1.2.3.4
string actualResult = testIPAddress.ConvertFromIntegerToIPAddress();

FileHelper example

string fileName = "te#st.txt";
string actualResult = fileName.RemoveInvalidFilenameCharacters();

Submitting bugs and feature requests

Bugs and feature request are tracked on GitHub

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 (1)

Showing the top 1 NuGet packages that depend on Dlouhy.NetCoreUtils:

Package Downloads
FioBankApiClient

C# library for accessing Fio Bank's REST API

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
2.0.0 154 9/13/2024
1.0.0 88 9/12/2024