예제 #1
0
        public override IEnumerable <SearchData> Search(string value)
        {
            foreach (var item in SearchExtensions.Search(ResultKind.TypeName, Name, value))
            {
                yield return(item);
            }

            for (int i = 0; i < _parameters.Count; i++)
            {
                var index = _parameters[i].Name.IndexOf(value, StringComparison.CurrentCultureIgnoreCase);
                if (index > -1)
                {
                    yield return(new SearchData(_parameters[i].Name, index, i, ResultKind.TypeParamName));
                }

                index = _parameters[i].Value.IndexOf(value, StringComparison.CurrentCultureIgnoreCase);
                if (index > -1)
                {
                    yield return(new SearchData(_parameters[i].Value, index, i, ResultKind.TypeParamValue));
                }
            }
        }
예제 #2
0
파일: InfoOwner.cs 프로젝트: Lemiort/SI
        public override IEnumerable <SearchData> Search(string value)
        {
            foreach (var item in base.Search(value))
            {
                yield return(item);
            }

            foreach (var item in Info.Authors.Search(value))
            {
                item.Kind = ResultKind.Author;
                yield return(item);
            }

            foreach (var item in Info.Sources.Search(value))
            {
                item.Kind = ResultKind.Source;
                yield return(item);
            }

            foreach (var item in SearchExtensions.Search(ResultKind.Comment, Info.Comments.Text, value))
            {
                yield return(item);
            }
        }