In C#, I am calling a public API, which has an API limit of 10 calls per second. API has multiple methods, different users can call different methods at a time, hence there are chances that "Rate Limit Reached" Exception may occur.
I have the following class structure:
public class MyServiceManager
{
public int Method1()
{
}
public void Method2()
{
}
public string Method3()
{
}
}
Multiple users can call different methods at a time, How can I maintain a static calling Queue or Task so that I can monitor all requests and entertain only 10 requests in a one second