Was trying RateLimiter, but can't get it to work like showed in the Readme / Documentation.
Error CS1061 'TimeLimiter' does not contain a definition for 'GetAwaiter' and no accessible extension method 'GetAwaiter' accepting a first argument of type 'TimeLimiter' could be found (are you missing a using directive or an assembly reference?)
Tried with .NET Framework 4.7.2 and .NET 5.
Is the code changed lately?
Code:
using RateLimiter;
using System;
using System.Threading.Tasks;
namespace RateLimiterTest
{
class Program
{
private static readonly TimeLimiter TimeLimiterTest = TimeLimiter.GetFromMaxCountByInterval(20, TimeSpan.FromMinutes(1));
static async Task Main(string[] args)
{
Console.WriteLine("Hello World!");
await TimeLimiterTest;
Console.WriteLine("Finished!");
}
}
}
Also it would be nice to use an interval of 5 seconds so you can better see the time differences.
Was trying RateLimiter, but can't get it to work like showed in the Readme / Documentation.
Error CS1061 'TimeLimiter' does not contain a definition for 'GetAwaiter' and no accessible extension method 'GetAwaiter' accepting a first argument of type 'TimeLimiter' could be found (are you missing a using directive or an assembly reference?)
Tried with .NET Framework 4.7.2 and .NET 5.
Is the code changed lately?
Code:
Also it would be nice to use an interval of 5 seconds so you can better see the time differences.