Dybal.Utils.TypedValues 1.0.0-pre-07

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

// Install Dybal.Utils.TypedValues as a Cake Tool
#tool nuget:?package=Dybal.Utils.TypedValues&version=1.0.0-pre-07&prerelease                

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. 
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 180 11/15/2023
1.0.0-pre-07 86 7/12/2023
1.0.0-pre-03 113 12/2/2022
1.0.0-pre-02 112 11/24/2022
1.0.0-pre-01 107 11/22/2022