Soenneker.Utils.RateLimiting.Factory 3.0.381

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.381                
NuGet\Install-Package Soenneker.Utils.RateLimiting.Factory -Version 3.0.381                
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.381" />                
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.381                
#r "nuget: Soenneker.Utils.RateLimiting.Factory, 3.0.381"                
#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.381

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

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