Snoop.SnoopUI.ProcessFilter C# (CSharp) Method

ProcessFilter() private method

private ProcessFilter ( ) : void
return void
        private void ProcessFilter()
        {
            if (SnoopModes.MultipleDispatcherMode && !this.Dispatcher.CheckAccess())
            {
                Action action = () => ProcessFilter();
                this.Dispatcher.BeginInvoke(action);
                return;
            }

            this.visualTreeItems.Clear();

            // cplotts todo: we've got to come up with a better way to do this.
            if (this.filter == "Clear any filter applied to the tree view")
            {
                this.SetFilter(string.Empty);
            }
            else if (this.filter == "Show only visuals with binding errors")
            {
                this.FilterBindings(this.rootVisualTreeItem);
            }
            else if (this.filter.Length == 0)
            {
                this.visualTreeItems.Add(this.rootVisualTreeItem);
            }
            else
            {
                this.FilterTree(this.rootVisualTreeItem, this.filter.ToLower());
            }
        }