This commit is contained in:
2022-06-09 17:19:51 +03:00
parent 781bb489bd
commit 97888626b6
3 changed files with 4 additions and 5 deletions

View File

@@ -96,7 +96,7 @@ internal class Boot
Console.Title = "ONLINE"; Console.Title = "ONLINE";
isReady = true; isReady = true;
new Thread(async () => new Thread(() =>
{ {
while (true) while (true)
{ {

View File

@@ -78,9 +78,8 @@ namespace PluginManager
appConfig = new() { ApplicationVariables = new Dictionary<string, object>(), ProtectedKeyWords = new List<string>() }; appConfig = new() { ApplicationVariables = new Dictionary<string, object>(), ProtectedKeyWords = new List<string>() };
} }
public static string? GetKey(string value) => appConfig.ApplicationVariables.Keys.FirstOrDefault(x => appConfig.ApplicationVariables[x] == value); public static bool ContainsValue<T>(T value) => appConfig.ApplicationVariables.ContainsValue(value!);
public static bool ContainsValue(string value) => appConfig.ApplicationVariables.ContainsValue(value); public static bool ContainsKey(string key) => appConfig.ApplicationVariables.ContainsKey(key);
public static bool ContainsKey(string key) => appConfig.ApplicationVariables.ContainsKey(key);
public static Dictionary<string, object> GetAllVariables() => new(appConfig.ApplicationVariables); public static Dictionary<string, object> GetAllVariables() => new(appConfig.ApplicationVariables);
} }

View File

@@ -188,7 +188,7 @@ public class ConsoleCommandsHandler
} }
); );
AddCommand("add", "add variable to the system variables\nadd [key] [value] [isReadOnly=true/false]", async args => AddCommand("add", "add variable to the system variables\nadd [key] [value] [isReadOnly=true/false]", args =>
{ {
if (args.Length < 4) return; if (args.Length < 4) return;
var key = args[1]; var key = args[1];