/OperationLimiter

OperationLimiter is a simple time based operation limiter library.

Primary LanguageC#GNU General Public License v3.0GPL-3.0

alt tag

OperationLimiter is a simple time based operation limiter library.

NuGet version Nuget

Features:

  • Limit operation by Second (N times in one second)
  • Limit operation by Minute (N times in one minute)
  • Limit operation by Hour (N times in one hour)

Usages:


var operationLimiter = new OperationLimiter(2, OperationLimitType.Minute);

for (int i = 1; i <= 10; i++)
{
    Console.WriteLine($"Operation {i}: {DateTime.Now.ToLongTimeString()}");

    await operationLimiter.LimitAsync();
}

Release Notes

1.0.0

  • Base Release