Lifter.Core 2.0.1

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

Lifter.Core

NuGet License: MIT

Platform-agnostic core library for the Lifter ecosystem. Provides the HostManager, the advanced WatchDog service, and the IDialogService abstraction layer used by all Lifter platform packages.

Typically installed automatically as a dependency of Lifter.Maui, Lifter.Avalonia, or Lifter.Blazor. Install directly only for custom integrations.


Features

  • HostManager — Manages IHostedService lifecycle (start / stop) tied to your app
  • WatchDog — Advanced service monitoring with startup/restart policies and real-time status events
  • IDialogService — Cross-platform dialog abstraction (ShowMessageAsync, ShowConfirmAsync, ShowAsync)
  • NullDialogService — No-op implementation for testing and default registrations

IDialogService

using Lifter.Core.Dialog;

public class MyViewModel(IDialogService dialogs)
{
    public async Task DeleteAsync()
    {
        var result = await dialogs.ShowConfirmAsync(
            "Delete item",
            "Are you sure you want to delete this item?",
            new DialogOptions { ButtonSet = DialogButtonSet.YesNo });

        if (result.Confirmed)
        {
            // proceed
        }
    }
}

DialogResult values

Property Button Confirmed
DialogResult.Ok Ok true
DialogResult.Yes Yes true
DialogResult.Cancel Cancel false
DialogResult.No No false
DialogResult.Close Close false
DialogResult.None None false

WatchDog

using Lifter.Core;
using Lifter.Core.WatchDog;

// Register
services.AddLifterWatchDog();
services.AddHostedServiceWithPolicies<MyService>(options =>
{
    options.Startup = StartupPolicy.Automatic;
    options.Restart = RestartPolicy.OnFailure;
    options.MaxRestartAttempts = 5;
});

// Control
public class MyViewModel(IHostManagerWatchDog watchDog)
{
    public Task StopAsync() => watchDog.StopServiceAsync(typeof(MyService));
    public HostedServiceState State => watchDog.GetStatus(typeof(MyService));
}

Documentation

Full documentation at lucafabbri.github.io/Lifter.

Platform packages

Package Description
Lifter.Avalonia Avalonia UI 12 — HostedApplication + AvaloniaDialogService
Lifter.Blazor Blazor WebAssembly — LifterHost component + BlazorDialogService
Lifter.Maui .NET MAUI — lifecycle integration + MauiDialogService
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.

NuGet packages (3)

Showing the top 3 NuGet packages that depend on Lifter.Core:

Package Downloads
Lifter.Avalonia

Avalonia UI 12 integration for Lifter. Provides HostedApplication base class with DI, configuration, IHostedService lifecycle, and AvaloniaDialogService with full virtual override points.

Lifter.Blazor

Blazor WebAssembly integration for Lifter. Provides IHostedService lifecycle management via the LifterHost component and BlazorDialogService using JS interop (alert/confirm).

Lifter.Maui

.NET MAUI integration for Lifter. This package enables IHostedService support in .NET MAUI applications, allowing for long-running background tasks managed by the app lifecycle.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
2.0.1 115 5/9/2026
2.0.0 128 5/9/2026
1.1.0 280 1/15/2026

v2.0.1: Added NuGet README files for all packages. v2.0.0: Migrated to .NET 10; added IDialogService abstraction with NullDialogService, DialogResult, DialogButton, DialogButtonSet, DialogOptions.