Lifter.Core
2.0.1
dotnet add package Lifter.Core --version 2.0.1
NuGet\Install-Package Lifter.Core -Version 2.0.1
<PackageReference Include="Lifter.Core" Version="2.0.1" />
<PackageVersion Include="Lifter.Core" Version="2.0.1" />
<PackageReference Include="Lifter.Core" />
paket add Lifter.Core --version 2.0.1
#r "nuget: Lifter.Core, 2.0.1"
#:package Lifter.Core@2.0.1
#addin nuget:?package=Lifter.Core&version=2.0.1
#tool nuget:?package=Lifter.Core&version=2.0.1
Lifter.Core
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, orLifter.Blazor. Install directly only for custom integrations.
Features
- HostManager — Manages
IHostedServicelifecycle (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 | Versions 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. |
-
net10.0
- Microsoft.Extensions.DependencyInjection.Abstractions (>= 10.0.7)
- Microsoft.Extensions.Hosting.Abstractions (>= 10.0.7)
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.
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.