mirror of
https://github.com/JustArchiNET/ArchiSteamFarm.git
synced 2026-01-16 08:25:28 +00:00
.NET 8 (#3005)
* Initial .NET 8 * Make it compile in release mode ignoring warnings for now * First round of improvements * Second round of improvements * Third round of improvements * Use new throws * Fix .NET Framework, YAY, thanks madness! Madness devs are awesome * Misc * Misc * AF_NETLINK might be required for some http calls No clue why * Fix service files Doesn't do what it should * Update CardsFarmer.cs * New improvements * Address feedback * Misc * Misc * Misc refactor * Misc
This commit is contained in:
committed by
GitHub
parent
1e04acb904
commit
b34f18497d
@@ -35,9 +35,7 @@ public abstract class GenericDatabase : SerializableFile {
|
||||
|
||||
[PublicAPI]
|
||||
public void DeleteFromJsonStorage(string key) {
|
||||
if (string.IsNullOrEmpty(key)) {
|
||||
throw new ArgumentNullException(nameof(key));
|
||||
}
|
||||
ArgumentException.ThrowIfNullOrEmpty(key);
|
||||
|
||||
if (!KeyValueJsonStorage.TryRemove(key, out _)) {
|
||||
return;
|
||||
@@ -48,19 +46,14 @@ public abstract class GenericDatabase : SerializableFile {
|
||||
|
||||
[PublicAPI]
|
||||
public JToken? LoadFromJsonStorage(string key) {
|
||||
if (string.IsNullOrEmpty(key)) {
|
||||
throw new ArgumentNullException(nameof(key));
|
||||
}
|
||||
ArgumentException.ThrowIfNullOrEmpty(key);
|
||||
|
||||
return KeyValueJsonStorage.TryGetValue(key, out JToken? value) ? value : null;
|
||||
}
|
||||
|
||||
[PublicAPI]
|
||||
public void SaveToJsonStorage(string key, JToken value) {
|
||||
if (string.IsNullOrEmpty(key)) {
|
||||
throw new ArgumentNullException(nameof(key));
|
||||
}
|
||||
|
||||
ArgumentException.ThrowIfNullOrEmpty(key);
|
||||
ArgumentNullException.ThrowIfNull(value);
|
||||
|
||||
if (value.Type == JTokenType.Null) {
|
||||
|
||||
Reference in New Issue
Block a user