public void Execute(IParserCommand commandIn, Scope scope) { var command = commandIn as SetStartTime; var timeString = Regex.Match(scope.CurString, command.Pattern).Value; var index = ParseIndex(timeString, command.TimeFormat); _tracklistManager.SetCurIndex(index); }
public void Execute(IParserCommand command, Scope scope = null) { scope = scope ?? GlobalScope; if (_behaviorIndex.TryGetValue(command.GetType(), out var behavior)) { behavior.Execute(command, scope); } else { throw new KeyNotFoundException($"No {command.GetType()} registered in the CommandDict"); } }
public void Execute(IParserCommand commandIn, Scope scope) { var command = commandIn as SetTag; _tagSpaceManager.SetTag(command.TagName, command.TagValue); }