mirror of
https://github.com/JustArchiNET/ArchiSteamFarm.git
synced 2026-01-16 08:25:28 +00:00
@@ -48,12 +48,11 @@ namespace ArchiSteamFarm {
|
||||
|
||||
private static readonly object ConsoleLock = new object();
|
||||
private static readonly ManualResetEventSlim ShutdownResetEvent = new ManualResetEventSlim(false);
|
||||
private static readonly Dictionary<KeyValuePair<string, ASF.EUserInputType>, string> UserInputs = new Dictionary<KeyValuePair<string, ASF.EUserInputType>, string>();
|
||||
private static readonly WCF WCF = new WCF();
|
||||
|
||||
private static bool ShutdownSequenceInitialized;
|
||||
|
||||
private static readonly Dictionary<KeyValuePair<string, ASF.EUserInputType>, string> UserInputs = new Dictionary<KeyValuePair<string, ASF.EUserInputType>, string>();
|
||||
|
||||
internal static async Task Exit(byte exitCode = 0) {
|
||||
if (exitCode != 0) {
|
||||
ASF.ArchiLogger.LogGenericError(Strings.ErrorExitingWithNonZeroErrorCode);
|
||||
@@ -139,20 +138,6 @@ namespace ArchiSteamFarm {
|
||||
Environment.Exit(0);
|
||||
}
|
||||
|
||||
internal static void SetUserInput(ASF.EUserInputType userInputType, string botName, string userInputValue) {
|
||||
if (string.IsNullOrEmpty(botName) || string.IsNullOrEmpty(userInputValue) || (userInputType == ASF.EUserInputType.Unknown)) {
|
||||
ASF.ArchiLogger.LogGenericWarning(Strings.ErrorObjectIsNull);
|
||||
return;
|
||||
}
|
||||
|
||||
KeyValuePair<string, ASF.EUserInputType> userInputKey = new KeyValuePair<string, ASF.EUserInputType>(botName, userInputType);
|
||||
if (UserInputs.ContainsKey(userInputKey)) {
|
||||
UserInputs[userInputKey] = userInputValue;
|
||||
} else {
|
||||
UserInputs.Add(userInputKey, userInputValue);
|
||||
}
|
||||
}
|
||||
|
||||
private static async Task Init(string[] args) {
|
||||
AppDomain.CurrentDomain.UnhandledException += UnhandledExceptionHandler;
|
||||
TaskScheduler.UnobservedTaskException += UnobservedTaskExceptionHandler;
|
||||
|
||||
Reference in New Issue
Block a user