Dybal.Utils.TypedValues 1.0.0-pre-08

This is a prerelease version of Dybal.Utils.TypedValues.
dotnet add package Dybal.Utils.TypedValues --version 1.0.0-pre-08
                    
NuGet\Install-Package Dybal.Utils.TypedValues -Version 1.0.0-pre-08
                    
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="Dybal.Utils.TypedValues" Version="1.0.0-pre-08" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Dybal.Utils.TypedValues" Version="1.0.0-pre-08" />
                    
Directory.Packages.props
<PackageReference Include="Dybal.Utils.TypedValues" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add Dybal.Utils.TypedValues --version 1.0.0-pre-08
                    
#r "nuget: Dybal.Utils.TypedValues, 1.0.0-pre-08"
                    
#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.
#:package Dybal.Utils.TypedValues@1.0.0-pre-08
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=Dybal.Utils.TypedValues&version=1.0.0-pre-08&prerelease
                    
Install as a Cake Addin
#tool nuget:?package=Dybal.Utils.TypedValues&version=1.0.0-pre-08&prerelease
                    
Install as a Cake Tool

Dybal.Utils.TypedValues

The primary purpose of Dybal.Utils.TypedValues is to avoid mismatch simple values. Such as int, guid, string. And easy to create types with validations.

using Dybal.Utils.TypedValues;

[TypedValue<string>]
public readonly partial record struct Firstname;

[TypedValue<string>]
public readonly partial record struct Lastname;

public record Person(Firstname Firstname, Lastname Lastname);

public class Usage
{
    public Usage()
    {
        var person = new Person(new Firstname("Martin"), new Lastname("Dybal"));
    }
}

Validation of value

[TypedValue<double>]
public readonly partial record struct Percentage
{
    static partial void ValidateValue(double value)
    {
        Guard.Argument(value).GreaterThanOrEqualTo(0).LessThanOrEqualTo(100);
    }
}
Product Compatible and additional computed target framework versions.
.NET net7.0 is compatible.  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.  net9.0 was computed.  net9.0-android was computed.  net9.0-browser was computed.  net9.0-ios was computed.  net9.0-maccatalyst was computed.  net9.0-macos was computed.  net9.0-tvos was computed.  net9.0-windows was computed.  net10.0 was computed.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

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
1.0.0-pre-08 277 11/15/2023
1.0.0-pre-07 195 7/12/2023
1.0.0-pre-03 237 12/2/2022
1.0.0-pre-02 238 11/24/2022
1.0.0-pre-01 238 11/22/2022