console: add public interface

This commit is contained in:
goat 2024-06-07 21:04:31 +02:00
parent fabc78b6d4
commit 02022599e5
3 changed files with 306 additions and 2 deletions

View file

@ -191,7 +191,7 @@ internal partial class ConsoleManager : IServiceType
return false;
var entryName = matches[0].Value;
if (string.IsNullOrEmpty(entryName) || entryName.Any(x => x == ' '))
if (string.IsNullOrEmpty(entryName) || entryName.Any(char.IsWhiteSpace))
{
Log.Error("No valid command specified");
return false;
@ -419,7 +419,7 @@ internal partial class ConsoleManager : IServiceType
/// </summary>
private class ConsoleCommand : ConsoleEntry, IConsoleCommand
{
private Delegate func;
private readonly Delegate func;
/// <summary>
/// Initializes a new instance of the <see cref="ConsoleCommand"/> class.