Soenneker.Utils.RateLimiting.Factory 3.0.255

Prefix Reserved
There is a newer version of this package available.
See the version list below for details.
dotnet add package Soenneker.Utils.RateLimiting.Factory --version 3.0.255                
NuGet\Install-Package Soenneker.Utils.RateLimiting.Factory -Version 3.0.255                
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="Soenneker.Utils.RateLimiting.Factory" Version="3.0.255" />                
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add Soenneker.Utils.RateLimiting.Factory --version 3.0.255                
#r "nuget: Soenneker.Utils.RateLimiting.Factory, 3.0.255"                
#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.
// Install Soenneker.Utils.RateLimiting.Factory as a Cake Addin
#addin nuget:?package=Soenneker.Utils.RateLimiting.Factory&version=3.0.255

// Install Soenneker.Utils.RateLimiting.Factory as a Cake Tool
#tool nuget:?package=Soenneker.Utils.RateLimiting.Factory&version=3.0.255                

alternate text is missing from this package README image alternate text is missing from this package README image alternate text is missing from this package README image

alternate text is missing from this package README image Soenneker.Utils.RateLimiting.Factory

An async thread-safe singleton dictionary for Soenneker.Utils.RateLimiting.Executors, designed to manage the rate at which tasks are executed.

Installation

dotnet add package Soenneker.Utils.RateLimiting.Factory

Usage

  1. Register IRateLimitingFactory within DI (Program.cs).
public static async Task Main(string[] args)
{
    ...
    builder.Services.AddRateLimitingFactoryAsSingleton();
}
  1. Inject IRateLimitingFactory, and retrieve a RateLimitingFactory.

Example:

public class TestClass
{
    IRateLimitingFactory _factory;

    public TestClass(IRateLimitingFactory factory)
    {
        _factory = factory;
    }

    public async ValueTask ExecuteTasks()
    {
        RateLimitingExecutor rateLimitingExecutor = await _factory.Get("test", TimeSpan.FromSeconds(2));

        for (int i = 0; i < 5; i++)
        {
            await rateLimitingExecutor.Execute(async ct =>
            {
                Logger.LogInformation($"Executing Task {i + 1} at {DateTime.Now:HH:mm:ss}");

                await Task.Delay(100, ct); // Simulate some work
            });
        }
    }
}

Console Output

Executing Task 1 at 14:00:00
Executing Task 2 at 14:00:02
Executing Task 3 at 14:00:04
Executing Task 4 at 14:00:06
Executing Task 5 at 14:00:08
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. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages (2)

Showing the top 2 NuGet packages that depend on Soenneker.Utils.RateLimiting.Factory:

Package Downloads
Soenneker.Validators.Yahoo.Exists

A validation module checking for Yahoo account existence

Soenneker.Validators.Gmail.Exists

