Josupeit.Practices.Services.Abstractions
1.0.6
Prefix Reserved
dotnet add package Josupeit.Practices.Services.Abstractions --version 1.0.6
NuGet\Install-Package Josupeit.Practices.Services.Abstractions -Version 1.0.6
<PackageReference Include="Josupeit.Practices.Services.Abstractions" Version="1.0.6" />
<PackageVersion Include="Josupeit.Practices.Services.Abstractions" Version="1.0.6" />
<PackageReference Include="Josupeit.Practices.Services.Abstractions" />
paket add Josupeit.Practices.Services.Abstractions --version 1.0.6
#r "nuget: Josupeit.Practices.Services.Abstractions, 1.0.6"
#:package Josupeit.Practices.Services.Abstractions@1.0.6
#addin nuget:?package=Josupeit.Practices.Services.Abstractions&version=1.0.6
#tool nuget:?package=Josupeit.Practices.Services.Abstractions&version=1.0.6
Josupeit.Practices.Services.Abstractions
Background services tend to share the same lifecycle: they start, optionally pause and resume, and eventually stop. This package captures that lifecycle as a pair of interfaces — one synchronous, one asynchronous — so that the rest of your application can control a service without knowing anything about its concrete implementation.
dotnet add package Josupeit.Practices.Services.Abstractions
The lifecycle
A service always begins in the Stopped state and transitions through the following states:
Stopped → Starting → Running → Stopping → Stopped
↘ Pausing → Paused → Resuming → Running
The ServiceState enum exposes every one of these states, which makes it straightforward to reflect the current status in a UI or to write guards in the service implementation itself.
IService — synchronous lifecycle
public interface IService
{
ServiceState State { get; }
void Start();
void Stop();
// Pause and Resume throw NotSupportedException when the implementation does not support pausing.
void Pause();
void Resume();
}
IAsyncService — asynchronous lifecycle
IAsyncService mirrors IService exactly, but every operation returns a Task. Each method is available in two overloads — one without a CancellationToken and one with — so callers can choose the level of control they need.
Task StartAsync();
Task StartAsync(CancellationToken cancellationToken);
Task StopAsync();
Task StopAsync(CancellationToken cancellationToken);
Task PauseAsync();
Task PauseAsync(CancellationToken cancellationToken);
Task ResumeAsync();
Task ResumeAsync(CancellationToken cancellationToken);
When to use this package directly
Reference Josupeit.Practices.Services.Abstractions in any layer that needs to start, stop, or observe a service but should not depend on how it is implemented. For the concrete base classes that manage state transitions for you, install Josupeit.Practices.Services instead.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net5.0 was computed. net5.0-windows was computed. net6.0 was computed. net6.0-android was computed. net6.0-ios was computed. net6.0-maccatalyst was computed. net6.0-macos was computed. net6.0-tvos was computed. net6.0-windows was computed. net7.0 was computed. net7.0-android was computed. net7.0-ios was computed. net7.0-maccatalyst was computed. net7.0-macos was computed. net7.0-tvos was computed. net7.0-windows was computed. net8.0 was computed. 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 was computed. 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. |
| .NET Core | netcoreapp2.0 was computed. netcoreapp2.1 was computed. netcoreapp2.2 was computed. netcoreapp3.0 was computed. netcoreapp3.1 was computed. |
| .NET Standard | netstandard2.0 is compatible. netstandard2.1 was computed. |
| .NET Framework | net461 was computed. net462 was computed. net463 was computed. net47 was computed. net471 was computed. net472 was computed. net48 was computed. net481 was computed. |
| MonoAndroid | monoandroid was computed. |
| MonoMac | monomac was computed. |
| MonoTouch | monotouch was computed. |
| Tizen | tizen40 was computed. tizen60 was computed. |
| Xamarin.iOS | xamarinios was computed. |
| Xamarin.Mac | xamarinmac was computed. |
| Xamarin.TVOS | xamarintvos was computed. |
| Xamarin.WatchOS | xamarinwatchos was computed. |
-
.NETStandard 2.0
- No dependencies.
NuGet packages (2)
Showing the top 2 NuGet packages that depend on Josupeit.Practices.Services.Abstractions:
| Package | Downloads |
|---|---|
|
Josupeit.Practices.Schedulers.Abstractions
IScheduler abstraction for decoupling work submission from execution strategy. Covers sync and async actions, functions, and cancellable variants across three scheduling families. |
|
|
Josupeit.Practices.Services
Background service lifecycle base classes with validated state transitions and optional pause support. Sync and async variants, with IDisposable and IAsyncDisposable combinations. |
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 1.0.6 | 393 | 3/10/2026 |
- Fixes invalid NuGet dependency version ranges that prevented package push