Redpoint.ProgressMonitor 2025.1350.557

Prefix Reserved
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.1350.557 15 12/16/2025
2025.1350.516 16 12/16/2025
2025.1350.182 25 12/16/2025
2025.1350.147 24 12/16/2025
2025.1349.1160 45 12/15/2025
2025.1346.566 89 12/12/2025
2025.1345.778 385 12/11/2025
2025.1345.725 387 12/11/2025
2025.1339.426 196 12/5/2025
2025.1338.774 205 12/4/2025
2025.1338.756 203 12/4/2025
2025.1338.613 201 12/4/2025
2025.1338.582 203 12/4/2025
2025.1338.547 208 12/4/2025
2025.1338.381 209 12/4/2025
2025.1338.290 202 12/4/2025
2025.1335.333 499 12/1/2025
2025.1335.278 489 12/1/2025
2025.1335.262 492 12/1/2025
2025.1333.376 117 11/29/2025
2025.1332.339 173 11/28/2025
2025.1328.632 198 11/24/2025
2025.1328.624 194 11/24/2025
2025.1328.41 202 11/24/2025
2025.1327.977 202 11/23/2025
2025.1327.893 175 11/23/2025
2025.1324.9 409 11/20/2025
2025.1324.1 420 11/20/2025
2025.1320.233 247 11/16/2025
2025.1320.190 151 11/16/2025
2025.1320.178 154 11/16/2025
2025.1320.84 150 11/16/2025
2025.1320.61 151 11/16/2025
2025.1319.659 182 11/15/2025
2025.1319.291 202 11/15/2025
2025.1318.1000 243 11/14/2025
2025.1317.1416 299 11/13/2025
2025.1302.173 209 10/29/2025
2025.1302.116 205 10/29/2025
2025.1302.93 206 10/29/2025
2025.1301.273 201 10/28/2025
2025.1289.355 198 10/16/2025
2025.1288.1067 197 10/15/2025
2025.1288.939 192 10/15/2025
2025.1288.731 194 10/15/2025
2025.1288.643 202 10/15/2025
2025.1288.584 206 10/15/2025
2025.1287.261 206 10/14/2025
2025.1287.213 195 10/14/2025
2025.1286.369 213 10/13/2025
2025.1276.372 184 10/3/2025
2025.1253.415 208 9/10/2025
2025.1251.740 193 9/8/2025
2025.1249.408 143 9/6/2025
2025.1245.159 208 9/2/2025
2025.1241.1004 234 8/29/2025
2025.1241.337 250 8/29/2025
2025.1241.335 251 8/29/2025
2025.1239.82 250 8/27/2025
2025.1236.697 239 8/24/2025
2025.1235.897 135 8/23/2025
2025.1234.740 159 8/22/2025
2025.1234.625 167 8/22/2025
2025.1234.484 171 8/22/2025
2025.1234.426 175 8/22/2025
2025.1234.329 178 8/22/2025
2025.1234.304 183 8/22/2025
2025.1234.279 186 8/22/2025
2025.1234.210 190 8/22/2025
2025.1234.185 184 8/22/2025
2025.1234.108 202 8/22/2025
2025.1234.70 201 8/22/2025
2025.1233.957 203 8/21/2025
2025.1233.933 198 8/21/2025
2025.1233.915 196 8/21/2025
2025.1233.885 191 8/21/2025
2025.1233.764 204 8/21/2025
2025.1233.694 200 8/21/2025
2025.1233.677 204 8/21/2025
2025.1233.212 200 8/21/2025
2025.1233.74 194 8/21/2025
2025.1233.72 197 8/21/2025
2025.1233.28 198 8/21/2025
2025.1232.155 206 8/20/2025
2025.1232.154 196 8/20/2025
2025.1232.104 196 8/20/2025
2025.1232.102 197 8/20/2025
2025.1231.1026 202 8/19/2025
2025.1231.941 211 8/19/2025
2025.1231.499 198 8/19/2025
2025.1231.484 197 8/19/2025
2025.1231.297 205 8/19/2025
2025.1230.859 201 8/18/2025
2025.1228.220 134 8/16/2025
2025.1227.934 162 8/15/2025
2025.1227.904 160 8/15/2025
2025.1227.852 157 8/15/2025
2025.1227.816 163 8/15/2025
2025.1227.77 198 8/15/2025
2025.1226.857 206 8/14/2025
2025.1226.472 207 8/14/2025
2025.1226.163 211 8/14/2025
2025.1222.583 209 8/10/2025
2025.1222.562 209 8/10/2025
2025.1222.437 206 8/10/2025
2025.1222.425 191 8/10/2025
2025.1220.271 270 8/8/2025
2025.1220.225 264 8/8/2025
2025.1220.80 276 8/8/2025
2025.1219.568 282 8/7/2025
2025.1219.546 282 8/7/2025
2025.1219.514 279 8/7/2025
2025.1219.513 276 8/7/2025
2025.1219.511 274 8/7/2025
2025.1219.421 285 8/7/2025
2025.1219.377 282 8/7/2025
2025.1219.362 285 8/7/2025
2025.1219.361 279 8/7/2025
2025.1218.1281 280 8/6/2025
2025.1218.1266 285 8/6/2025
2025.1218.1264 285 8/6/2025
2025.1218.1255 284 8/6/2025
2025.1218.1223 284 8/6/2025
2025.1218.1180 278 8/6/2025
2025.1218.1166 273 8/6/2025
2025.1218.1154 274 8/6/2025
2025.1218.1088 285 8/6/2025
2025.1218.595 280 8/6/2025
2025.1218.554 286 8/6/2025
2025.1218.544 282 8/6/2025
2025.1218.523 281 8/6/2025
2025.1218.499 285 8/6/2025
2025.1218.427 289 8/6/2025
2025.1218.415 283 8/6/2025
2025.1218.187 284 8/6/2025
2025.1218.174 280 8/6/2025
2025.1218.148 282 8/6/2025
2025.1218.123 278 8/6/2025
2025.1217.886 283 8/5/2025
2025.1217.560 283 8/5/2025
2025.1217.516 284 8/5/2025
2025.1217.512 287 8/5/2025
2025.1217.503 290 8/5/2025
2025.1216.1103 248 8/4/2025
2025.1216.1025 243 8/4/2025
2025.1216.978 224 8/4/2025
2025.1216.897 221 8/4/2025
2025.1216.893 226 8/4/2025
2025.1216.884 222 8/4/2025
2025.1216.873 219 8/4/2025
2025.1216.824 219 8/4/2025
2025.1216.767 222 8/4/2025
2025.1216.745 228 8/4/2025
2025.1216.411 204 8/4/2025
2025.1216.396 202 8/4/2025
2025.1216.386 202 8/4/2025
2025.1216.357 198 8/4/2025
2025.1216.347 194 8/4/2025
2025.1216.334 204 8/4/2025
2025.1216.319 197 8/4/2025
2025.1215.930 164 8/3/2025
2025.1215.928 166 8/3/2025
2025.1215.911 170 8/3/2025
2025.1215.892 168 8/3/2025
2025.1215.842 168 8/3/2025
2025.1209.1064 161 7/28/2025
2025.1209.1061 156 7/28/2025
2025.1209.1047 163 7/28/2025
2025.1209.1038 163 7/28/2025
2025.1209.1034 162 7/28/2025
2025.1209.948 167 7/28/2025
2025.1209.881 173 7/28/2025
2025.1209.773 177 7/28/2025
2025.1209.765 173 7/28/2025
2025.1209.758 170 7/28/2025
2025.1209.727 181 7/28/2025
2025.1209.658 175 7/28/2025
2025.1209.300 173 7/28/2025
2025.1209.284 174 7/28/2025
2025.1209.264 170 7/28/2025
2025.1209.227 172 7/28/2025
2025.1209.198 171 7/28/2025
2025.1209.179 182 7/28/2025
2025.1208.826 191 7/27/2025
2025.1208.627 149 7/27/2025
2025.1208.617 152 7/27/2025
2025.1208.570 148 7/27/2025
2025.1208.568 159 7/27/2025
2025.1208.566 156 7/27/2025
2025.1206.491 484 7/25/2025
2025.1206.247 520 7/25/2025
2025.1205.230 531 7/24/2025
2025.1203.826 595 7/22/2025
2025.1202.906 546 7/21/2025
2025.1202.904 543 7/21/2025
2025.1202.283 470 7/21/2025
2025.1201.470 294 7/20/2025
2025.1199.287 188 7/18/2025
2025.1198.1048 201 7/17/2025
2025.1198.682 197 7/17/2025
2025.1198.638 198 7/17/2025
2025.1198.574 202 7/17/2025
2025.1198.187 208 7/17/2025
2025.1191.922 209 7/10/2025
2025.1191.235 215 7/10/2025
2025.1190.175 205 7/9/2025
2025.1189.851 208 7/8/2025
2025.1189.841 213 7/8/2025
2025.1187.587 209 7/6/2025
2025.1183.853 219 7/2/2025
2025.1181.644 199 6/30/2025
2025.1175.340 221 6/24/2025
2025.1174.62 209 6/23/2025
2025.1171.352 206 6/20/2025
2025.1169.413 208 6/18/2025
2025.1166.1191 206 6/15/2025
2025.1166.1178 208 6/15/2025
2025.1166.1177 204 6/15/2025
2025.1159.445 188 6/8/2025
2025.1159.364 181 6/8/2025
2025.1159.324 187 6/8/2025
2025.1155.438 211 6/4/2025
2025.1141.1424 215 5/21/2025
2025.1140.383 213 5/20/2025
2025.1140.377 211 5/20/2025
2025.1139.983 216 5/19/2025
2025.1139.952 210 5/19/2025
2025.1139.941 217 5/19/2025
2025.1139.855 222 5/19/2025
2025.1139.850 209 5/19/2025
2025.1139.837 207 5/19/2025
2025.1139.811 212 5/19/2025
2025.1139.806 211 5/19/2025
2025.1139.796 215 5/19/2025
2025.1139.729 213 5/19/2025
2025.1139.719 213 5/19/2025
2025.1139.706 214 5/19/2025
2025.1139.694 217 5/19/2025
2025.1139.679 215 5/19/2025
2025.1139.662 207 5/19/2025
2025.1139.638 189 5/19/2025
2025.1139.628 190 5/19/2025
2025.1139.626 199 5/19/2025
2025.1139.619 193 5/19/2025
2025.1139.605 191 5/19/2025
2025.1139.600 196 5/19/2025
2025.1139.583 210 5/19/2025
2025.1139.573 192 5/19/2025
2025.1139.564 197 5/19/2025
2025.1139.552 195 5/19/2025
2025.1139.543 195 5/19/2025
2025.1138.909 198 5/18/2025
2025.1136.150 270 5/16/2025
2025.1135.267 269 5/15/2025
2025.1135.143 277 5/15/2025
2025.1133.453 273 5/13/2025
2025.1133.351 282 5/13/2025
2025.1133.349 289 5/13/2025
2025.1133.347 282 5/13/2025
2025.1130.236 129 5/10/2025
2025.1129.831 157 5/9/2025
2025.1129.346 1,151 5/9/2025
2023.1176.407 254 6/25/2023
2023.1176.396 212 6/25/2023
2023.1176.363 228 6/25/2023
2023.1176.360 263 6/25/2023
2023.1175.638 222 6/24/2023
2023.1170.907 218 6/19/2023
2023.1170.900 221 6/19/2023
2023.1167.562 214 6/16/2023
2023.1167.556 228 6/16/2023
2023.1167.496 242 6/16/2023
2023.1166.1008 243 6/15/2023
2023.1166.938 213 6/15/2023
2023.1166.713 236 6/15/2023
2023.1166.699 224 6/15/2023
2023.1165.1065 233 6/14/2023
2023.1165.888 229 6/14/2023
2023.1165.878 233 6/14/2023
2023.1165.861 220 6/14/2023
2023.1165.828 234 6/14/2023
2023.1165.686 242 6/14/2023
2023.1165.653 225 6/14/2023
2023.377.1003 309 5/31/2023
2023.377.909 252 5/31/2023
2023.377.558 250 5/31/2023
2023.365.1417 295 5/30/2023
2023.365.1350 239 5/30/2023
2023.365.1327 232 5/30/2023
2023.365.1306 256 5/30/2023
2023.365.1198 260 5/30/2023
2023.365.1046 242 5/30/2023
2023.365.710 237 5/30/2023
2023.365.703 248 5/30/2023
2023.365.336 243 5/30/2023
2023.174.636 236 6/14/2023
2023.174.616 220 6/14/2023
2023.174.442 232 6/14/2023
2023.162.1243 226 6/13/2023
2023.162.1225 233 6/13/2023
2023.162.1023 218 6/13/2023
2023.162.948 223 6/13/2023
2023.162.865 228 6/13/2023
2023.162.770 254 6/13/2023
2023.162.734 241 6/13/2023
2023.162.701 235 6/13/2023
2023.162.470 246 6/13/2023
2023.162.418 228 6/13/2023
2023.150.1142 230 6/12/2023
2023.150.1121 231 6/12/2023
2023.150.1095 232 6/12/2023
2023.150.1081 218 6/12/2023
2023.150.1066 228 6/12/2023
2023.150.999 219 6/12/2023
2023.150.916 249 6/12/2023
2023.150.865 231 6/12/2023
2023.150.831 230 6/12/2023
2023.150.774 231 6/12/2023
2023.150.613 226 6/12/2023
2023.150.558 237 6/12/2023
2023.150.456 254 6/12/2023
2023.150.450 251 6/12/2023
2023.150.220 252 6/12/2023
2023.150.179 258 6/12/2023
2023.150.167 262 6/12/2023
2023.138.864 243 6/11/2023
2023.138.837 239 6/11/2023
2023.138.363 244 6/11/2023
2023.138.224 276 6/11/2023
2023.138.213 222 6/11/2023
2023.126.1167 252 6/11/2023
2023.126.1148 244 6/10/2023
2023.126.838 257 6/10/2023
2023.126.794 251 6/10/2023
2023.126.745 248 6/10/2023
2023.126.714 262 6/10/2023
2023.126.662 258 6/10/2023
2023.114.544 235 6/9/2023
2023.114.351 243 6/9/2023
2023.90.1030 249 6/7/2023
2023.90.1009 228 6/7/2023
2023.54.1152 232 6/4/2023
2023.54.419 255 6/4/2023
2023.54.198 236 6/4/2023
2023.54.60 218 6/4/2023
2023.54.48 254 6/4/2023
2023.42.745 235 6/3/2023
2023.30.1191 240 6/2/2023
2023.30.1172 254 6/2/2023
2023.30.1163 244 6/2/2023
2023.30.1147 244 6/2/2023
2023.30.1136 266 6/2/2023
2023.30.765 257 6/2/2023
2023.30.761 243 6/2/2023
2023.30.747 258 6/2/2023
2023.30.734 243 6/2/2023