mirror of
https://github.com/JustArchiNET/ArchiSteamFarm.git
synced 2026-01-14 07:30:39 +00:00
Misc
This commit is contained in:
@@ -20,6 +20,7 @@
|
|||||||
// limitations under the License.
|
// limitations under the License.
|
||||||
|
|
||||||
using System;
|
using System;
|
||||||
|
using System.ComponentModel;
|
||||||
using System.Globalization;
|
using System.Globalization;
|
||||||
using System.Threading;
|
using System.Threading;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
@@ -49,7 +50,7 @@ namespace ArchiSteamFarm.Helpers {
|
|||||||
[PublicAPI]
|
[PublicAPI]
|
||||||
public async Task<(bool Success, T? Result)> GetValue(EFallback fallback = EFallback.DefaultForType) {
|
public async Task<(bool Success, T? Result)> GetValue(EFallback fallback = EFallback.DefaultForType) {
|
||||||
if (!Enum.IsDefined(typeof(EFallback), fallback)) {
|
if (!Enum.IsDefined(typeof(EFallback), fallback)) {
|
||||||
throw new ArgumentNullException(nameof(fallback));
|
throw new InvalidEnumArgumentException(nameof(fallback), (int) fallback, typeof(EFallback));
|
||||||
}
|
}
|
||||||
|
|
||||||
if (IsInitialized && IsRecent) {
|
if (IsInitialized && IsRecent) {
|
||||||
|
|||||||
Reference in New Issue
Block a user