feat: upgrade to .NET 6, refactor everything

This commit is contained in:
spiral
2021-11-26 21:10:56 -05:00
parent d28e99ba43
commit 1918c56937
314 changed files with 27954 additions and 27966 deletions

View File

@@ -1,29 +1,26 @@
using System;
using Myriad.Rest.Ratelimit;
namespace Myriad.Rest.Exceptions
namespace Myriad.Rest.Exceptions;
public class RatelimitException: Exception
{
public class RatelimitException: Exception
public RatelimitException(string? message) : base(message) { }
}
public class RatelimitBucketExhaustedException: RatelimitException
{
public RatelimitBucketExhaustedException(Bucket bucket, TimeSpan retryAfter) : base(
"Rate limit bucket exhausted, request blocked")
{
public RatelimitException(string? message) : base(message) { }
Bucket = bucket;
RetryAfter = retryAfter;
}
public class RatelimitBucketExhaustedException: RatelimitException
{
public RatelimitBucketExhaustedException(Bucket bucket, TimeSpan retryAfter) : base(
"Rate limit bucket exhausted, request blocked")
{
Bucket = bucket;
RetryAfter = retryAfter;
}
public Bucket Bucket { get; }
public TimeSpan RetryAfter { get; }
}
public Bucket Bucket { get; }
public TimeSpan RetryAfter { get; }
}
public class GloballyRatelimitedException: RatelimitException
{
public GloballyRatelimitedException() : base("Global rate limit hit") { }
}
public class GloballyRatelimitedException: RatelimitException
{
public GloballyRatelimitedException() : base("Global rate limit hit") { }
}