public void ExecuteCommand(Command command) { command.ThrowIfNull("command"); _worldObserver.CommandExecuting(command); CommandResult result = command.Execute(_context); bool wasDeferred = result == CommandResult.Deferred; if (wasDeferred) { _commandList.Add(command, _worldInstance.WorldTime.Total); } else { _worldObserver.CommandExecuted(command, result); } }
protected override CommandResult OnExecute(CommandContext context) { _command = _commandDelegate(context); return _command.Execute(context); }