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)); }
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); } }