CommandPalette use FuzzyPanel, Focus search textbox

This commit is contained in:
2023-06-30 16:25:48 +02:00
parent 71606a57f9
commit 4f7c576b87
13 changed files with 122 additions and 68 deletions

View File

@@ -9,8 +9,9 @@ public class IdentifiableUserCommandService : IIdentifiableUserCommandService
public void AddIdentifiableUserCommandFactory(string identifier, Func<IIdentifiableUserCommand> commandFactory)
=> _identifiableUserCommands.Add(identifier, commandFactory);
public IIdentifiableUserCommand GetCommand(string identifier)
public IIdentifiableUserCommand? GetCommand(string identifier)
{
//TODO: refactor to not throw an exception
if (!_identifiableUserCommands.ContainsKey(identifier))
throw new IndexOutOfRangeException($"No command factory is registered for command {identifier}");