예제 #1
0
        public void Add(PatternCollection patterns)
        {
            DFAMatrixBuilder lDFAMatrixBuilder = new DFAMatrixBuilder(DFAMatrix);

            lDFAMatrixBuilder.Add(patterns);
            PatternCollection.Add(patterns);

            DFAMatrix lDFAMatrix = lDFAMatrixBuilder.GetMatrix();

            lock (this)
            {
                DFAMatrix = lDFAMatrix;
            }
        }
예제 #2
0
        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);
        }
예제 #3
0
        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);
        }