CShells.Abstractions 0.0.30

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

CShells.Abstractions

Core abstractions and interfaces for building shell features without dependencies on the full CShells framework.

Purpose

This package contains the fundamental interfaces and models needed to build CShells features. By referencing only this package in your feature libraries, you avoid pulling in the entire CShells runtime and its dependencies.

When to Use

  • Building feature libraries that will be consumed by CShells applications
  • Creating reusable features without coupling to the full framework
  • Keeping feature library dependencies minimal

Key Types

  • IShellFeature - Base interface for defining features that register services
  • ShellSettings - Configuration model for shell settings
  • IShellInitializer - Startup hook resolved from the shell provider before a shell becomes active
  • ISettledShellRegistry - Optional nonactivating observation of the current generation after activation settlement
  • IShellGenerationBuildParticipant and IShellGenerationBuildLease - Optional host-owned protection tied to one shell build and its selected feature-catalog snapshot
  • ShellActivationAttempt and ShellActivationAttemptState - Transient attempt and safe target-snapshot diagnostics, including returned and verified generation values
  • LifecyclePhase, LifecycleOrderAttribute, and AddShellInitializer<T>() - First-class initializer ordering APIs
  • IDrainHandler - Cooperative drain hook invoked in parallel while an old shell generation shuts down
  • Core abstractions for extensibility

Installation

dotnet add package CShells.Abstractions

Example Usage

using CShells.Features;
using CShells.Lifecycle;
using Microsoft.Extensions.DependencyInjection;

[ShellFeature("MyFeature")]
public class MyFeature : IShellFeature
{
    public void ConfigureServices(IServiceCollection services)
    {
        services.AddSingleton<IMyService, MyService>();
        services.AddShellInitializer<MyFeatureInitializer>(
            LifecyclePhase.Prepare,
            order: 100);
    }
}

AddShellInitializer<T>() registers the initializer as transient (unless you have already registered it yourself, in which case your lifetime is preserved) and attaches deterministic phase/order metadata. Existing direct IShellInitializer registrations remain valid and run in LifecyclePhase.Default using DI registration order.

Hosts that protect runtime feature assemblies or related resources can register an IShellGenerationBuildParticipant in the root container. CShells reserves the generation identity and immutable blueprint metadata before composition, then calls participants in root registration order after composition/name validation and before feature-catalog initialization or access. Each returned lease receives the exact detailed RuntimeFeatureCatalogSnapshot selected for that build before feature construction begins. Successful callback fan-out is sequential; when a callback fails, later callbacks are skipped and all acquired leases are unwound. A participant that throws before returning a lease is responsible for cleaning up its own partial acquisition.

Leases belong to the attempted generation. For a published shell, CShells releases them in reverse order only after the Disposed notification and complete shell-provider teardown succeed. Failed builds and unpublished initializer candidates unwind their leases after partial provider cleanup. If lifecycle/provider cleanup fails, or an individual lease cannot release, CShells keeps unresolved leases alive for the root registry lifetime without retaining the shell or provider. Callbacks for different shell names may run concurrently. A callback must not reenter activation, reload, or unregister for the same shell name. This API coordinates protection lifetime; it does not itself unload assemblies or delete package files.

ISettledShellRegistry is a separate optional lifecycle capability. The built-in registry implements it on the same object as IShellRegistry; cast the existing registry and distinguish an unsupported implementation from a supported query returning null. GetSettledActive(name) is synchronous and nonactivating. It returns only the current generation after activation settlement, returns null during a provisional replacement rather than substituting a historical generation, and does not grant a use lease or future-lifetime guarantee. Completion callback failures remain diagnostic-only, and existing routing visibility is unchanged.

IRuntimeFeatureCatalogCommitSource is an optional capability for observing committed catalog snapshots. Resolve the configured IRuntimeFeatureCatalog, then capability-test that instance; custom implementations do not need to add this interface. Subscribe before initialization to observe the initial commit. Subscriptions do not replay past commits, so when subscribing to an already active catalog, subscribe first and then read CurrentSnapshot to reconcile. A refresh can commit during that read, so compare generations to avoid missing or processing a generation twice.

if (catalog is IRuntimeFeatureCatalogCommitSource commits)
{
    commits.SnapshotCommitted += snapshot => queueReconciliation(snapshot);
}

The event carries the exact detailed RuntimeFeatureCatalogSnapshot, including its generation. Notifications run synchronously outside the refresh lock, in commit order, and subscriber exceptions are isolated. Keep handlers quick and enqueue expensive work elsewhere. Concurrent refreshes can advance CurrentSnapshot beyond the generation currently being delivered.

Learn More

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 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. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages (11)

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

Package Downloads
Elsa.Features

Provides utilities to turn your class library into a module that provides features.

CShells.AspNetCore.Abstractions

ASP.NET Core abstractions for CShells. Contains interfaces and models for building web shell features without dependencies on the full CShells framework. Reference this package in your ASP.NET Core feature libraries.

CShells.FastEndpoints.Abstractions

FastEndpoints abstractions for CShells. Contains interfaces for integrating FastEndpoints with shell features. Reference this package when building shell features that expose FastEndpoints.

CShells

A modular multi-tenancy framework for .NET that enables building feature-based applications with isolated services, configuration, and background workers. Organize functionality into features and modules, with runtime resolution of tenant contexts (shells) for true multi-tenant isolation.

Elsa.Scheduling.Quartz

Provides integration with the Quartz.NET library and provide am implementation of Elsa's IJobScheduler using Quartz.NET.

GitHub repositories (1)

Showing the top 1 popular GitHub repositories that depend on CShells.Abstractions:

Repository Stars
elsa-workflows/elsa-core
The Workflow Engine for .NET
Version Downloads Last Updated
0.0.30 59 10/10/2026
0.0.29 355 9/19/2026
0.0.28 62,967 6/12/2026
0.0.27 303 6/12/2026
0.0.26 302 6/12/2026
0.0.25 289 6/11/2026
0.0.24 3,551 5/15/2026
0.0.23 266 5/15/2026
0.0.22 267 5/14/2026
0.0.21 30,982 5/12/2026
0.0.20 341 5/8/2026
0.0.19 273 5/6/2026
0.0.18 297 5/2/2026
0.0.17 260 4/29/2026
0.0.16 272 4/27/2026
0.0.15 249 4/27/2026
0.0.14 231,070 4/20/2026
0.0.13 252 4/17/2026
0.0.12 553 3/16/2026
0.0.11 591 2/28/2026
Loading failed