Redpoint.ProgressMonitor 2025.1346.566

Prefix Reserved
dotnet add package Redpoint.ProgressMonitor --version 2025.1346.566
                    
NuGet\Install-Package Redpoint.ProgressMonitor -Version 2025.1346.566
                    
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.1346.566" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Redpoint.ProgressMonitor" Version="2025.1346.566" />
                    
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.1346.566
                    
#r "nuget: Redpoint.ProgressMonitor, 2025.1346.566"
                    
#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.1346.566
                    
#: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.1346.566
                    
Install as a Cake Addin
#tool nuget:?package=Redpoint.ProgressMonitor&version=2025.1346.566
                    
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.1346.566 41 12/12/2025
2025.1345.778 254 12/11/2025
2025.1345.725 255 12/11/2025
2025.1339.426 194 12/5/2025
2025.1338.774 202 12/4/2025
2025.1338.756 200 12/4/2025
2025.1338.613 198 12/4/2025
2025.1338.582 200 12/4/2025
2025.1338.547 204 12/4/2025
2025.1338.381 206 12/4/2025
2025.1338.290 200 12/4/2025
2025.1335.333 497 12/1/2025
2025.1335.278 487 12/1/2025
2025.1335.262 490 12/1/2025
2025.1333.376 114 11/29/2025
2025.1332.339 171 11/28/2025
2025.1328.632 194 11/24/2025
2025.1328.624 191 11/24/2025
2025.1328.41 198 11/24/2025
2025.1327.977 197 11/23/2025
2025.1327.893 171 11/23/2025
2025.1324.9 406 11/20/2025
2025.1324.1 417 11/20/2025
2025.1320.233 245 11/16/2025
2025.1320.190 148 11/16/2025
2025.1320.178 151 11/16/2025
2025.1320.84 148 11/16/2025
2025.1320.61 149 11/16/2025
2025.1319.659 180 11/15/2025
2025.1319.291 199 11/15/2025
2025.1318.1000 241 11/14/2025
2025.1317.1416 297 11/13/2025
2025.1302.173 207 10/29/2025
2025.1302.116 203 10/29/2025
2025.1302.93 204 10/29/2025
2025.1301.273 199 10/28/2025
2025.1289.355 195 10/16/2025
2025.1288.1067 193 10/15/2025
2025.1288.939 189 10/15/2025
2025.1288.731 191 10/15/2025
2025.1288.643 200 10/15/2025
2025.1288.584 201 10/15/2025
2025.1287.261 204 10/14/2025
2025.1287.213 193 10/14/2025
2025.1286.369 209 10/13/2025
2025.1276.372 182 10/3/2025
2025.1253.415 206 9/10/2025
2025.1251.740 191 9/8/2025
2025.1249.408 140 9/6/2025
2025.1245.159 206 9/2/2025
2025.1241.1004 232 8/29/2025
2025.1241.337 247 8/29/2025
2025.1241.335 248 8/29/2025
2025.1239.82 248 8/27/2025
2025.1236.697 237 8/24/2025
2025.1235.897 133 8/23/2025
2025.1234.740 157 8/22/2025
2025.1234.625 165 8/22/2025
2025.1234.484 168 8/22/2025
2025.1234.426 173 8/22/2025
2025.1234.329 176 8/22/2025
2025.1234.304 181 8/22/2025
2025.1234.279 184 8/22/2025
2025.1234.210 188 8/22/2025
2025.1234.185 181 8/22/2025
2025.1234.108 200 8/22/2025
2025.1234.70 198 8/22/2025
2025.1233.957 201 8/21/2025
2025.1233.933 196 8/21/2025
2025.1233.915 194 8/21/2025
2025.1233.885 188 8/21/2025
2025.1233.764 202 8/21/2025
2025.1233.694 198 8/21/2025
2025.1233.677 202 8/21/2025
2025.1233.212 198 8/21/2025
2025.1233.74 192 8/21/2025
2025.1233.72 195 8/21/2025
2025.1233.28 196 8/21/2025
2025.1232.155 204 8/20/2025
2025.1232.154 194 8/20/2025
2025.1232.104 194 8/20/2025
2025.1232.102 195 8/20/2025
2025.1231.1026 200 8/19/2025
2025.1231.941 209 8/19/2025
2025.1231.499 196 8/19/2025
2025.1231.484 195 8/19/2025
2025.1231.297 203 8/19/2025
2025.1230.859 198 8/18/2025
2025.1228.220 132 8/16/2025
2025.1227.934 159 8/15/2025
2025.1227.904 157 8/15/2025
2025.1227.852 154 8/15/2025
2025.1227.816 161 8/15/2025
2025.1227.77 195 8/15/2025
2025.1226.857 204 8/14/2025
2025.1226.472 205 8/14/2025
2025.1226.163 209 8/14/2025
2025.1222.583 205 8/10/2025
2025.1222.562 206 8/10/2025
2025.1222.437 204 8/10/2025
2025.1222.425 189 8/10/2025
2025.1220.271 266 8/8/2025
2025.1220.225 262 8/8/2025
2025.1220.80 273 8/8/2025
2025.1219.568 279 8/7/2025
2025.1219.546 279 8/7/2025
2025.1219.514 276 8/7/2025
2025.1219.513 274 8/7/2025
2025.1219.511 272 8/7/2025
2025.1219.421 281 8/7/2025
2025.1219.377 279 8/7/2025
2025.1219.362 281 8/7/2025
2025.1219.361 276 8/7/2025
2025.1218.1281 277 8/6/2025
2025.1218.1266 282 8/6/2025
2025.1218.1264 282 8/6/2025
2025.1218.1255 281 8/6/2025
2025.1218.1223 282 8/6/2025
2025.1218.1180 276 8/6/2025
2025.1218.1166 271 8/6/2025
2025.1218.1154 272 8/6/2025
2025.1218.1088 282 8/6/2025
2025.1218.595 277 8/6/2025
2025.1218.554 280 8/6/2025
2025.1218.544 280 8/6/2025
2025.1218.523 279 8/6/2025
2025.1218.499 282 8/6/2025
2025.1218.427 286 8/6/2025
2025.1218.415 279 8/6/2025
2025.1218.187 282 8/6/2025
2025.1218.174 277 8/6/2025
2025.1218.148 279 8/6/2025
2025.1218.123 275 8/6/2025
2025.1217.886 280 8/5/2025
2025.1217.560 280 8/5/2025
2025.1217.516 281 8/5/2025
2025.1217.512 285 8/5/2025
2025.1217.503 288 8/5/2025
2025.1216.1103 246 8/4/2025
2025.1216.1025 240 8/4/2025
2025.1216.978 220 8/4/2025
2025.1216.897 218 8/4/2025
2025.1216.893 222 8/4/2025
2025.1216.884 220 8/4/2025
2025.1216.873 216 8/4/2025
2025.1216.824 217 8/4/2025
2025.1216.767 218 8/4/2025
2025.1216.745 225 8/4/2025
2025.1216.411 201 8/4/2025
2025.1216.396 199 8/4/2025
2025.1216.386 200 8/4/2025
2025.1216.357 196 8/4/2025
2025.1216.347 192 8/4/2025
2025.1216.334 201 8/4/2025
2025.1216.319 194 8/4/2025
2025.1215.930 161 8/3/2025
2025.1215.928 162 8/3/2025
2025.1215.911 167 8/3/2025
2025.1215.892 165 8/3/2025
2025.1215.842 166 8/3/2025
2025.1209.1064 159 7/28/2025
2025.1209.1061 154 7/28/2025
2025.1209.1047 161 7/28/2025
2025.1209.1038 161 7/28/2025
2025.1209.1034 158 7/28/2025
2025.1209.948 165 7/28/2025
2025.1209.881 171 7/28/2025
2025.1209.773 175 7/28/2025
2025.1209.765 171 7/28/2025
2025.1209.758 168 7/28/2025
2025.1209.727 176 7/28/2025
2025.1209.658 173 7/28/2025
2025.1209.300 169 7/28/2025
2025.1209.284 172 7/28/2025
2025.1209.264 168 7/28/2025
2025.1209.227 168 7/28/2025
2025.1209.198 169 7/28/2025
2025.1209.179 180 7/28/2025
2025.1208.826 189 7/27/2025
2025.1208.627 147 7/27/2025
2025.1208.617 150 7/27/2025
2025.1208.570 145 7/27/2025
2025.1208.568 154 7/27/2025
2025.1208.566 152 7/27/2025
2025.1206.491 482 7/25/2025
2025.1206.247 518 7/25/2025
2025.1205.230 529 7/24/2025
2025.1203.826 593 7/22/2025
2025.1202.906 544 7/21/2025
2025.1202.904 541 7/21/2025
2025.1202.283 467 7/21/2025
2025.1201.470 292 7/20/2025
2025.1199.287 186 7/18/2025
2025.1198.1048 198 7/17/2025
2025.1198.682 195 7/17/2025
2025.1198.638 196 7/17/2025
2025.1198.574 200 7/17/2025
2025.1198.187 206 7/17/2025
2025.1191.922 206 7/10/2025
2025.1191.235 210 7/10/2025
2025.1190.175 203 7/9/2025
2025.1189.851 205 7/8/2025
2025.1189.841 209 7/8/2025
2025.1187.587 207 7/6/2025
2025.1183.853 217 7/2/2025
2025.1181.644 197 6/30/2025
2025.1175.340 219 6/24/2025
2025.1174.62 206 6/23/2025
2025.1171.352 203 6/20/2025
2025.1169.413 205 6/18/2025
2025.1166.1191 203 6/15/2025
2025.1166.1178 206 6/15/2025
2025.1166.1177 202 6/15/2025
2025.1159.445 186 6/8/2025
2025.1159.364 179 6/8/2025
2025.1159.324 184 6/8/2025
2025.1155.438 208 6/4/2025
2025.1141.1424 212 5/21/2025
2025.1140.383 210 5/20/2025
2025.1140.377 208 5/20/2025
2025.1139.983 213 5/19/2025
2025.1139.952 208 5/19/2025
2025.1139.941 215 5/19/2025
2025.1139.855 220 5/19/2025
2025.1139.850 205 5/19/2025
2025.1139.837 205 5/19/2025
2025.1139.811 210 5/19/2025
2025.1139.806 209 5/19/2025
2025.1139.796 212 5/19/2025
2025.1139.729 209 5/19/2025
2025.1139.719 211 5/19/2025
2025.1139.706 212 5/19/2025
2025.1139.694 214 5/19/2025
2025.1139.679 212 5/19/2025
2025.1139.662 205 5/19/2025
2025.1139.638 187 5/19/2025
2025.1139.628 187 5/19/2025
2025.1139.626 194 5/19/2025
2025.1139.619 191 5/19/2025
2025.1139.605 189 5/19/2025
2025.1139.600 194 5/19/2025
2025.1139.583 207 5/19/2025
2025.1139.573 190 5/19/2025
2025.1139.564 195 5/19/2025
2025.1139.552 193 5/19/2025
2025.1139.543 192 5/19/2025
2025.1138.909 196 5/18/2025
2025.1136.150 267 5/16/2025
2025.1135.267 266 5/15/2025
2025.1135.143 275 5/15/2025
2025.1133.453 271 5/13/2025
2025.1133.351 278 5/13/2025
2025.1133.349 287 5/13/2025
2025.1133.347 279 5/13/2025
2025.1130.236 126 5/10/2025
2025.1129.831 155 5/9/2025
2025.1129.346 1,149 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 220 6/19/2023
2023.1167.562 212 6/16/2023
2023.1167.556 227 6/16/2023
2023.1167.496 241 6/16/2023
2023.1166.1008 242 6/15/2023
2023.1166.938 212 6/15/2023
2023.1166.713 235 6/15/2023
2023.1166.699 223 6/15/2023
2023.1165.1065 231 6/14/2023
2023.1165.888 227 6/14/2023
2023.1165.878 231 6/14/2023
2023.1165.861 217 6/14/2023
2023.1165.828 231 6/14/2023
2023.1165.686 240 6/14/2023
2023.1165.653 223 6/14/2023
2023.377.1003 306 5/31/2023
2023.377.909 249 5/31/2023
2023.377.558 247 5/31/2023
2023.365.1417 291 5/30/2023
2023.365.1350 235 5/30/2023
2023.365.1327 229 5/30/2023
2023.365.1306 253 5/30/2023
2023.365.1198 257 5/30/2023
2023.365.1046 238 5/30/2023
2023.365.710 234 5/30/2023
2023.365.703 245 5/30/2023
2023.365.336 240 5/30/2023
2023.174.636 233 6/14/2023
2023.174.616 216 6/14/2023
2023.174.442 230 6/14/2023
2023.162.1243 224 6/13/2023
2023.162.1225 231 6/13/2023
2023.162.1023 216 6/13/2023
2023.162.948 221 6/13/2023
2023.162.865 226 6/13/2023
2023.162.770 252 6/13/2023
2023.162.734 239 6/13/2023
2023.162.701 232 6/13/2023
2023.162.470 244 6/13/2023
2023.162.418 226 6/13/2023
2023.150.1142 227 6/12/2023
2023.150.1121 229 6/12/2023
2023.150.1095 230 6/12/2023
2023.150.1081 216 6/12/2023
2023.150.1066 226 6/12/2023
2023.150.999 216 6/12/2023
2023.150.916 246 6/12/2023
2023.150.865 228 6/12/2023
2023.150.831 227 6/12/2023
2023.150.774 228 6/12/2023
2023.150.613 224 6/12/2023
2023.150.558 235 6/12/2023
2023.150.456 251 6/12/2023
2023.150.450 249 6/12/2023
2023.150.220 250 6/12/2023
2023.150.179 256 6/12/2023
2023.150.167 259 6/12/2023
2023.138.864 241 6/11/2023
2023.138.837 236 6/11/2023
2023.138.363 242 6/11/2023
2023.138.224 274 6/11/2023
2023.138.213 220 6/11/2023
2023.126.1167 250 6/11/2023
2023.126.1148 242 6/10/2023
2023.126.838 254 6/10/2023
2023.126.794 249 6/10/2023
2023.126.745 246 6/10/2023
2023.126.714 260 6/10/2023
2023.126.662 256 6/10/2023
2023.114.544 232 6/9/2023
2023.114.351 241 6/9/2023
2023.90.1030 246 6/7/2023
2023.90.1009 226 6/7/2023
2023.54.1152 228 6/4/2023
2023.54.419 252 6/4/2023
2023.54.198 233 6/4/2023
2023.54.60 215 6/4/2023
2023.54.48 251 6/4/2023
2023.42.745 232 6/3/2023
2023.30.1191 237 6/2/2023
2023.30.1172 249 6/2/2023
2023.30.1163 241 6/2/2023
2023.30.1147 241 6/2/2023
2023.30.1136 263 6/2/2023
2023.30.765 254 6/2/2023
2023.30.761 240 6/2/2023
2023.30.747 255 6/2/2023
2023.30.734 240 6/2/2023