Soenneker.Utils.RateLimiting.Factory 3.0.790

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.790
                    
NuGet\Install-Package Soenneker.Utils.RateLimiting.Factory -Version 3.0.790
                    
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.790" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Soenneker.Utils.RateLimiting.Factory" Version="3.0.790" />
                    
Directory.Packages.props
<PackageReference Include="Soenneker.Utils.RateLimiting.Factory" />
                    
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 Soenneker.Utils.RateLimiting.Factory --version 3.0.790
                    
#r "nuget: Soenneker.Utils.RateLimiting.Factory, 3.0.790"
                    
#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 Soenneker.Utils.RateLimiting.Factory@3.0.790
                    
#: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=Soenneker.Utils.RateLimiting.Factory&version=3.0.790
                    
Install as a Cake Addin
#tool nuget:?package=Soenneker.Utils.RateLimiting.Factory&version=3.0.790
                    
Install as a Cake Tool

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.  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 (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
4.0.1082 185 4/24/2026
4.0.1081 170 4/24/2026
4.0.1080 89 4/23/2026
4.0.1079 135 4/23/2026
4.0.1078 168 4/23/2026
4.0.1077 121 4/23/2026
4.0.1076 161 4/23/2026
4.0.1075 151 4/22/2026
4.0.1074 151 4/22/2026
4.0.1073 86 4/21/2026
4.0.1072 276 4/15/2026
4.0.1071 127 4/14/2026
4.0.1070 162 4/14/2026
4.0.1069 150 4/7/2026
4.0.1068 250 3/31/2026
4.0.1067 392 3/14/2026
4.0.1066 167 3/13/2026
4.0.1065 171 3/13/2026
4.0.1064 190 3/13/2026
3.0.790 213 3/29/2025
Loading failed