public void ResetFilter() { _currentQueryString = Setting.Muteds.Value.ToQuery(); _lastCommit = null; FoundError = false; this.RaisePropertyChanged(() => QueryString); }
private async void CheckCompileFilters(string source) { try { var newFilter = await Task.Run(() => QueryCompiler.CompileFilters(source)); newFilter.GetEvaluator(); // validate types newFilter.GetSqlQuery(); // validate types (phase 2) _lastCommit = newFilter; FoundError = false; } catch (Exception ex) { FoundError = true; ExceptionMessage = ex.Message; } _isDirtyState = false; }
public void Close() { if (!IsConfigurationActive) { return; } this.IsConfigurationActive = false; // refresh mute filter if (_isDirtyState) { try { var newFilter = QueryCompiler.CompileFilters(_currentQueryString); newFilter.GetEvaluator(); // validate types _lastCommit = newFilter; } catch { } } if (_lastCommit != null) { Setting.Muteds.Value = _lastCommit; } // update connection property _accounts.ForEach(a => a.CommitChanges()); // dispose fswatcher this._fsWatcher.Dispose(); // update theme ApplyTheme(); // callback completion handler if (_completeCallback != null) { _completeCallback.OnNext(Unit.Default); _completeCallback.OnCompleted(); _completeCallback = null; } }
public static FilterPredicateViewModelBase Create(FilterExpressionRoot root) { throw new NotImplementedException(); }
public void AddPredicate(string query) { Value = QueryCompiler.CompileFilters(Value.ToQuery() + " | " + query); }