NCode.PropertyBag.Abstractions 2.1.0

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

NCode.PropertyBag.Abstractions

CI Coverage Target framework License

The interfaces and strongly typed keys of NCode.PropertyBag: IPropertyBag, IReadOnlyPropertyBag, IPropertyBagScope, PropertyBagKey<T> and the extensions that name a key after its variable. Reference this package from a library that accepts or reads a property bag; the application references NCode.PropertyBag, which creates them.

Installation

dotnet add package NCode.PropertyBag.Abstractions

The target frameworks are the ones the package's .csproj declares; they are listed on nuget.org's Frameworks tab and shown by the badge above. CHANGELOG.md records when a framework is added or dropped and which release line to stay on.

Example

A library defines its keys once and reads and writes through the interfaces:

using NCode.PropertyBag;

public static class UserKeys
{
    public static readonly PropertyBagKey<string> UserName = new("UserName");
    public static readonly PropertyBagKey<int> UserAge = new("UserAge");
}
using NCode.PropertyBag;

public static class ConnectionSettings
{
    public static void Save(IPropertyBag propertyBag, string connectionString, TimeSpan timeout)
    {
        // The keys are named "connectionString" and "timeout", after the arguments.
        propertyBag.SetValue(connectionString).SetValue(timeout);
    }

    public static string? LoadConnectionString(IReadOnlyPropertyBag propertyBag)
    {
        // Declare the variable first: an inline `out string? connectionString` would name
        // the key "string? connectionString".
        string? connectionString;
        return propertyBag.TryGetValue(out connectionString) ? connectionString : null;
    }
}

Learn more

Product Compatible and additional computed target framework versions.
.NET 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. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
  • net10.0

    • No dependencies.

NuGet packages (28)

Showing the top 5 NuGet packages that depend on NCode.PropertyBag.Abstractions:

Package Downloads
NCode.PropertyBag

Strongly typed property bags for .NET: store and read values by type-safe keys, override a value for a scope, clone a bag, and create bags through Microsoft.Extensions.DependencyInjection.

NCode.Identity.Jwt.Abstractions

Package Description

NCode.Identity.OpenId.Abstractions

Package Description

NCode.Identity.OpenId.Accounts.Abstractions

Package Description

NCode.Identity.OpenId.Authentication.Abstractions

Package Description

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
2.1.0 0 11/20/2026
2.0.2 0 11/20/2026
2.0.1 46 11/20/2026
2.0.0 75 11/20/2026
1.2.0 3,392 1/19/2026
1.1.1 163 1/19/2026
1.1.0 154 1/19/2026
1.0.1 150 1/19/2026
1.0.0 151 1/19/2026