Exemplo n.º 1
0
		/// <summary>
		/// Constructor
		/// </summary>
		/// <param name="filter">Filter</param>
		/// <param name="searchComparer">Search comparer</param>
		/// <param name="onMatch">Called when there's a match</param>
		/// <param name="language">Language</param>
		/// <param name="cancellationToken">Cancellation token</param>
		public FilterSearcher(ITreeViewNodeFilter filter, ISearchComparer searchComparer, Action<SearchResult> onMatch, Language language, CancellationToken cancellationToken) {
			if (filter == null)
				throw new ArgumentNullException();
			if (searchComparer == null)
				throw new ArgumentNullException();
			if (onMatch == null)
				throw new ArgumentNullException();
			if (language == null)
				throw new ArgumentNullException();
			this.filter = filter;
			this.searchComparer = searchComparer;
			this.onMatch = onMatch;
			this.language = language;
			this.cancellationToken = cancellationToken;
		}
Exemplo n.º 2
0
        public RunningSearch(IEnumerable <AssemblyTreeNode> asmNodes, ISearchComparer searchComparer, ITreeViewNodeFilter filter, Language language)
        {
            this.dispatcher = Dispatcher.CurrentDispatcher;
            this.asmNodes   = asmNodes.ToArray();
            foreach (var asmNode in this.asmNodes)
            {
                asmNode.EnsureChildrenFiltered();
            }
            this.searchComparer = searchComparer;
            this.language       = language;
            this.filter         = filter;

            this.Results.Add(new SearchResult {
                NameObject = "Searching..."
            });
        }
Exemplo n.º 3
0
		/// <summary>
		/// Constructor
		/// </summary>
		/// <param name="filter">Filter</param>
		/// <param name="searchComparer">Search comparer</param>
		/// <param name="onMatch">Called when there's a match</param>
		/// <param name="language">Language</param>
		/// <param name="cancellationToken">Cancellation token</param>
		public FilterSearcher(ITreeViewNodeFilter filter, ISearchComparer searchComparer, Action<SearchResult> onMatch, Language language, CancellationToken cancellationToken) {
			if (filter == null)
				throw new ArgumentNullException();
			if (searchComparer == null)
				throw new ArgumentNullException();
			if (onMatch == null)
				throw new ArgumentNullException();
			if (language == null)
				throw new ArgumentNullException();
			this.filter = filter;
			this.searchComparer = searchComparer;
			this.onMatch = onMatch;
			this.language = language;
			this.cancellationToken = cancellationToken;
		}
Exemplo n.º 4
0
        public RunningSearch(IEnumerable<AssemblyTreeNode> asmNodes, ISearchComparer searchComparer, ITreeViewNodeFilter filter, Language language)
        {
            this.dispatcher = Dispatcher.CurrentDispatcher;
            this.asmNodes = asmNodes.ToArray();
            foreach (var asmNode in this.asmNodes)
                asmNode.EnsureChildrenFiltered();
            this.searchComparer = searchComparer;
            this.language = language;
            this.filter = filter;

            this.Results.Add(new SearchResult { NameObject = "Searching…" });
        }