Exemple #1
0
        static ICommandResult ExecuteCommand(string commandTag, params string[] args)
        {
            // Check for Samarium commands first.
            // If default, check in plugins.
            var command = SystemCommands.FirstOrDefault(x => x.CommandTag == commandTag) ??
                          Registry.PluginInstances.FirstOrDefault(plugin => plugin.HasCommand(commandTag))?.GetCommand(commandTag);

            if (command is default(ICommand))
            {
                Error("Attempted to execute command {0} with params {1}; command was not found!", commandTag, string.Join(", ", args));
                return(default);