Skaar.ValueType
4.0.0
dotnet add package Skaar.ValueType --version 4.0.0
NuGet\Install-Package Skaar.ValueType -Version 4.0.0
<PackageReference Include="Skaar.ValueType" Version="4.0.0" />
<PackageVersion Include="Skaar.ValueType" Version="4.0.0" />
<PackageReference Include="Skaar.ValueType" />
paket add Skaar.ValueType --version 4.0.0
#r "nuget: Skaar.ValueType, 4.0.0"
#:package Skaar.ValueType@4.0.0
#addin nuget:?package=Skaar.ValueType&version=4.0.0
#tool nuget:?package=Skaar.ValueType&version=4.0.0
Value type model code generator
This library generates code for value types that wrap string values or structs/primitives.
When you want strong types for your value objects or identifiers, this library can help you.
[ValueType]
public partial struct MyValueTypeWrappingStrings;
[ValueType<Guid>]
public partial struct MyValueTypeWrappingGuids;
MyValueTypeWrappingGuids myInstance = Guid.NewGuid();
Console.WriteLine(myInstance); // prints the Guid value
The code generated assumes a fairly recent version of C#.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net8.0 is compatible. 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. |
-
.NETStandard 2.0
- No dependencies.
NuGet packages (5)
Showing the top 5 NuGet packages that depend on Skaar.ValueType:
| Package | Downloads |
|---|---|
|
Skaar.Fodselsnummer
A library implementing a type for Norwegian identification numbers. |
|
|
Skaar.Organisasjonsnummer
A library implementing a type for Norwegian organization numbers. |
|
|
Skaar.Kontonummer
A library implementing a type for Norwegian bank account numbers. |
|
|
Skaar.Vin
A value type representing a VIN number |
|
|
Skaar.BilRegNr
A library implementing a type for Norwegian car registration numbers. |
GitHub repositories
This package is not used by any popular GitHub repositories.
-
1.0.0: Initial.
1.1.0: Custom constructor
2.0.0: Struct based value types
2.0.1: Remove some warnings
3.0.0: Clean and Validation no longer partial methods
3.0.1: Proper hash code for string based value types (same value gets same hash code)
4.0.0: Shared types (attributes, interfaces, converters, Helper) moved to Skaar.ValueType.Abstractions.dll shipped in the package, instead of being generated into each assembly. Fixes CS0436 when several assemblies use the generator.