internal void AddExpression(string expression) { if (!_regExpression.IsMatch(expression)) { throw new ArgumentException(string.Format(CultureInfo.InvariantCulture, "An expression should follow the format: {0}", _regExpressionPatternSimplified)); } _filteringExpressions.Add(expression); OnFilteringUpdate?.Invoke(); }
internal void RemoveExpression(int index) { if (index < 0) { throw new ArgumentException("Expression isn't selected."); } if (index >= _filteringExpressions.Count) { throw new ArgumentException("Selection error."); } _filteringExpressions.RemoveAt(index); OnFilteringUpdate?.Invoke(); }
internal void EditExpression(int index) { if (index < 0) { throw new ArgumentException("Expression isn't selected."); } if (index >= _filteringExpressions.Count) { throw new ArgumentException("Selection error."); } string expression = _filteringExpressions[index]; _filteringExpressions.RemoveAt(index); CurrentFilteringExpression = expression; OnFilteringUpdate?.Invoke(); }