Redpoint.ProgressMonitor 2025.1287.213

Prefix Reserved
There is a newer version of this package available.
See the version list below for details.
dotnet add package Redpoint.ProgressMonitor --version 2025.1287.213
                    
NuGet\Install-Package Redpoint.ProgressMonitor -Version 2025.1287.213
                    
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="Redpoint.ProgressMonitor" Version="2025.1287.213" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Redpoint.ProgressMonitor" Version="2025.1287.213" />
                    
Directory.Packages.props
<PackageReference Include="Redpoint.ProgressMonitor" />
                    
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 Redpoint.ProgressMonitor --version 2025.1287.213
                    
#r "nuget: Redpoint.ProgressMonitor, 2025.1287.213"
                    
#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 Redpoint.ProgressMonitor@2025.1287.213
                    
#: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=Redpoint.ProgressMonitor&version=2025.1287.213
                    
Install as a Cake Addin
#tool nuget:?package=Redpoint.ProgressMonitor&version=2025.1287.213
                    
Install as a Cake Tool

Redpoint.ProgressMonitor

This library provides APIs for monitoring and reporting the progress of arbitrary operations in console applications.

Read on for the following examples:

Example for a generic stream

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);
}

Example for a HTTP download

If you're reporting progress on a HTTP stream, there's a few extra things to keep in mind:

  • You need to pass HttpCompletionOption.ResponseHeadersRead as the completion option, or HttpClient will buffer the entire response by default.
  • You need to wrap the stream you read from in 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 static class

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 Compatible and additional computed target framework versions.
.NET net9.0 is compatible.  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. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages (1)

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.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
2025.1289.355 175 10/16/2025
2025.1288.1067 174 10/15/2025
2025.1288.939 172 10/15/2025
2025.1288.731 171 10/15/2025
2025.1288.643 182 10/15/2025
2025.1288.584 182 10/15/2025
2025.1287.261 188 10/14/2025
2025.1287.213 175 10/14/2025
2025.1286.369 192 10/13/2025
2025.1276.372 168 10/3/2025
2025.1253.415 194 9/10/2025
2025.1251.740 178 9/8/2025
2025.1249.408 125 9/6/2025
2025.1245.159 192 9/2/2025
2025.1241.1004 218 8/29/2025
2025.1241.337 233 8/29/2025
2025.1241.335 235 8/29/2025
2025.1239.82 235 8/27/2025
2025.1236.697 226 8/24/2025
2025.1235.897 120 8/23/2025
2025.1234.740 144 8/22/2025
2025.1234.625 151 8/22/2025
2025.1234.484 155 8/22/2025
2025.1234.426 162 8/22/2025
2025.1234.329 166 8/22/2025
2025.1234.304 169 8/22/2025
2025.1234.279 172 8/22/2025
2025.1234.210 176 8/22/2025
2025.1234.185 168 8/22/2025
2025.1234.108 184 8/22/2025
2025.1234.70 182 8/22/2025
2025.1233.957 188 8/21/2025
2025.1233.933 186 8/21/2025
2025.1233.915 185 8/21/2025
2025.1233.885 171 8/21/2025
2025.1233.764 191 8/21/2025
2025.1233.694 186 8/21/2025
2025.1233.677 189 8/21/2025
2025.1233.212 186 8/21/2025
2025.1233.74 179 8/21/2025
2025.1233.72 181 8/21/2025
2025.1233.28 180 8/21/2025
2025.1232.155 188 8/20/2025
2025.1232.154 182 8/20/2025
2025.1232.104 180 8/20/2025
2025.1232.102 183 8/20/2025
2025.1231.1026 188 8/19/2025
2025.1231.941 191 8/19/2025
2025.1231.499 179 8/19/2025
2025.1231.484 185 8/19/2025
2025.1231.297 184 8/19/2025
2025.1230.859 184 8/18/2025
2025.1228.220 119 8/16/2025
2025.1227.934 147 8/15/2025
2025.1227.904 143 8/15/2025
2025.1227.852 142 8/15/2025
2025.1227.816 149 8/15/2025
2025.1227.77 183 8/15/2025
2025.1226.857 192 8/14/2025
2025.1226.472 194 8/14/2025
2025.1226.163 196 8/14/2025
2025.1222.583 193 8/10/2025
2025.1222.562 191 8/10/2025
2025.1222.437 191 8/10/2025
2025.1222.425 177 8/10/2025
2025.1220.271 254 8/8/2025
2025.1220.225 251 8/8/2025
2025.1220.80 261 8/8/2025
2025.1219.568 265 8/7/2025
2025.1219.546 269 8/7/2025
2025.1219.514 264 8/7/2025
2025.1219.513 260 8/7/2025
2025.1219.511 258 8/7/2025
2025.1219.421 267 8/7/2025
2025.1219.377 265 8/7/2025
2025.1219.362 267 8/7/2025
2025.1219.361 263 8/7/2025
2025.1218.1281 267 8/6/2025
2025.1218.1266 263 8/6/2025
2025.1218.1264 271 8/6/2025
2025.1218.1255 267 8/6/2025
2025.1218.1223 268 8/6/2025
2025.1218.1180 263 8/6/2025
2025.1218.1166 260 8/6/2025
2025.1218.1154 263 8/6/2025
2025.1218.1088 271 8/6/2025
2025.1218.595 264 8/6/2025
2025.1218.554 267 8/6/2025
2025.1218.544 264 8/6/2025
2025.1218.523 268 8/6/2025
2025.1218.499 270 8/6/2025
2025.1218.427 272 8/6/2025
2025.1218.415 265 8/6/2025
2025.1218.187 269 8/6/2025
2025.1218.174 266 8/6/2025
2025.1218.148 268 8/6/2025
2025.1218.123 263 8/6/2025
2025.1217.886 269 8/5/2025
2025.1217.560 267 8/5/2025
2025.1217.516 271 8/5/2025
2025.1217.512 274 8/5/2025
2025.1217.503 275 8/5/2025
2025.1216.1103 232 8/4/2025
2025.1216.1025 228 8/4/2025
2025.1216.978 208 8/4/2025
2025.1216.897 206 8/4/2025
2025.1216.893 204 8/4/2025
2025.1216.884 208 8/4/2025
2025.1216.873 203 8/4/2025
2025.1216.824 206 8/4/2025
2025.1216.767 206 8/4/2025
2025.1216.745 211 8/4/2025
2025.1216.411 185 8/4/2025
2025.1216.396 185 8/4/2025
2025.1216.386 188 8/4/2025
2025.1216.357 184 8/4/2025
2025.1216.347 182 8/4/2025
2025.1216.334 188 8/4/2025
2025.1216.319 180 8/4/2025
2025.1215.930 150 8/3/2025
2025.1215.928 152 8/3/2025
2025.1215.911 155 8/3/2025
2025.1215.892 153 8/3/2025
2025.1215.842 152 8/3/2025
2025.1209.1064 149 7/28/2025
2025.1209.1061 142 7/28/2025
2025.1209.1047 147 7/28/2025
2025.1209.1038 152 7/28/2025
2025.1209.1034 148 7/28/2025
2025.1209.948 153 7/28/2025
2025.1209.881 158 7/28/2025
2025.1209.773 166 7/28/2025
2025.1209.765 156 7/28/2025
2025.1209.758 157 7/28/2025
2025.1209.727 161 7/28/2025
2025.1209.658 161 7/28/2025
2025.1209.300 156 7/28/2025
2025.1209.284 160 7/28/2025
2025.1209.264 157 7/28/2025
2025.1209.227 158 7/28/2025
2025.1209.198 153 7/28/2025
2025.1209.179 165 7/28/2025
2025.1208.826 177 7/27/2025
2025.1208.627 136 7/27/2025
2025.1208.617 139 7/27/2025
2025.1208.570 133 7/27/2025
2025.1208.568 144 7/27/2025
2025.1208.566 142 7/27/2025
2025.1206.491 469 7/25/2025
2025.1206.247 506 7/25/2025
2025.1205.230 515 7/24/2025
2025.1203.826 581 7/22/2025
2025.1202.906 532 7/21/2025
2025.1202.904 524 7/21/2025
2025.1202.283 454 7/21/2025
2025.1201.470 278 7/20/2025
2025.1199.287 175 7/18/2025
2025.1198.1048 187 7/17/2025
2025.1198.682 183 7/17/2025
2025.1198.638 186 7/17/2025
2025.1198.574 187 7/17/2025
2025.1198.187 194 7/17/2025
2025.1191.922 196 7/10/2025
2025.1191.235 198 7/10/2025
2025.1190.175 193 7/9/2025
2025.1189.851 196 7/8/2025
2025.1189.841 195 7/8/2025
2025.1187.587 195 7/6/2025
2025.1183.853 201 7/2/2025
2025.1181.644 186 6/30/2025
2025.1175.340 206 6/24/2025
2025.1174.62 194 6/23/2025
2025.1171.352 191 6/20/2025
2025.1169.413 193 6/18/2025
2025.1166.1191 190 6/15/2025
2025.1166.1178 192 6/15/2025
2025.1166.1177 192 6/15/2025
2025.1159.445 174 6/8/2025
2025.1159.364 168 6/8/2025
2025.1159.324 171 6/8/2025
2025.1155.438 196 6/4/2025
2025.1141.1424 201 5/21/2025
2025.1140.383 200 5/20/2025
2025.1140.377 198 5/20/2025
2025.1139.983 201 5/19/2025
2025.1139.952 197 5/19/2025
2025.1139.941 204 5/19/2025
2025.1139.855 208 5/19/2025
2025.1139.850 195 5/19/2025
2025.1139.837 193 5/19/2025
2025.1139.811 196 5/19/2025
2025.1139.806 198 5/19/2025
2025.1139.796 196 5/19/2025
2025.1139.729 197 5/19/2025
2025.1139.719 200 5/19/2025
2025.1139.706 200 5/19/2025
2025.1139.694 200 5/19/2025
2025.1139.679 198 5/19/2025
2025.1139.662 191 5/19/2025
2025.1139.638 174 5/19/2025
2025.1139.628 177 5/19/2025
2025.1139.626 183 5/19/2025
2025.1139.619 179 5/19/2025
2025.1139.605 178 5/19/2025
2025.1139.600 182 5/19/2025
2025.1139.583 192 5/19/2025
2025.1139.573 180 5/19/2025
2025.1139.564 180 5/19/2025
2025.1139.552 181 5/19/2025
2025.1139.543 178 5/19/2025
2025.1138.909 184 5/18/2025
2025.1136.150 254 5/16/2025
2025.1135.267 254 5/15/2025
2025.1135.143 261 5/15/2025
2025.1133.453 263 5/13/2025
2025.1133.351 263 5/13/2025
2025.1133.349 273 5/13/2025
2025.1133.347 265 5/13/2025
2025.1130.236 114 5/10/2025
2025.1129.831 145 5/9/2025
2025.1129.346 1,090 5/9/2025
2023.1176.407 246 6/25/2023
2023.1176.396 206 6/25/2023
2023.1176.363 219 6/25/2023
2023.1176.360 256 6/25/2023
2023.1175.638 215 6/24/2023
2023.1170.907 210 6/19/2023
2023.1170.900 213 6/19/2023
2023.1167.562 205 6/16/2023
2023.1167.556 220 6/16/2023
2023.1167.496 231 6/16/2023
2023.1166.1008 234 6/15/2023
2023.1166.938 207 6/15/2023
2023.1166.713 227 6/15/2023
2023.1166.699 216 6/15/2023
2023.1165.1065 225 6/14/2023
2023.1165.888 220 6/14/2023
2023.1165.878 222 6/14/2023
2023.1165.861 211 6/14/2023
2023.1165.828 221 6/14/2023
2023.1165.686 233 6/14/2023
2023.1165.653 216 6/14/2023
2023.377.1003 297 5/31/2023
2023.377.909 239 5/31/2023
2023.377.558 238 5/31/2023
2023.365.1417 283 5/30/2023
2023.365.1350 224 5/30/2023
2023.365.1327 220 5/30/2023
2023.365.1306 241 5/30/2023
2023.365.1198 247 5/30/2023
2023.365.1046 226 5/30/2023
2023.365.710 224 5/30/2023
2023.365.703 237 5/30/2023
2023.365.336 229 5/30/2023
2023.174.636 225 6/14/2023
2023.174.616 208 6/14/2023
2023.174.442 223 6/14/2023
2023.162.1243 215 6/13/2023
2023.162.1225 223 6/13/2023
2023.162.1023 209 6/13/2023
2023.162.948 214 6/13/2023
2023.162.865 219 6/13/2023
2023.162.770 243 6/13/2023
2023.162.734 232 6/13/2023
2023.162.701 225 6/13/2023
2023.162.470 234 6/13/2023
2023.162.418 219 6/13/2023
2023.150.1142 218 6/12/2023
2023.150.1121 221 6/12/2023
2023.150.1095 222 6/12/2023
2023.150.1081 208 6/12/2023
2023.150.1066 218 6/12/2023
2023.150.999 210 6/12/2023
2023.150.916 237 6/12/2023
2023.150.865 220 6/12/2023
2023.150.831 220 6/12/2023
2023.150.774 219 6/12/2023
2023.150.613 219 6/12/2023
2023.150.558 229 6/12/2023
2023.150.456 242 6/12/2023
2023.150.450 243 6/12/2023
2023.150.220 242 6/12/2023
2023.150.179 246 6/12/2023
2023.150.167 247 6/12/2023
2023.138.864 231 6/11/2023
2023.138.837 227 6/11/2023
2023.138.363 236 6/11/2023
2023.138.224 266 6/11/2023
2023.138.213 210 6/11/2023
2023.126.1167 241 6/11/2023
2023.126.1148 234 6/10/2023
2023.126.838 244 6/10/2023
2023.126.794 239 6/10/2023
2023.126.745 238 6/10/2023
2023.126.714 250 6/10/2023
2023.126.662 247 6/10/2023
2023.114.544 223 6/9/2023
2023.114.351 233 6/9/2023
2023.90.1030 237 6/7/2023
2023.90.1009 219 6/7/2023
2023.54.1152 220 6/4/2023
2023.54.419 244 6/4/2023
2023.54.198 222 6/4/2023
2023.54.60 205 6/4/2023
2023.54.48 241 6/4/2023
2023.42.745 224 6/3/2023
2023.30.1191 223 6/2/2023
2023.30.1172 236 6/2/2023
2023.30.1163 230 6/2/2023
2023.30.1147 233 6/2/2023
2023.30.1136 251 6/2/2023
2023.30.765 244 6/2/2023
2023.30.761 231 6/2/2023
2023.30.747 246 6/2/2023
2023.30.734 233 6/2/2023