Redpoint.ProgressMonitor 2025.1302.93

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