Example #1
0
        public TreePart Create(TreePart t, string value)
        {
            if (t is null)
            {
                if (string.IsNullOrEmpty(value))
                {
                    return(new TreePartEndOf());
                }
                else
                {
                    return(this.Create(new TreePartCondition(value[0]), value));
                }
            }

            return(this.Create((dynamic)t, value));
        }
Example #2
0
        public SlidingSearch(IEnumerable <string> keywords)
        {
            this._conditionTree = null;

            var builder = new TreeBuilder();

            foreach (var keyword in keywords)
            {
                if (string.IsNullOrEmpty(keyword))
                {
                    continue;
                }

                this._conditionTree = builder.Create(this._conditionTree, keyword);
            }
        }