![]() |
VOOZH | about |
dotnet add package Redpoint.ProgressMonitor --version 2026.1169.464
NuGet\Install-Package Redpoint.ProgressMonitor -Version 2026.1169.464
<PackageReference Include="Redpoint.ProgressMonitor" Version="2026.1169.464" />
<PackageVersion Include="Redpoint.ProgressMonitor" Version="2026.1169.464" />Directory.Packages.props
<PackageReference Include="Redpoint.ProgressMonitor" />Project file
paket add Redpoint.ProgressMonitor --version 2026.1169.464
#r "nuget: Redpoint.ProgressMonitor, 2026.1169.464"
#:package Redpoint.ProgressMonitor@2026.1169.464
#addin nuget:?package=Redpoint.ProgressMonitor&version=2026.1169.464Install as a Cake Addin
#tool nuget:?package=Redpoint.ProgressMonitor&version=2026.1169.464Install as a Cake Tool
This library provides APIs for monitoring and reporting the progress of arbitrary operations in console applications.
Read on for the following examples:
You can monitor an operation that uses a stream like so:
// Inject these services.
IProgressFactory _progressFactory;
IMonitorFactory _monitorFactory;
using (var stream = new FileStream(...))
{
// Start monitoring.
var cts = new CancellationTokenSource();
var progress = _progressFactory.CreateProgressForStream(stream);
var monitorTask = Task.Run(async () =>
{
var monitor = _monitorFactory.CreateByteBasedMonitor();
await monitor.MonitorAsync(
progress,
SystemConsole.ConsoleInformation,
SystemConsole.WriteProgressToConsole,
cts.Token);
});
// e.g. hash the stream.
byte[] hashBytes;
using (var hasher = SHA256.Create())
{
hashBytes = await hasher.ComputeHashAsync(stream);
}
// Stop monitoring.
await SystemConsole.CancelAndWaitForConsoleMonitoringTaskAsync(monitorTask, cts);
}
If you're reporting progress on a HTTP stream, there's a few extra things to keep in mind:
HttpCompletionOption.ResponseHeadersRead as the completion option, or HttpClient will buffer the entire response by default.PositionAwareStream, which is a class provided by this library. Since the underlying HTTP stream
does not support Position or Length, this wrapping stream tracks the position as the stream is read from and allows the length to be passed in
as a constructor parameter (which you should set based on the Content-Length header).Below is a concise example of how to show the progress of downloading a file:
using (var client = new HttpClient())
{
using (var target = new FileStream(targetPath, FileMode.Create, FileAccess.Write, FileShare.None))
{
var response = await client.GetAsync(downloadUrl, HttpCompletionOption.ResponseHeadersRead);
using (var stream = new PositionAwareStream(
await response.Content.ReadAsStreamAsync(),
response.Content.Headers.ContentLength!.Value))
{
var cts = new CancellationTokenSource();
var progress = _progressFactory.CreateProgressForStream(stream);
var monitorTask = Task.Run(async () =>
{
var monitor = _monitorFactory.CreateByteBasedMonitor();
await monitor.MonitorAsync(
progress,
SystemConsole.ConsoleInformation,
SystemConsole.WriteProgressToConsole,
cts.Token);
});
await stream.CopyToAsync(target);
await SystemConsole.CancelAndWaitForConsoleMonitoringTaskAsync(monitorTask, cts);
}
}
}
The SystemConsole type provides common values for monitoring parameters, such as the current console information and rendering progress information to the console. You should replace the static values in the examples above with your own callbacks and values if you're not rendering progress to the console.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net10.0 net10.0 is compatible. net10.0-android net10.0-android was computed. net10.0-browser net10.0-browser was computed. net10.0-ios net10.0-ios was computed. net10.0-maccatalyst net10.0-maccatalyst was computed. net10.0-macos net10.0-macos was computed. net10.0-tvos net10.0-tvos was computed. net10.0-windows net10.0-windows was computed. |
Showing the top 1 NuGet packages that depend on Redpoint.ProgressMonitor:
| Package | Downloads |
|---|---|
|
Redpoint.PackageManagement
Provides APIs for installing, upgrading and uninstalling packages with WinGet and Homebrew. |
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 2026.1169.464 | 0 | 6/18/2026 |
| 2026.1169.426 | 0 | 6/18/2026 |
| 2026.1169.413 | 0 | 6/18/2026 |
| 2026.1169.196 | 0 | 6/18/2026 |
| 2026.1161.947 | 101 | 6/10/2026 |
| 2026.1159.820 | 114 | 6/8/2026 |
| 2026.1159.804 | 112 | 6/8/2026 |
| 2026.1159.544 | 115 | 6/8/2026 |
| 2026.1159.510 | 113 | 6/8/2026 |
| 2026.1154.870 | 118 | 6/3/2026 |
| 2026.1154.811 | 112 | 6/3/2026 |
| 2026.1154.803 | 106 | 6/3/2026 |
| 2026.1154.686 | 114 | 6/3/2026 |
| 2026.1154.457 | 117 | 6/3/2026 |
| 2026.1153.1025 | 114 | 6/2/2026 |
| 2026.1153.1010 | 118 | 6/2/2026 |
| 2026.1153.988 | 117 | 6/2/2026 |
| 2026.1153.959 | 118 | 6/2/2026 |
| 2026.1153.916 | 116 | 6/2/2026 |
| 2026.1153.661 | 120 | 6/2/2026 |