Exemplo n.º 1
0
		void ApplyFilterToChild(ILSpyTreeNode child)
		{
			FilterResult r;
			if (this.FilterSettings == null)
				r = FilterResult.Match;
			else
				r = child.Filter(this.FilterSettings);
			switch (r)
			{
				case FilterResult.Hidden:
					child.IsHidden = true;
					break;
				case FilterResult.Match:
					child.FilterSettings = StripSearchTerm(this.FilterSettings);
					child.IsHidden = false;
					break;
				case FilterResult.Recurse:
					child.FilterSettings = this.FilterSettings;
					child.EnsureChildrenFiltered();
					child.IsHidden = child.Children.All(c => c.IsHidden);
					break;
				case FilterResult.MatchAndRecurse:
					child.FilterSettings = StripSearchTerm(this.FilterSettings);
					child.EnsureChildrenFiltered();
					child.IsHidden = child.Children.All(c => c.IsHidden);
					break;
				default:
					throw new InvalidEnumArgumentException();
			}
		}
Exemplo n.º 2
0
 void ApplyFilterToChild(ILSpyTreeNode child)
 {
     FilterResult r;
     if (this.FilterSettings == null)
         r = FilterResult.Match;
     else
         r = child.Filter(this.FilterSettings);
     switch (r) {
         case FilterResult.Hidden:
             child.IsHidden = true;
             break;
         case FilterResult.Match:
             child.FilterSettings = StripSearchTerm(this.FilterSettings);
             child.IsHidden = false;
             break;
         case FilterResult.Recurse:
             child.FilterSettings = this.FilterSettings;
             child.EnsureChildrenFiltered();
             child.IsHidden = child.Children.All(c => c.IsHidden);
             break;
         case FilterResult.MatchAndRecurse:
             child.FilterSettings = StripSearchTerm(this.FilterSettings);
             child.EnsureChildrenFiltered();
             child.IsHidden = child.Children.All(c => c.IsHidden);
             break;
         default:
             throw new InvalidEnumArgumentException();
     }
 }