Soenneker.Utils.RateLimiting.Factory 3.0.320

Prefix Reserved
dotnet add package Soenneker.Utils.RateLimiting.Factory --version 3.0.320                
NuGet\Install-Package Soenneker.Utils.RateLimiting.Factory -Version 3.0.320                
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.320" />                
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.320                
#r "nuget: Soenneker.Utils.RateLimiting.Factory, 3.0.320"                
#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.320

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

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. 
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.320 40 12/28/2024
3.0.319 48 12/28/2024
3.0.318 25 12/28/2024
3.0.317 26 12/28/2024
3.0.316 39 12/28/2024
3.0.315 48 12/28/2024
3.0.314 26 12/28/2024
3.0.313 43 12/27/2024
3.0.312 39 12/27/2024
3.0.311 66 12/27/2024
3.0.310 34 12/27/2024
3.0.309 154 12/24/2024
3.0.308 95 12/24/2024
3.0.307 68 12/24/2024
3.0.306 64 12/24/2024
3.0.305 115 12/24/2024
3.0.304 78 12/24/2024
3.0.303 92 12/24/2024
3.0.302 69 12/24/2024
3.0.301 65 12/24/2024
3.0.300 142 12/24/2024
3.0.299 144 12/24/2024
3.0.298 93 12/24/2024
3.0.297 63 12/24/2024
3.0.296 70 12/24/2024
3.0.295 68 12/24/2024
3.0.294 99 12/24/2024
3.0.293 66 12/24/2024
3.0.292 99 12/23/2024
3.0.291 58 12/23/2024
3.0.290 79 12/23/2024
3.0.289 67 12/23/2024
3.0.288 121 12/23/2024
3.0.287 171 12/23/2024
3.0.286 64 12/23/2024
3.0.285 122 12/23/2024
3.0.284 70 12/23/2024
3.0.283 67 12/23/2024
3.0.282 93 12/23/2024
3.0.281 65 12/23/2024
3.0.280 180 12/23/2024
3.0.279 64 12/23/2024
3.0.278 101 12/22/2024
3.0.277 63 12/22/2024
3.0.276 69 12/22/2024
3.0.275 143 12/22/2024
3.0.274 76 12/22/2024
3.0.273 68 12/22/2024
3.0.272 76 12/22/2024
3.0.271 186 12/22/2024
3.0.270 68 12/22/2024
3.0.269 119 12/22/2024
3.0.268 161 12/22/2024
3.0.267 70 12/22/2024
3.0.266 98 12/22/2024
3.0.265 95 12/21/2024
3.0.264 80 12/21/2024
3.0.263 87 12/21/2024
3.0.262 69 12/21/2024
3.0.261 209 12/21/2024
3.0.260 69 12/21/2024
3.0.259 104 12/21/2024
3.0.258 69 12/21/2024
3.0.257 139 12/21/2024
3.0.256 74 12/21/2024
3.0.255 67 12/21/2024
3.0.254 187 12/21/2024
3.0.253 70 12/21/2024
3.0.252 64 12/21/2024
3.0.251 107 12/20/2024
3.0.250 64 12/20/2024
3.0.249 129 12/20/2024
3.0.248 71 12/20/2024
3.0.247 67 12/20/2024
3.0.246 146 12/20/2024
3.0.245 132 12/20/2024
3.0.244 65 12/20/2024
3.0.243 72 12/20/2024
3.0.242 71 12/20/2024
3.0.241 130 12/20/2024
3.0.240 77 12/20/2024
3.0.239 76 12/20/2024
3.0.238 150 12/19/2024
3.0.237 68 12/19/2024
3.0.236 103 12/19/2024
3.0.235 89 12/19/2024
3.0.234 68 12/19/2024
3.0.233 63 12/19/2024
3.0.232 115 12/19/2024
3.0.231 63 12/19/2024
3.0.230 99 12/18/2024
3.0.229 68 12/18/2024
3.0.228 70 12/18/2024
3.0.227 158 12/17/2024
3.0.225 102 12/17/2024
3.0.224 133 12/17/2024
3.0.223 90 12/16/2024
3.0.222 62 12/16/2024
3.0.221 67 12/16/2024
3.0.220 75 12/16/2024
3.0.219 261 12/10/2024
3.0.218 62 12/10/2024
3.0.217 88 12/10/2024
3.0.216 75 12/10/2024
3.0.215 113 12/10/2024
3.0.214 69 12/10/2024
3.0.213 83 12/9/2024
3.0.212 82 12/9/2024
3.0.211 115 12/9/2024
3.0.210 156 12/9/2024
3.0.209 73 12/9/2024
3.0.208 80 12/9/2024
3.0.207 65 12/9/2024
3.0.206 69 12/9/2024
3.0.205 119 12/9/2024
3.0.204 65 12/9/2024
3.0.203 192 12/7/2024
3.0.202 82 12/7/2024
3.0.201 74 12/7/2024
3.0.200 71 12/6/2024
3.0.199 68 12/6/2024
3.0.198 82 12/6/2024
3.0.197 75 12/6/2024
3.0.196 77 12/6/2024
3.0.195 77 12/6/2024
3.0.194 79 12/6/2024
3.0.193 72 12/6/2024
3.0.192 79 12/6/2024
3.0.191 85 12/6/2024
3.0.190 80 12/6/2024
3.0.189 83 12/6/2024
3.0.188 81 12/6/2024
3.0.187 96 12/6/2024
3.0.184 89 12/6/2024
3.0.183 77 12/6/2024
3.0.182 74 12/6/2024
3.0.181 87 12/5/2024
3.0.180 83 12/5/2024
3.0.179 78 12/5/2024
3.0.178 630 12/5/2024
3.0.177 91 12/5/2024
3.0.176 79 12/5/2024
3.0.175 101 12/5/2024
3.0.174 68 12/5/2024
3.0.173 95 12/5/2024
3.0.172 116 12/5/2024
3.0.171 73 12/5/2024
3.0.170 108 12/5/2024
3.0.169 81 12/5/2024
3.0.168 84 12/5/2024
3.0.167 75 12/4/2024
3.0.166 76 12/4/2024
3.0.165 126 12/4/2024
3.0.164 79 12/4/2024
3.0.163 163 12/4/2024
3.0.162 107 12/4/2024
3.0.161 85 12/4/2024
3.0.160 112 12/4/2024
3.0.159 75 12/4/2024
3.0.158 131 12/4/2024
3.0.157 75 12/4/2024
3.0.156 72 12/4/2024
3.0.155 153 12/4/2024
3.0.154 74 12/3/2024
3.0.153 71 12/3/2024
3.0.152 113 12/3/2024
3.0.151 66 12/3/2024
3.0.150 103 12/3/2024
3.0.149 73 12/3/2024
3.0.148 76 12/3/2024
3.0.147 71 12/3/2024
3.0.146 118 12/3/2024
3.0.145 67 12/3/2024
3.0.144 78 12/3/2024
3.0.143 117 12/3/2024
3.0.142 71 12/3/2024
3.0.141 313 12/2/2024
3.0.140 79 12/2/2024
3.0.139 74 12/2/2024
3.0.138 62 12/2/2024
3.0.137 123 12/2/2024
3.0.136 81 12/2/2024
3.0.135 76 12/2/2024
3.0.134 130 12/2/2024
3.0.133 70 12/2/2024
3.0.132 134 12/2/2024
3.0.131 72 12/2/2024
3.0.130 175 12/2/2024
3.0.129 72 12/2/2024
3.0.128 73 12/1/2024
3.0.127 73 12/1/2024
3.0.126 115 12/1/2024
3.0.125 76 12/1/2024
3.0.124 167 12/1/2024
3.0.123 87 12/1/2024
3.0.122 80 12/1/2024
3.0.121 77 12/1/2024
3.0.120 164 11/29/2024
3.0.119 101 11/29/2024
3.0.118 76 11/29/2024
3.0.117 116 11/29/2024
3.0.116 72 11/29/2024
3.0.115 109 11/29/2024
3.0.114 90 11/29/2024
3.0.113 155 11/21/2024
3.0.112 94 11/21/2024
3.0.111 74 11/21/2024
3.0.110 80 11/21/2024
3.0.109 104 11/21/2024
3.0.108 85 11/21/2024
3.0.107 178 11/20/2024
3.0.106 88 11/20/2024
3.0.105 78 11/20/2024
3.0.104 97 11/20/2024
3.0.103 77 11/20/2024
3.0.102 72 11/20/2024
3.0.101 81 11/20/2024
3.0.100 80 11/19/2024
3.0.99 76 11/19/2024
3.0.98 72 11/19/2024
3.0.97 339 11/19/2024
3.0.96 203 11/19/2024
3.0.95 67 11/19/2024
3.0.94 69 11/19/2024
3.0.93 143 11/19/2024
3.0.92 69 11/19/2024
3.0.91 97 11/19/2024
3.0.90 77 11/19/2024
3.0.89 225 11/15/2024
3.0.88 101 11/15/2024
3.0.87 70 11/15/2024
3.0.86 80 11/14/2024
3.0.85 72 11/14/2024
3.0.84 115 11/14/2024
3.0.83 71 11/14/2024
3.0.82 78 11/14/2024
3.0.81 73 11/14/2024
3.0.80 124 11/14/2024
3.0.79 120 11/14/2024
3.0.78 84 11/14/2024
3.0.77 73 11/14/2024
3.0.76 165 11/14/2024
3.0.75 80 11/14/2024
3.0.74 119 11/14/2024
3.0.73 160 11/14/2024
3.0.72 81 11/14/2024
3.0.71 139 11/14/2024
3.0.70 78 11/14/2024
3.0.69 100 11/14/2024
3.0.68 89 11/14/2024
3.0.67 171 11/14/2024
3.0.66 79 11/14/2024
3.0.65 82 11/14/2024
2.1.64 261 11/13/2024
2.1.63 95 11/13/2024
2.1.62 106 11/13/2024
2.1.61 77 11/13/2024
2.1.60 70 11/13/2024
2.1.59 214 11/13/2024
2.1.58 81 11/13/2024
2.1.57 79 11/13/2024
2.1.56 117 11/12/2024
2.1.55 75 11/12/2024
2.1.54 596 11/9/2024
2.1.53 111 11/9/2024
2.1.52 84 11/9/2024
2.1.51 126 11/9/2024
2.1.50 84 11/9/2024
2.1.49 82 11/9/2024
2.1.48 83 11/9/2024
2.1.47 216 11/9/2024
2.1.46 199 11/8/2024
2.1.45 87 11/8/2024
2.1.44 91 11/8/2024
2.1.43 109 11/8/2024
2.1.42 88 11/8/2024
2.1.41 201 11/8/2024
2.1.40 86 11/8/2024
2.1.39 87 11/8/2024
2.1.38 176 11/8/2024
2.1.37 80 11/8/2024
2.1.36 240 11/6/2024
2.1.35 130 11/6/2024
2.1.34 265 11/1/2024
2.1.33 118 11/1/2024
2.1.32 87 11/1/2024
2.1.31 114 11/1/2024
2.1.30 144 11/1/2024
2.1.29 143 11/1/2024
2.1.28 91 11/1/2024
2.1.26 208 10/29/2024
2.1.25 77 10/29/2024
2.1.24 77 10/29/2024
2.1.23 89 10/29/2024
2.1.22 84 10/29/2024
2.1.21 76 10/29/2024
2.1.20 214 10/29/2024
2.1.19 184 10/29/2024
2.1.18 117 10/29/2024
2.1.17 84 10/29/2024
2.1.16 75 10/29/2024
2.1.15 200 10/28/2024
2.1.14 82 10/28/2024
2.1.13 78 10/28/2024
2.1.12 305 10/26/2024
2.1.11 82 10/26/2024
2.1.10 82 10/26/2024
2.1.9 75 10/26/2024
2.1.8 84 10/26/2024
2.1.7 82 10/26/2024
2.1.6 206 10/22/2024
2.1.5 84 10/22/2024
2.1.4 82 10/22/2024
2.1.3 85 10/22/2024
2.1.2 87 10/22/2024
2.1.1 88 10/22/2024