Soenneker.Hangfire.ProgressFactory 4.0.693

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

alternate text is missing from this package README image alternate text is missing from this package README image alternate text is missing from this package README image alternate text is missing from this package README image alternate text is missing from this package README image

Soenneker.Hangfire.ProgressFactory

Turns an expected item count into percentage updates for a Hangfire.Console progress bar. Progress state is isolated per async job execution so the singleton service can be used by concurrent jobs.

Installation

dotnet add package Soenneker.Hangfire.ProgressFactory

Registration

using Soenneker.Hangfire.ProgressFactory.Registrars;

services.AddProgressFactoryAsSingleton();

This also registers the Hangfire.Console progress-bar services required by the factory.

Usage in a job

using Soenneker.Hangfire.ProgressFactory.Abstract;

public sealed class ImportJob(IProgressFactory progress)
{
    public async Task Run(IReadOnlyList<ImportItem> items, CancellationToken cancellationToken)
    {
        progress.Init(items.Count);

        foreach (ImportItem item in items)
        {
            await Import(item, cancellationToken);
            progress.Increment();
        }
    }
}

Each Increment() advances by 100 / count, caps the reported value at 100, and ignores increments after completion. Initializing with zero items immediately reports 100. Calling Increment() before Init() throws InvalidOperationException.

Initialize once for each job execution. If work is fanned out to parallel tasks within one job, increments share a synchronized progress state.

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

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
4.0.693 43 9/4/2026
4.0.692 41 9/4/2026
4.0.691 43 9/4/2026
4.0.690 101 8/30/2026
4.0.689 94 8/29/2026
4.0.688 90 8/29/2026
4.0.687 86 8/29/2026
4.0.686 498 7/28/2026
4.0.685 169 7/16/2026
4.0.684 526 6/22/2026
4.0.683 1,255 6/18/2026
4.0.681 126 6/17/2026
4.0.680 166 6/17/2026
4.0.679 282 6/5/2026
4.0.678 117 6/5/2026
4.0.677 527 4/22/2026
4.0.676 165 3/12/2026
4.0.675 150 3/12/2026
4.0.673 142 3/12/2026
4.0.672 143 3/10/2026
Loading failed

Add interface inheritdoc references