예제 #1
0
        public static TestFindDate FindDateNew(FindDateManager findDateManager, string text)
        {
            //FindDate_old findDate = findDateManager.Find_old(text);
            FindDate     findDate     = findDateManager.Find(text);
            TestFindDate testFindDate = new TestFindDate();

            testFindDate.text      = text;
            testFindDate.foundDate = findDate.Found;
            if (findDate.Found)
            {
                //testFindDate.dateFound = findDate.regexValues.MatchValue_old.Value;
                testFindDate.dateFound = findDate.matchValues.Match.Value;
                testFindDate.date      = findDate.Date;
                testFindDate.dateType  = findDate.DateType;
                //testFindDate.remainText = findDate.regexValues.MatchReplace_old("_");
                testFindDate.remainText = findDate.matchValues.Replace("_");
                //testFindDate.namedValues = findDate.regexValues.GetValues_old();
                testFindDate.namedValues = findDate.matchValues.GetValues();
            }
            return(testFindDate);
        }
예제 #2
0
 public static IEnumerable <TestFindDate> zFindDate(this IEnumerable <TestText> textList, FindDateManager_v1 findDateManager)
 {
     foreach (TestText text in textList)
     {
         //FindDate_old findDate = findDateManager.Find_old(text.text);
         FindDate     findDate     = findDateManager.Find(text.text);
         TestFindDate testFindDate = new TestFindDate();
         testFindDate.text      = text.text;
         testFindDate.foundDate = findDate.Found;
         if (findDate.Found)
         {
             //testFindDate.dateFound = findDate.regexValues.MatchValue_old.Value;
             testFindDate.dateFound = findDate.matchValues.Match.Value;
             testFindDate.date      = findDate.Date;
             testFindDate.dateType  = findDate.DateType;
             //testFindDate.remainText = findDate.regexValues.MatchReplace_old("_");
             testFindDate.remainText = findDate.matchValues.Replace("_");
             //testFindDate.namedValues = findDate.regexValues.GetValues_old();
             testFindDate.namedValues = findDate.matchValues.GetValues();
         }
         yield return(testFindDate);
     }
 }
예제 #3
0
 public static IEnumerable<TestFindDate> zFindDate(this IEnumerable<TestText> textList, FindDateManager_v1 findDateManager)
 {
     foreach (TestText text in textList)
     {
         //FindDate_old findDate = findDateManager.Find_old(text.text);
         FindDate findDate = findDateManager.Find(text.text);
         TestFindDate testFindDate = new TestFindDate();
         testFindDate.text = text.text;
         testFindDate.foundDate = findDate.Found;
         if (findDate.Found)
         {
             //testFindDate.dateFound = findDate.regexValues.MatchValue_old.Value;
             testFindDate.dateFound = findDate.matchValues.Match.Value;
             testFindDate.date = findDate.Date;
             testFindDate.dateType = findDate.DateType;
             //testFindDate.remainText = findDate.regexValues.MatchReplace_old("_");
             testFindDate.remainText = findDate.matchValues.Replace("_");
             //testFindDate.namedValues = findDate.regexValues.GetValues_old();
             testFindDate.namedValues = findDate.matchValues.GetValues();
         }
         yield return testFindDate;
     }
 }
예제 #4
0
 public static TestFindDate FindDateNew(FindDateManager findDateManager, string text)
 {
     //FindDate_old findDate = findDateManager.Find_old(text);
     FindDate findDate = findDateManager.Find(text);
     TestFindDate testFindDate = new TestFindDate();
     testFindDate.text = text;
     testFindDate.foundDate = findDate.Found;
     if (findDate.Found)
     {
         //testFindDate.dateFound = findDate.regexValues.MatchValue_old.Value;
         testFindDate.dateFound = findDate.matchValues.Match.Value;
         testFindDate.date = findDate.Date;
         testFindDate.dateType = findDate.DateType;
         //testFindDate.remainText = findDate.regexValues.MatchReplace_old("_");
         testFindDate.remainText = findDate.matchValues.Replace("_");
         //testFindDate.namedValues = findDate.regexValues.GetValues_old();
         testFindDate.namedValues = findDate.matchValues.GetValues();
     }
     return testFindDate;
 }