public void Add(PatternCollection patterns) { DFAMatrixBuilder lDFAMatrixBuilder = new DFAMatrixBuilder(DFAMatrix); lDFAMatrixBuilder.Add(patterns); PatternCollection.Add(patterns); DFAMatrix lDFAMatrix = lDFAMatrixBuilder.GetMatrix(); lock (this) { DFAMatrix = lDFAMatrix; } }
protected static void AddPatterns(GoBoard goBoard, SearchEngine searchEngine, List <string> parameters, string id, Worker.SendResponse proxy) { PatternCollection lPatternCollection = new PatternCollection(); foreach (string lString in parameters) { string lPattern = lString.Replace("~", "\n"); lPatternCollection.Add(new Pattern(lPattern)); } if (lPatternCollection.Count != 0) { if (searchEngine.SearchOptions.PatternDetector == null) { searchEngine.SearchOptions.PatternDetector = new PatternDetector(); } searchEngine.SearchOptions.PatternDetector.Add(lPatternCollection); } Respond(proxy, id); }
protected static void AddPatterns(GoBoard goBoard, SearchEngine searchEngine, List<string> parameters, string id, Worker.SendResponse proxy) { PatternCollection lPatternCollection = new PatternCollection(); foreach (string lString in parameters) { string lPattern = lString.Replace("~", "\n"); lPatternCollection.Add(new Pattern(lPattern)); } if (lPatternCollection.Count != 0) { if (searchEngine.SearchOptions.PatternDetector == null) searchEngine.SearchOptions.PatternDetector = new PatternDetector(); searchEngine.SearchOptions.PatternDetector.Add(lPatternCollection); } Respond(proxy, id); }