-
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
8 changed files
with
135 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
41 changes: 41 additions & 0 deletions
41
craftersmine.SteamGridDB.Net/Exceptions/SteamGridDbRateLimitedException.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
using System; | ||
using System.Collections.Generic; | ||
using System.Runtime.Serialization; | ||
using System.Text; | ||
|
||
namespace craftersmine.SteamGridDBNet.Exceptions | ||
{ | ||
/// <summary> | ||
/// The exception that is thrown when you are being rate-limited on server | ||
/// </summary> | ||
[Serializable] | ||
public class SteamGridDbRateLimitedException : SteamGridDbException | ||
{ | ||
public TimeSpan RetryAfter { get; private set; } | ||
|
||
/// <inheritdoc cref="SteamGridDbException"/> | ||
public SteamGridDbRateLimitedException(TimeSpan retryAfter) | ||
{ | ||
RetryAfter = retryAfter; | ||
} | ||
|
||
/// <inheritdoc cref="SteamGridDbException"/> | ||
public SteamGridDbRateLimitedException(string message, TimeSpan retryAfter) : base(message) | ||
{ | ||
RetryAfter = retryAfter; | ||
} | ||
|
||
/// <inheritdoc cref="SteamGridDbException"/> | ||
public SteamGridDbRateLimitedException(string message, TimeSpan retryAfter, Exception inner) : base(message, inner) | ||
{ | ||
RetryAfter = retryAfter; | ||
} | ||
|
||
/// <inheritdoc cref="SteamGridDbException"/> | ||
protected SteamGridDbRateLimitedException( | ||
SerializationInfo info, | ||
StreamingContext context) : base(info, context) | ||
{ | ||
} | ||
} | ||
} |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters