mirror of
https://github.com/JustArchiNET/ArchiSteamFarm.git
synced 2026-01-01 14:10:53 +00:00
Misc
This commit is contained in:
@@ -67,7 +67,6 @@ namespace ArchiSteamFarm {
|
||||
private string FilePath;
|
||||
private bool ReadOnly;
|
||||
|
||||
// This constructor is used when creating new database
|
||||
private BotDatabase([NotNull] string filePath) {
|
||||
if (string.IsNullOrEmpty(filePath)) {
|
||||
throw new ArgumentNullException(nameof(filePath));
|
||||
@@ -76,7 +75,7 @@ namespace ArchiSteamFarm {
|
||||
FilePath = filePath;
|
||||
}
|
||||
|
||||
// This constructor is used only by deserializer
|
||||
[JsonConstructor]
|
||||
private BotDatabase() { }
|
||||
|
||||
public void Dispose() => FileSemaphore.Dispose();
|
||||
|
||||
@@ -49,7 +49,6 @@ namespace ArchiSteamFarm {
|
||||
|
||||
private string FilePath;
|
||||
|
||||
// This constructor is used when creating new database
|
||||
private GlobalDatabase([NotNull] string filePath) : this() {
|
||||
if (string.IsNullOrEmpty(filePath)) {
|
||||
throw new ArgumentNullException(nameof(filePath));
|
||||
@@ -58,7 +57,7 @@ namespace ArchiSteamFarm {
|
||||
FilePath = filePath;
|
||||
}
|
||||
|
||||
// This constructor is used only by deserializer
|
||||
[JsonConstructor]
|
||||
private GlobalDatabase() => ServerListProvider.ServerListUpdated += OnServerListUpdated;
|
||||
|
||||
public void Dispose() {
|
||||
|
||||
@@ -63,6 +63,7 @@ namespace ArchiSteamFarm {
|
||||
[JsonProperty(PropertyName = "device_id")]
|
||||
private string DeviceID;
|
||||
|
||||
[JsonConstructor]
|
||||
private MobileAuthenticator() { }
|
||||
|
||||
internal void CorrectDeviceID(string deviceID) {
|
||||
|
||||
@@ -559,6 +559,7 @@ namespace ArchiSteamFarm {
|
||||
return skippedSetsThisRound.Count > 0;
|
||||
}
|
||||
|
||||
[SuppressMessage("ReSharper", "ClassCannotBeInstantiated")]
|
||||
private sealed class ListedUser {
|
||||
internal readonly HashSet<Steam.Asset.EType> MatchableTypes = new HashSet<Steam.Asset.EType>();
|
||||
|
||||
@@ -685,6 +686,9 @@ namespace ArchiSteamFarm {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
[JsonConstructor]
|
||||
private ListedUser() { }
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -45,6 +45,7 @@ namespace ArchiSteamFarm.SteamKit2 {
|
||||
ProtocolTypes = protocolTypes;
|
||||
}
|
||||
|
||||
[JsonConstructor]
|
||||
private ServerRecordEndPoint() { }
|
||||
|
||||
public bool Equals(ServerRecordEndPoint other) => (other != null) && (ReferenceEquals(other, this) || ((Host == other.Host) && (Port == other.Port) && (ProtocolTypes == other.ProtocolTypes)));
|
||||
|
||||
Reference in New Issue
Block a user