private PatternSegment FindOrCreate(string value) { var subSegment = subSegments.Find(s => s.value == value); if (subSegment == null) { subSegment = PatternSegment.Create(value); this.subSegments.Add(subSegment); } return(subSegment); }
public PatternCollection() { this.root = PatternSegment.Create(string.Empty); }