A validation module checking for Gmail account existence

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
3.0.400 0 1/14/2025
3.0.399 0 1/14/2025
3.0.398 30 1/13/2025
3.0.397 22 1/13/2025
3.0.396 21 1/13/2025
3.0.395 45 1/13/2025
3.0.394 24 1/13/2025
3.0.393 38 1/13/2025
3.0.392 21 1/13/2025
3.0.391 66 1/13/2025
3.0.390 26 1/13/2025
3.0.389 67 1/11/2025
3.0.388 26 1/11/2025
3.0.387 31 1/11/2025
3.0.386 43 1/11/2025
3.0.385 50 1/11/2025
3.0.384 32 1/11/2025
3.0.383 34 1/11/2025
3.0.382 30 1/11/2025
3.0.381 51 1/11/2025
3.0.380 29 1/11/2025
3.0.379 55 1/10/2025
3.0.378 32 1/10/2025
3.0.377 56 1/10/2025
3.0.376 31 1/10/2025
3.0.375 49 1/10/2025
3.0.374 31 1/10/2025
3.0.373 49 1/10/2025
3.0.372 34 1/10/2025
3.0.371 174 1/3/2025
3.0.370 160 1/3/2025
3.0.369 109 1/3/2025
3.0.368 90 1/3/2025
3.0.367 105 1/3/2025
3.0.366 94 1/3/2025
3.0.365 146 1/3/2025
3.0.364 99 1/3/2025
3.0.363 89 1/3/2025
3.0.362 75 1/3/2025
3.0.361 88 1/3/2025
3.0.360 77 1/3/2025
3.0.359 144 1/2/2025
3.0.358 76 1/2/2025
3.0.357 147 1/2/2025
3.0.356 80 1/2/2025
3.0.355 252 1/2/2025
3.0.354 77 1/2/2025
3.0.353 80 1/2/2025
3.0.352 178 1/1/2025
3.0.351 87 1/1/2025
3.0.350 84 1/1/2025
3.0.349 128 1/1/2025
3.0.348 81 1/1/2025
3.0.347 93 1/1/2025
3.0.346 80 1/1/2025
3.0.345 153 1/1/2025
3.0.344 90 1/1/2025
3.0.343 82 1/1/2025
3.0.342 91 1/1/2025
3.0.341 120 1/1/2025
3.0.340 90 1/1/2025
3.0.339 97 12/31/2024
3.0.338 88 12/31/2024
3.0.337 84 12/31/2024
3.0.336 181 12/31/2024
3.0.335 93 12/31/2024
3.0.334 94 12/31/2024
3.0.333 248 12/31/2024
3.0.332 102 12/31/2024
3.0.331 103 12/31/2024
3.0.330 97 12/31/2024
3.0.329 217 12/31/2024
3.0.328 71 12/31/2024
3.0.327 68 12/31/2024
3.0.326 129 12/31/2024
3.0.325 71 12/31/2024
3.0.324 76 12/31/2024
3.0.323 76 12/31/2024
3.0.322 76 12/31/2024
3.0.321 203 12/30/2024
3.0.320 142 12/28/2024
3.0.319 128 12/28/2024
3.0.318 82 12/28/2024
3.0.317 81 12/28/2024
3.0.316 93 12/28/2024
3.0.315 118 12/28/2024
3.0.314 72 12/28/2024
3.0.313 85 12/27/2024
3.0.312 80 12/27/2024
3.0.311 148 12/27/2024
3.0.310 77 12/27/2024
3.0.309 267 12/24/2024
3.0.308 132 12/24/2024
3.0.307 79 12/24/2024
3.0.306 75 12/24/2024
3.0.305 147 12/24/2024
3.0.304 95 12/24/2024
3.0.303 107 12/24/2024
3.0.302 80 12/24/2024
3.0.301 76 12/24/2024
3.0.300 156 12/24/2024
3.0.299 155 12/24/2024
3.0.298 104 12/24/2024
3.0.297 74 12/24/2024
3.0.296 81 12/24/2024
3.0.295 79 12/24/2024
3.0.294 110 12/24/2024
3.0.293 77 12/24/2024
3.0.292 110 12/23/2024
3.0.291 69 12/23/2024
3.0.290 90 12/23/2024
3.0.289 78 12/23/2024
3.0.288 132 12/23/2024
3.0.287 182 12/23/2024
3.0.286 75 12/23/2024
3.0.285 133 12/23/2024
3.0.284 81 12/23/2024
3.0.283 78 12/23/2024
3.0.282 104 12/23/2024
3.0.281 76 12/23/2024
3.0.280 191 12/23/2024
3.0.279 77 12/23/2024
3.0.278 112 12/22/2024
3.0.277 74 12/22/2024
3.0.276 80 12/22/2024
3.0.275 154 12/22/2024
3.0.274 87 12/22/2024
3.0.273 79 12/22/2024
3.0.272 87 12/22/2024
3.0.271 197 12/22/2024
3.0.270 79 12/22/2024
3.0.269 130 12/22/2024
3.0.268 172 12/22/2024
3.0.267 81 12/22/2024
3.0.266 109 12/22/2024
3.0.265 106 12/21/2024
3.0.264 92 12/21/2024
3.0.263 99 12/21/2024
3.0.262 80 12/21/2024
3.0.261 220 12/21/2024
3.0.260 80 12/21/2024
3.0.259 115 12/21/2024
3.0.258 80 12/21/2024
3.0.257 150 12/21/2024
3.0.256 85 12/21/2024
3.0.255 78 12/21/2024
3.0.254 198 12/21/2024
3.0.253 81 12/21/2024
3.0.252 75 12/21/2024
3.0.251 118 12/20/2024
3.0.250 75 12/20/2024
3.0.249 140 12/20/2024
3.0.248 82 12/20/2024
3.0.247 78 12/20/2024
3.0.246 157 12/20/2024
3.0.245 143 12/20/2024
3.0.244 77 12/20/2024
3.0.243 83 12/20/2024
3.0.242 82 12/20/2024
3.0.241 141 12/20/2024
3.0.240 88 12/20/2024
3.0.239 87 12/20/2024
3.0.238 161 12/19/2024
3.0.237 79 12/19/2024
3.0.236 114 12/19/2024
3.0.235 100 12/19/2024
3.0.234 79 12/19/2024
3.0.233 74 12/19/2024
3.0.232 126 12/19/2024
3.0.231 74 12/19/2024
3.0.230 110 12/18/2024
3.0.229 79 12/18/2024
3.0.228 81 12/18/2024
3.0.227 169 12/17/2024
3.0.225 113 12/17/2024
3.0.224 144 12/17/2024
3.0.223 101 12/16/2024
3.0.222 78 12/16/2024
3.0.221 78 12/16/2024
3.0.220 86 12/16/2024
3.0.219 270 12/10/2024
3.0.218 71 12/10/2024
3.0.217 97 12/10/2024
3.0.216 84 12/10/2024
3.0.215 122 12/10/2024
3.0.214 78 12/10/2024
3.0.213 92 12/9/2024
3.0.212 91 12/9/2024
3.0.211 124 12/9/2024
3.0.210 165 12/9/2024
3.0.209 82 12/9/2024
3.0.208 89 12/9/2024
3.0.207 74 12/9/2024
3.0.206 79 12/9/2024
3.0.205 129 12/9/2024
3.0.204 75 12/9/2024
3.0.203 201 12/7/2024
3.0.202 91 12/7/2024
3.0.201 83 12/7/2024
3.0.200 80 12/6/2024
3.0.199 77 12/6/2024
3.0.198 91 12/6/2024
3.0.197 84 12/6/2024
3.0.196 86 12/6/2024
3.0.195 86 12/6/2024
3.0.194 88 12/6/2024
3.0.193 81 12/6/2024
3.0.192 88 12/6/2024
3.0.191 94 12/6/2024
3.0.190 89 12/6/2024
3.0.189 92 12/6/2024
3.0.188 90 12/6/2024
3.0.187 105 12/6/2024
3.0.184 98 12/6/2024
3.0.183 86 12/6/2024
3.0.182 83 12/6/2024
3.0.181 98 12/5/2024
3.0.180 94 12/5/2024
3.0.179 87 12/5/2024
3.0.178 641 12/5/2024
3.0.177 100 12/5/2024
3.0.176 88 12/5/2024
3.0.175 112 12/5/2024
3.0.174 77 12/5/2024
3.0.173 104 12/5/2024
3.0.172 127 12/5/2024
3.0.171 82 12/5/2024
3.0.170 117 12/5/2024
3.0.169 90 12/5/2024
3.0.168 93 12/5/2024
3.0.167 84 12/4/2024
3.0.166 87 12/4/2024
3.0.165 136 12/4/2024
3.0.164 88 12/4/2024
3.0.163 172 12/4/2024
3.0.162 115 12/4/2024
3.0.161 94 12/4/2024
3.0.160 121 12/4/2024
3.0.159 84 12/4/2024
3.0.158 140 12/4/2024
3.0.157 84 12/4/2024
3.0.156 81 12/4/2024
3.0.155 162 12/4/2024
3.0.154 85 12/3/2024
3.0.153 80 12/3/2024
3.0.152 124 12/3/2024
3.0.151 76 12/3/2024
3.0.150 112 12/3/2024
3.0.149 82 12/3/2024
3.0.148 85 12/3/2024
3.0.147 80 12/3/2024
3.0.146 127 12/3/2024
3.0.145 78 12/3/2024
3.0.144 87 12/3/2024
3.0.143 133 12/3/2024
3.0.142 82 12/3/2024
3.0.141 322 12/2/2024
3.0.140 88 12/2/2024
3.0.139 83 12/2/2024
3.0.138 75 12/2/2024
3.0.137 132 12/2/2024
3.0.136 90 12/2/2024
3.0.135 87 12/2/2024
3.0.134 139 12/2/2024
3.0.133 81 12/2/2024
3.0.132 143 12/2/2024
3.0.131 81 12/2/2024
3.0.130 184 12/2/2024
3.0.129 83 12/2/2024
3.0.128 82 12/1/2024
3.0.127 82 12/1/2024
3.0.126 124 12/1/2024
3.0.125 87 12/1/2024
3.0.124 179 12/1/2024
3.0.123 96 12/1/2024
3.0.122 89 12/1/2024
3.0.121 86 12/1/2024
3.0.120 170 11/29/2024
3.0.119 107 11/29/2024
3.0.118 82 11/29/2024
3.0.117 122 11/29/2024
3.0.116 78 11/29/2024
3.0.115 115 11/29/2024
3.0.114 98 11/29/2024
3.0.113 163 11/21/2024
3.0.112 102 11/21/2024
3.0.111 80 11/21/2024
3.0.110 86 11/21/2024
3.0.109 110 11/21/2024
3.0.108 91 11/21/2024
3.0.107 185 11/20/2024
3.0.106 94 11/20/2024
3.0.105 86 11/20/2024
3.0.104 105 11/20/2024
3.0.103 85 11/20/2024
3.0.102 78 11/20/2024
3.0.101 87 11/20/2024
3.0.100 86 11/19/2024
3.0.99 84 11/19/2024
3.0.98 78 11/19/2024
3.0.97 347 11/19/2024
3.0.96 211 11/19/2024
3.0.95 75 11/19/2024
3.0.94 75 11/19/2024
3.0.93 149 11/19/2024
3.0.92 75 11/19/2024
3.0.91 105 11/19/2024
3.0.90 83 11/19/2024
3.0.89 232 11/15/2024
3.0.88 110 11/15/2024
3.0.87 77 11/15/2024
3.0.86 87 11/14/2024
3.0.85 79 11/14/2024
3.0.84 124 11/14/2024
3.0.83 78 11/14/2024
3.0.82 87 11/14/2024
3.0.81 82 11/14/2024
3.0.80 131 11/14/2024
3.0.79 127 11/14/2024
3.0.78 91 11/14/2024
3.0.77 82 11/14/2024
3.0.76 174 11/14/2024
3.0.75 87 11/14/2024
3.0.74 128 11/14/2024
3.0.73 167 11/14/2024
3.0.72 88 11/14/2024
3.0.71 146 11/14/2024
3.0.70 85 11/14/2024
3.0.69 109 11/14/2024
3.0.68 96 11/14/2024
3.0.67 178 11/14/2024
3.0.66 88 11/14/2024
3.0.65 89 11/14/2024
2.1.64 268 11/13/2024
2.1.63 102 11/13/2024
2.1.62 119 11/13/2024
2.1.61 84 11/13/2024
2.1.60 77 11/13/2024
2.1.59 223 11/13/2024
2.1.58 88 11/13/2024
2.1.57 86 11/13/2024
2.1.56 124 11/12/2024
2.1.55 84 11/12/2024
2.1.54 603 11/9/2024
2.1.53 118 11/9/2024
2.1.52 91 11/9/2024
2.1.51 133 11/9/2024
2.1.50 93 11/9/2024
2.1.49 91 11/9/2024
2.1.48 90 11/9/2024
2.1.47 223 11/9/2024
2.1.46 208 11/8/2024
2.1.45 94 11/8/2024
2.1.44 100 11/8/2024
2.1.43 119 11/8/2024
2.1.42 97 11/8/2024
2.1.41 210 11/8/2024
2.1.40 95 11/8/2024
2.1.39 94 11/8/2024
2.1.38 185 11/8/2024
2.1.37 89 11/8/2024
2.1.36 246 11/6/2024
2.1.35 136 11/6/2024
2.1.34 271 11/1/2024
2.1.33 124 11/1/2024
2.1.32 93 11/1/2024
2.1.31 120 11/1/2024
2.1.30 150 11/1/2024
2.1.29 149 11/1/2024
2.1.28 97 11/1/2024
2.1.26 216 10/29/2024
2.1.25 83 10/29/2024
2.1.24 83 10/29/2024
2.1.23 95 10/29/2024
2.1.22 90 10/29/2024
2.1.21 82 10/29/2024
2.1.20 222 10/29/2024
2.1.19 190 10/29/2024
2.1.18 123 10/29/2024
2.1.17 90 10/29/2024
2.1.16 81 10/29/2024
2.1.15 209 10/28/2024
2.1.14 89 10/28/2024
2.1.13 87 10/28/2024
2.1.12 312 10/26/2024
2.1.11 91 10/26/2024
2.1.10 91 10/26/2024
2.1.9 82 10/26/2024
2.1.8 93 10/26/2024
2.1.7 89 10/26/2024
2.1.6 213 10/22/2024
2.1.5 90 10/22/2024
2.1.4 88 10/22/2024
2.1.3 91 10/22/2024
2.1.2 93 10/22/2024
2.1.1 94 10/22/2024