Soenneker.Utils.RateLimiting.Factory 3.0.240

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

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

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.441 0 10 hours ago
3.0.440 0 14 hours ago
3.0.439 0 14 hours ago
3.0.438 17 17 hours ago
3.0.437 15 17 hours ago
3.0.436 38 19 hours ago
3.0.435 19 19 hours ago
3.0.434 41 a day ago
3.0.433 41 a day ago
3.0.432 64 a day ago
3.0.431 33 a day ago
3.0.430 43 a day ago
3.0.429 72 2 days ago
3.0.428 46 2 days ago
3.0.427 46 2 days ago
3.0.426 33 2 days ago
3.0.425 44 2 days ago
3.0.424 56 2 days ago
3.0.423 34 2 days ago
3.0.422 70 2 days ago
3.0.421 41 2 days ago
3.0.420 70 2 days ago
3.0.419 62 2 days ago
3.0.418 34 2 days ago
3.0.417 33 2 days ago
3.0.416 63 3 days ago
3.0.415 45 3 days ago
3.0.414 96 3 days ago
3.0.413 39 3 days ago
3.0.412 39 3 days ago
3.0.411 40 3 days ago
3.0.410 39 3 days ago
3.0.409 35 3 days ago
3.0.408 33 3 days ago
3.0.407 34 3 days ago
3.0.406 33 3 days ago
3.0.405 29 3 days ago
3.0.404 33 3 days ago
3.0.403 30 3 days ago
3.0.402 30 3 days ago
3.0.401 31 3 days ago
3.0.400 44 3 days ago
3.0.399 39 3 days ago
3.0.398 70 5 days ago
3.0.397 56 5 days ago
3.0.396 50 5 days ago
3.0.395 80 5 days ago
3.0.394 56 5 days ago
3.0.393 69 5 days ago
3.0.392 53 5 days ago
3.0.391 99 5 days ago
3.0.390 55 5 days ago
3.0.389 93 6 days ago
3.0.388 49 6 days ago
3.0.387 56 6 days ago
3.0.386 68 6 days ago
3.0.385 74 7 days ago
3.0.384 54 7 days ago
3.0.383 59 7 days ago
3.0.382 57 7 days ago
3.0.381 77 7 days ago
3.0.380 55 7 days ago
3.0.379 81 7 days ago
3.0.378 59 7 days ago
3.0.377 83 7 days ago
3.0.376 59 7 days ago
3.0.375 76 7 days ago
3.0.374 57 7 days ago
3.0.373 75 8 days ago
3.0.372 59 8 days ago
3.0.371 232 14 days ago
3.0.370 160 14 days ago
3.0.369 109 14 days ago
3.0.368 90 14 days ago
3.0.367 105 15 days ago
3.0.366 94 15 days ago
3.0.365 146 15 days ago
3.0.364 99 15 days ago
3.0.363 89 15 days ago
3.0.362 75 15 days ago
3.0.361 88 15 days ago
3.0.360 77 15 days ago
3.0.359 144 15 days ago
3.0.358 76 15 days ago
3.0.357 147 15 days ago
3.0.356 80 15 days ago
3.0.355 252 15 days ago
3.0.354 77 15 days ago
3.0.353 80 15 days ago
3.0.352 178 16 days ago
3.0.351 87 16 days ago
3.0.350 84 16 days ago
3.0.349 128 16 days ago
3.0.348 81 16 days ago
3.0.347 93 17 days ago
3.0.346 80 17 days ago
3.0.345 153 17 days ago
3.0.344 90 17 days ago
3.0.343 82 17 days ago
3.0.342 91 17 days ago
3.0.341 120 17 days ago
3.0.340 90 17 days ago
3.0.339 97 17 days ago
3.0.338 88 17 days ago
3.0.337 84 17 days ago
3.0.336 181 17 days ago
3.0.335 93 17 days ago
3.0.334 94 17 days ago
3.0.333 248 17 days ago
3.0.332 102 17 days ago
3.0.331 103 17 days ago
3.0.330 97 17 days ago
3.0.329 217 18 days ago
3.0.328 71 18 days ago
3.0.327 68 18 days ago
3.0.326 129 18 days ago
3.0.325 71 18 days ago
3.0.324 76 18 days ago
3.0.323 76 18 days ago
3.0.322 76 18 days ago
3.0.321 203 18 days ago
3.0.320 142 20 days ago
3.0.319 128 21 days ago
3.0.318 82 21 days ago
3.0.317 81 21 days ago
3.0.316 93 21 days ago
3.0.315 118 21 days ago
3.0.314 72 21 days ago
3.0.313 85 21 days ago
3.0.312 80 21 days ago
3.0.311 148 21 days ago
3.0.310 77 21 days ago
3.0.309 267 24 days ago
3.0.308 132 24 days ago
3.0.307 79 24 days ago
3.0.306 75 24 days ago
3.0.305 147 24 days ago
3.0.304 95 24 days ago
3.0.303 107 24 days ago
3.0.302 80 25 days ago
3.0.301 76 25 days ago
3.0.300 156 25 days ago
3.0.299 155 25 days ago
3.0.298 104 25 days ago
3.0.297 74 25 days ago
3.0.296 81 25 days ago
3.0.295 79 25 days ago
3.0.294 110 25 days ago
3.0.293 77 25 days ago
3.0.292 110 25 days ago
3.0.291 69 25 days ago
3.0.290 90 25 days ago
3.0.289 78 25 days ago
3.0.288 132 25 days ago
3.0.287 182 25 days ago
3.0.286 75 25 days 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 a month ago
3.0.149 82 a month ago
3.0.148 85 a month ago
3.0.147 80 a month ago
3.0.146 127 a month ago
3.0.145 78 a month ago
3.0.144 87 a month ago
3.0.143 133 a month ago
3.0.142 82 a month ago
3.0.141 322 a month ago
3.0.140 88 a month 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 248 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