KeyInteractive.Common 2.1.0

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

Key Interactive.Common

KeyInteractive.Common is a small, generic, framework-agnostic package of helpers shared across Key Interactive projects. It has no dependencies on ASP.NET, HTTP, or any particular API — it's the base of the KeyInteractive.Common.* package chain:

  • KeyInteractive.Common (this package) — generic helpers, no API-related concerns.
  • KeyInteractive.Common.Api — generic plumbing to consume Key Interactive-style APIs (response envelope, retry, JWT handling).
  • KeyInteractive.Common.Api.Users — the official client for the Key Interactive Users API ("Key Interactive Accounts").

What's in it today

  • State (KeyInteractive.Common.Classes) — a country, with its display name, ISO-3166-1 alpha-2 code, and international dialing prefix. State.StatesList() returns the full, hardcoded list of countries.
  • EState (KeyInteractive.Common.Enums) — the same list of countries as an enum, one member per ISO-3166-1 alpha-2 code, with the English display name attached via [Description].

Note: State and EState deliberately duplicate the same country data in two different shapes (a class list vs. an enum) — this mirrors how the data was already used across Key Interactive sites before this package existed, and is kept as-is rather than silently merged into one shape.

This package is expected to grow over time as more generic, non-API-specific helpers are identified across projects.

Requirements

Targets .NET 8.0 or later (net8.0, net10.0).

Installation

dotnet add package KeyInteractive.Common

Usage

using KeyInteractive.Common.Classes;
using KeyInteractive.Common.Enums;

// As a flat list of objects:
foreach (var state in State.StatesList())
{
    Console.WriteLine($"{state.Name} ({state.Code}) {state.PhonePrefix}");
}

// As an enum, with the display name from [Description]:
var country = EState.IT;
var name = typeof(EState)
    .GetMember(country.ToString())[0]
    .GetCustomAttributes(typeof(DescriptionAttribute), false)
    .Cast<DescriptionAttribute>()
    .First()
    .Description; // "Italy"
Product 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 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.
  • net8.0

    • No dependencies.

NuGet packages (1)

Showing the top 1 NuGet packages that depend on KeyInteractive.Common:

Package Downloads
KeyInteractive.Common.Api

Generic plumbing to consume Key Interactive-style APIs: response envelope (KiApiResponse), JWT + refresh token handling, retry policy, and an abstract KiApiConsumerBase to build per-API clients from.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
2.1.0 404 8/10/2026
2.0.0 113 8/10/2026