Pure.Primitives.Abstractions 4.4.0

dotnet add package Pure.Primitives.Abstractions --version 4.4.0
                    
NuGet\Install-Package Pure.Primitives.Abstractions -Version 4.4.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="Pure.Primitives.Abstractions" Version="4.4.0" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Pure.Primitives.Abstractions" Version="4.4.0" />
                    
Directory.Packages.props
<PackageReference Include="Pure.Primitives.Abstractions" />
                    
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 Pure.Primitives.Abstractions --version 4.4.0
                    
#r "nuget: Pure.Primitives.Abstractions, 4.4.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.
#:package Pure.Primitives.Abstractions@4.4.0
                    
#: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=Pure.Primitives.Abstractions&version=4.4.0
                    
Install as a Cake Addin
#tool nuget:?package=Pure.Primitives.Abstractions&version=4.4.0
                    
Install as a Cake Tool

Pure.Primitives.Abstractions

Base interfaces for the Pure ecosystem — immutable, composable abstractions over .NET primitive types.

.NET build & test Platforms compatibility check Build and Deploy NuGet License: MIT

Overview

Pure.Primitives.Abstractions defines a set of minimal, read-only interfaces that represent primitive values. Each interface exposes only a getter — no mutation, no side effects. Complex types are built by composing simpler ones.

Interfaces

Interface Namespace Description
IBool Pure.Primitives.Abstractions.Bool Boolean value
IChar Pure.Primitives.Abstractions.Char Single character
IString Pure.Primitives.Abstractions.String String value; implements IEnumerable<IChar>
INumber<T> Pure.Primitives.Abstractions.Number Generic numeric value; T : INumber<T>
IDate Pure.Primitives.Abstractions.Date Date (day, month, year via INumber<ushort>)
ITime Pure.Primitives.Abstractions.Time Time (hour, minute, second, millisecond, microsecond, nanosecond)
IDateTime Pure.Primitives.Abstractions.DateTime Composition of IDate and ITime
IDayOfWeek Pure.Primitives.Abstractions.DayOfWeek Day of week as a numeric value
IGuid Pure.Primitives.Abstractions.Guid GUID value

Design Principles

  • Immutable — all interfaces expose only get properties; no setters, no methods that mutate state.
  • Composable — complex types inherit from simpler ones (IDateTime : IDate, ITime; IString : IEnumerable<IChar>).
  • Generic — INumber<T> is covariant (out T) and constrained to System.Numerics.INumber<T>, supporting any numeric type.
  • AOT-compatible — the library is fully compatible with Native AOT compilation.

Target Frameworks

  • .NET 7
  • .NET 8
  • .NET 9
  • .NET 10
  • .NET 11

Installation

dotnet add package Pure.Primitives.Abstractions

Usage

Implement any interface to model an immutable primitive in your domain:

using Pure.Primitives.Abstractions.Number;

public sealed class Age : INumber<ushort>
{
    public Age(ushort value) => NumberValue = value;
    public ushort NumberValue { get; }
}

Compose interfaces to build richer types:

using Pure.Primitives.Abstractions.DateTime;

public sealed class BirthDateTime : IDateTime
{
    // implement IDate and ITime members
}
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 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 is compatible.  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 is compatible.  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.  net11.0 is compatible. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
  • net10.0

    • No dependencies.
  • net11.0

    • No dependencies.
  • net7.0

    • No dependencies.
  • net8.0

    • No dependencies.
  • net9.0

    • No dependencies.

NuGet packages (25)

Showing the top 5 NuGet packages that depend on Pure.Primitives.Abstractions:

Package Downloads
Pure.Primitives

Package Description

Pure.RelationalSchema.Abstractions

Package Description

Pure.HashCodes

Package Description

Pure.RelationalSchema.Storage

Package Description

Pure.Chart.RelationalModel.Abstractions

Package Description

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
4.4.0 1,460 11/11/2026
4.3.0 28,813 11/13/2025
4.2.0 1,422 11/7/2025
4.1.0 3,214 10/31/2025
4.0.11 4,690 9/3/2025
4.0.10 681 9/1/2025
4.0.9 324 9/1/2025
4.0.8 2,877 8/22/2025
4.0.7 474 8/18/2025
4.0.6 2,435 6/19/2025
4.0.5 431 6/17/2025
4.0.4 501 6/13/2025
4.0.3 519 6/12/2025
4.0.2 6,017 6/10/2025
4.0.1 1,654 6/2/2025
4.0.0 331 5/31/2025
3.0.1 393 5/29/2025
3.0.0 437 5/28/2025
2.0.0 301 5/27/2025
1.0.0 864 5/26/2025
Loading failed