Redpoint.ProgressMonitor 2025.1350.557

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.1350.557
                    
NuGet\Install-Package Redpoint.ProgressMonitor -Version 2025.1350.557
                    
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.1350.557" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Redpoint.ProgressMonitor" Version="2025.1350.557" />
                    
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.1350.557
                    
#r "nuget: Redpoint.ProgressMonitor, 2025.1350.557"
                    
#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.1350.557
                    
#: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.1350.557
                    
Install as a Cake Addin
#tool nuget:?package=Redpoint.ProgressMonitor&version=2025.1350.557
                    
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.1356.172 56 12/22/2025
2025.1356.142 64 12/22/2025
2025.1356.104 61 12/22/2025
2025.1355.597 57 12/21/2025
2025.1355.582 59 12/21/2025
2025.1355.546 63 12/21/2025
2025.1355.525 56 12/21/2025
2025.1355.514 55 12/21/2025
2025.1355.507 59 12/21/2025
2025.1355.499 62 12/21/2025
2025.1355.401 56 12/21/2025
2025.1355.392 55 12/21/2025
2025.1355.381 67 12/21/2025
2025.1355.371 61 12/21/2025
2025.1355.334 53 12/21/2025
2025.1355.308 59 12/21/2025
2025.1355.183 60 12/21/2025
2025.1354.739 104 12/20/2025
2025.1354.731 105 12/20/2025
2025.1354.39 141 12/20/2025
2025.1353.662 210 12/19/2025
2025.1353.593 217 12/19/2025
2025.1353.526 215 12/19/2025
2025.1353.502 211 12/19/2025
2025.1353.489 212 12/19/2025
2025.1353.400 219 12/19/2025
2025.1353.367 224 12/19/2025
2025.1352.1431 250 12/18/2025
2025.1352.1424 238 12/18/2025
2025.1351.813 263 12/17/2025
2025.1351.758 269 12/17/2025
2025.1351.440 272 12/17/2025
2025.1350.557 284 12/16/2025
2025.1350.516 283 12/16/2025
2025.1350.182 283 12/16/2025
2025.1350.147 282 12/16/2025
2025.1349.1160 276 12/15/2025
2025.1346.566 136 12/12/2025
2025.1345.778 431 12/11/2025
2025.1345.725 432 12/11/2025
2025.1339.426 202 12/5/2025
2025.1338.774 213 12/4/2025
2025.1338.756 210 12/4/2025
2025.1338.613 207 12/4/2025
2025.1338.582 212 12/4/2025
2025.1338.547 212 12/4/2025
2025.1338.381 215 12/4/2025
2025.1338.290 207 12/4/2025
2025.1335.333 507 12/1/2025
2025.1335.278 494 12/1/2025
2025.1335.262 500 12/1/2025
2025.1333.376 124 11/29/2025
2025.1332.339 179 11/28/2025
2025.1328.632 205 11/24/2025
2025.1328.624 199 11/24/2025
2025.1328.41 204 11/24/2025
2025.1327.977 207 11/23/2025
2025.1327.893 178 11/23/2025
2025.1324.9 414 11/20/2025
2025.1324.1 424 11/20/2025
2025.1320.233 251 11/16/2025
2025.1320.190 157 11/16/2025
2025.1320.178 157 11/16/2025
2025.1320.84 153 11/16/2025
2025.1320.61 158 11/16/2025
2025.1319.659 186 11/15/2025
2025.1319.291 206 11/15/2025
2025.1318.1000 249 11/14/2025
2025.1317.1416 304 11/13/2025
2025.1302.173 214 10/29/2025
2025.1302.116 209 10/29/2025
2025.1302.93 210 10/29/2025
2025.1301.273 206 10/28/2025
2025.1289.355 202 10/16/2025
2025.1288.1067 199 10/15/2025
2025.1288.939 195 10/15/2025
2025.1288.731 197 10/15/2025
2025.1288.643 205 10/15/2025
2025.1288.584 211 10/15/2025
2025.1287.261 209 10/14/2025
2025.1287.213 201 10/14/2025
2025.1286.369 217 10/13/2025
2025.1276.372 188 10/3/2025
2025.1253.415 210 9/10/2025
2025.1251.740 195 9/8/2025
2025.1249.408 148 9/6/2025
2025.1245.159 212 9/2/2025
2025.1241.1004 239 8/29/2025
2025.1241.337 254 8/29/2025
2025.1241.335 255 8/29/2025
2025.1239.82 253 8/27/2025
2025.1236.697 244 8/24/2025
2025.1235.897 139 8/23/2025
2025.1234.740 163 8/22/2025
2025.1234.625 170 8/22/2025
2025.1234.484 176 8/22/2025
2025.1234.426 179 8/22/2025
2025.1234.329 180 8/22/2025
2025.1234.304 186 8/22/2025
2025.1234.279 189 8/22/2025
2025.1234.210 193 8/22/2025
2025.1234.185 188 8/22/2025
2025.1234.108 204 8/22/2025
2025.1234.70 205 8/22/2025
2025.1233.957 206 8/21/2025
2025.1233.933 200 8/21/2025
2025.1233.915 200 8/21/2025
2025.1233.885 195 8/21/2025
2025.1233.764 205 8/21/2025
2025.1233.694 204 8/21/2025
2025.1233.677 207 8/21/2025
2025.1233.212 203 8/21/2025
2025.1233.74 198 8/21/2025
2025.1233.72 200 8/21/2025
2025.1233.28 199 8/21/2025
2025.1232.155 209 8/20/2025
2025.1232.154 200 8/20/2025
2025.1232.104 199 8/20/2025
2025.1232.102 202 8/20/2025
2025.1231.1026 207 8/19/2025
2025.1231.941 217 8/19/2025
2025.1231.499 203 8/19/2025
2025.1231.484 200 8/19/2025
2025.1231.297 207 8/19/2025
2025.1230.859 203 8/18/2025
2025.1228.220 136 8/16/2025
2025.1227.934 163 8/15/2025
2025.1227.904 161 8/15/2025
2025.1227.852 161 8/15/2025
2025.1227.816 164 8/15/2025
2025.1227.77 199 8/15/2025
2025.1226.857 209 8/14/2025
2025.1226.472 211 8/14/2025
2025.1226.163 215 8/14/2025
2025.1222.583 211 8/10/2025
2025.1222.562 213 8/10/2025
2025.1222.437 209 8/10/2025
2025.1222.425 195 8/10/2025
2025.1220.271 273 8/8/2025
2025.1220.225 271 8/8/2025
2025.1220.80 278 8/8/2025
2025.1219.568 288 8/7/2025
2025.1219.546 285 8/7/2025
2025.1219.514 282 8/7/2025
2025.1219.513 281 8/7/2025
2025.1219.511 275 8/7/2025
2025.1219.421 287 8/7/2025
2025.1219.377 285 8/7/2025
2025.1219.362 291 8/7/2025
2025.1219.361 282 8/7/2025
2025.1218.1281 284 8/6/2025
2025.1218.1266 290 8/6/2025
2025.1218.1264 287 8/6/2025
2025.1218.1255 290 8/6/2025
2025.1218.1223 289 8/6/2025
2025.1218.1180 280 8/6/2025
2025.1218.1166 276 8/6/2025
2025.1218.1154 275 8/6/2025
2025.1218.1088 292 8/6/2025
2025.1218.595 283 8/6/2025
2025.1218.554 291 8/6/2025
2025.1218.544 284 8/6/2025
2025.1218.523 282 8/6/2025
2025.1218.499 290 8/6/2025
2025.1218.427 290 8/6/2025
2025.1218.415 289 8/6/2025
2025.1218.187 289 8/6/2025
2025.1218.174 289 8/6/2025
2025.1218.148 286 8/6/2025
2025.1218.123 282 8/6/2025
2025.1217.886 285 8/5/2025
2025.1217.560 288 8/5/2025
2025.1217.516 287 8/5/2025
2025.1217.512 292 8/5/2025
2025.1217.503 294 8/5/2025
2025.1216.1103 251 8/4/2025
2025.1216.1025 247 8/4/2025
2025.1216.978 228 8/4/2025
2025.1216.897 225 8/4/2025
2025.1216.893 230 8/4/2025
2025.1216.884 225 8/4/2025
2025.1216.873 227 8/4/2025
2025.1216.824 222 8/4/2025
2025.1216.767 227 8/4/2025
2025.1216.745 230 8/4/2025
2025.1216.411 205 8/4/2025
2025.1216.396 205 8/4/2025
2025.1216.386 204 8/4/2025
2025.1216.357 200 8/4/2025
2025.1216.347 195 8/4/2025
2025.1216.334 207 8/4/2025
2025.1216.319 200 8/4/2025
2025.1215.930 169 8/3/2025
2025.1215.928 171 8/3/2025
2025.1215.911 172 8/3/2025
2025.1215.892 171 8/3/2025
2025.1215.842 170 8/3/2025
2025.1209.1064 166 7/28/2025
2025.1209.1061 158 7/28/2025
2025.1209.1047 169 7/28/2025
2025.1209.1038 166 7/28/2025
2025.1209.1034 165 7/28/2025
2025.1209.948 172 7/28/2025
2025.1209.881 175 7/28/2025
2025.1209.773 180 7/28/2025
2025.1209.765 176 7/28/2025
2025.1209.758 173 7/28/2025
2025.1209.727 187 7/28/2025
2025.1209.658 179 7/28/2025
2025.1209.300 178 7/28/2025
2025.1209.284 176 7/28/2025
2025.1209.264 172 7/28/2025
2025.1209.227 179 7/28/2025
2025.1209.198 173 7/28/2025
2025.1209.179 188 7/28/2025
2025.1208.826 194 7/27/2025
2025.1208.627 153 7/27/2025
2025.1208.617 157 7/27/2025
2025.1208.570 150 7/27/2025
2025.1208.568 162 7/27/2025
2025.1208.566 163 7/27/2025
2025.1206.491 489 7/25/2025
2025.1206.247 521 7/25/2025
2025.1205.230 536 7/24/2025
2025.1203.826 597 7/22/2025
2025.1202.906 549 7/21/2025
2025.1202.904 546 7/21/2025
2025.1202.283 471 7/21/2025
2025.1201.470 300 7/20/2025
2025.1199.287 190 7/18/2025
2025.1198.1048 204 7/17/2025
2025.1198.682 205 7/17/2025
2025.1198.638 203 7/17/2025
2025.1198.574 205 7/17/2025
2025.1198.187 213 7/17/2025
2025.1191.922 212 7/10/2025
2025.1191.235 220 7/10/2025
2025.1190.175 207 7/9/2025
2025.1189.851 212 7/8/2025
2025.1189.841 217 7/8/2025
2025.1187.587 212 7/6/2025
2025.1183.853 224 7/2/2025
2025.1181.644 201 6/30/2025
2025.1175.340 223 6/24/2025
2025.1174.62 213 6/23/2025
2025.1171.352 211 6/20/2025
2025.1169.413 210 6/18/2025
2025.1166.1191 209 6/15/2025
2025.1166.1178 210 6/15/2025
2025.1166.1177 207 6/15/2025
2025.1159.445 190 6/8/2025
2025.1159.364 183 6/8/2025
2025.1159.324 191 6/8/2025
2025.1155.438 213 6/4/2025
2025.1141.1424 218 5/21/2025
2025.1140.383 217 5/20/2025
2025.1140.377 214 5/20/2025
2025.1139.983 220 5/19/2025
2025.1139.952 214 5/19/2025
2025.1139.941 223 5/19/2025
2025.1139.855 225 5/19/2025
2025.1139.850 213 5/19/2025
2025.1139.837 211 5/19/2025
2025.1139.811 216 5/19/2025
2025.1139.806 215 5/19/2025
2025.1139.796 219 5/19/2025
2025.1139.729 216 5/19/2025
2025.1139.719 217 5/19/2025
2025.1139.706 218 5/19/2025
2025.1139.694 218 5/19/2025
2025.1139.679 219 5/19/2025
2025.1139.662 212 5/19/2025
2025.1139.638 194 5/19/2025
2025.1139.628 194 5/19/2025
2025.1139.626 202 5/19/2025
2025.1139.619 196 5/19/2025
2025.1139.605 193 5/19/2025
2025.1139.600 200 5/19/2025
2025.1139.583 212 5/19/2025
2025.1139.573 196 5/19/2025
2025.1139.564 200 5/19/2025
2025.1139.552 197 5/19/2025
2025.1139.543 198 5/19/2025
2025.1138.909 200 5/18/2025
2025.1136.150 273 5/16/2025
2025.1135.267 274 5/15/2025
2025.1135.143 279 5/15/2025
2025.1133.453 277 5/13/2025
2025.1133.351 285 5/13/2025
2025.1133.349 292 5/13/2025
2025.1133.347 286 5/13/2025
2025.1130.236 132 5/10/2025
2025.1129.831 159 5/9/2025
2025.1129.346 1,152 5/9/2025
2023.1176.407 258 6/25/2023
2023.1176.396 216 6/25/2023
2023.1176.363 233 6/25/2023
2023.1176.360 265 6/25/2023
2023.1175.638 224 6/24/2023
2023.1170.907 222 6/19/2023
2023.1170.900 226 6/19/2023
2023.1167.562 218 6/16/2023
2023.1167.556 231 6/16/2023
2023.1167.496 246 6/16/2023
2023.1166.1008 245 6/15/2023
2023.1166.938 217 6/15/2023
2023.1166.713 239 6/15/2023
2023.1166.699 226 6/15/2023
2023.1165.1065 237 6/14/2023
2023.1165.888 233 6/14/2023
2023.1165.878 236 6/14/2023
2023.1165.861 224 6/14/2023
2023.1165.828 240 6/14/2023
2023.1165.686 243 6/14/2023
2023.1165.653 231 6/14/2023
2023.377.1003 312 5/31/2023
2023.377.909 255 5/31/2023
2023.377.558 254 5/31/2023
2023.365.1417 296 5/30/2023
2023.365.1350 243 5/30/2023
2023.365.1327 236 5/30/2023
2023.365.1306 257 5/30/2023
2023.365.1198 261 5/30/2023
2023.365.1046 244 5/30/2023
2023.365.710 241 5/30/2023
2023.365.703 250 5/30/2023
2023.365.336 249 5/30/2023
2023.174.636 238 6/14/2023
2023.174.616 223 6/14/2023
2023.174.442 237 6/14/2023
2023.162.1243 230 6/13/2023
2023.162.1225 240 6/13/2023
2023.162.1023 220 6/13/2023
2023.162.948 228 6/13/2023
2023.162.865 229 6/13/2023
2023.162.770 257 6/13/2023
2023.162.734 243 6/13/2023
2023.162.701 239 6/13/2023
2023.162.470 251 6/13/2023
2023.162.418 229 6/13/2023
2023.150.1142 233 6/12/2023
2023.150.1121 237 6/12/2023
2023.150.1095 236 6/12/2023
2023.150.1081 223 6/12/2023
2023.150.1066 233 6/12/2023
2023.150.999 224 6/12/2023
2023.150.916 252 6/12/2023
2023.150.865 234 6/12/2023
2023.150.831 234 6/12/2023
2023.150.774 233 6/12/2023
2023.150.613 229 6/12/2023
2023.150.558 241 6/12/2023
2023.150.456 258 6/12/2023
2023.150.450 255 6/12/2023
2023.150.220 256 6/12/2023
2023.150.179 259 6/12/2023
2023.150.167 266 6/12/2023
2023.138.864 245 6/11/2023
2023.138.837 242 6/11/2023
2023.138.363 245 6/11/2023
2023.138.224 278 6/11/2023
2023.138.213 224 6/11/2023
2023.126.1167 254 6/11/2023
2023.126.1148 247 6/10/2023
2023.126.838 259 6/10/2023
2023.126.794 255 6/10/2023
2023.126.745 250 6/10/2023
2023.126.714 265 6/10/2023
2023.126.662 261 6/10/2023
2023.114.544 242 6/9/2023
2023.114.351 245 6/9/2023
2023.90.1030 254 6/7/2023
2023.90.1009 232 6/7/2023
2023.54.1152 236 6/4/2023
2023.54.419 261 6/4/2023
2023.54.198 239 6/4/2023
2023.54.60 223 6/4/2023
2023.54.48 256 6/4/2023
2023.42.745 237 6/3/2023
2023.30.1191 244 6/2/2023
2023.30.1172 259 6/2/2023
2023.30.1163 249 6/2/2023
2023.30.1147 246 6/2/2023
2023.30.1136 270 6/2/2023
2023.30.765 261 6/2/2023
2023.30.761 247 6/2/2023
2023.30.747 261 6/2/2023
2023.30.734 248 6/2/2023