コード例 #1
0
        // ((?!error).)*error[\s|:](?<error>.*)

        public DataDictionary()
        {
            // Project definition
            // [10:54:44] :          [exec] 158>------ Build started: Project: blah x x x, Configuration: Release Win32 ------
            definitionMap[EntryType.ProjectDefinition().Id] = LineStart +
                                                              Time +
                                                              WhiteSpaceOne +
                                                              Colon +
                                                              WhiteSpaceOneOrMore +
                                                              Exec +
                                                              WhiteSpaceOne +
                                                              ProjectId +
                                                              Arrow +
                                                              DashesOneOrMore +
                                                              WhiteSpaceOne +
                                                              ProjectBuildStarted +
                                                              Project +
                                                              ProjectName +
                                                              AnyZeroOrMore +
                                                              Comma +
                                                              WhiteSpaceOne +
                                                              Configuration +
                                                              Colon +
                                                              WhiteSpaceOne +
                                                              ProjectConfiguration +
                                                              WhiteSpaceOne +
                                                              DashesOneOrMore +
                                                              LineEnd;

            // Solution start
            // [10:54:44] :          [exec] Build Acceleration Console 8.0.1 (build 1867)
            definitionMap[EntryType.SolutionStart().Id] = LineStart +
                                                          Time +
                                                          WhiteSpaceOne +
                                                          Colon +
                                                          WhiteSpaceOneOrMore +
                                                          Exec +
                                                          WhiteSpaceOne +
                                                          BuildAccelerationConsole +
                                                          LineEnd;
            // Solution end build succeeded
            // [10:54:44] :          [exec] ========== Build: 35 succeeded, 0 failed, 5 up-to-date, 326 skipped ==========
            definitionMap[EntryType.SolutionEndBuildSucceeded().Id] = LineStart +
                                                                      Time +
                                                                      WhiteSpaceOne +
                                                                      Colon +
                                                                      WhiteSpaceOneOrMore +
                                                                      Exec +
                                                                      WhiteSpaceOne +
                                                                      Equals10 +
                                                                      WhiteSpaceOne +
                                                                      Build +
                                                                      Colon +
                                                                      WhiteSpaceOne +
                                                                      BuildSucceeded +
                                                                      Comma +
                                                                      WhiteSpaceOne +
                                                                      BuildFailed +
                                                                      Comma +
                                                                      WhiteSpaceOne +
                                                                      BuildUpToDate +
                                                                      Comma +
                                                                      WhiteSpaceOne +
                                                                      BuildSkipped +
                                                                      WhiteSpaceOne +
                                                                      Equals10 +
                                                                      LineEnd;


            // Solution end rebuild all succeeded
            // [10:54:44] :          [exec] ========== Rebuild All: 35 succeeded, 0 failed, 326 skipped ==========
            definitionMap[EntryType.SolutionEndRebuildSucceeded().Id] = LineStart +
                                                                        Time +
                                                                        WhiteSpaceOne +
                                                                        Colon +
                                                                        WhiteSpaceOneOrMore +
                                                                        Exec +
                                                                        WhiteSpaceOne +
                                                                        Equals10 +
                                                                        WhiteSpaceOne +
                                                                        ReBuild +
                                                                        Colon +
                                                                        WhiteSpaceOne +
                                                                        BuildSucceeded +
                                                                        Comma +
                                                                        WhiteSpaceOne +
                                                                        BuildFailed +
                                                                        Comma +
                                                                        WhiteSpaceOne +
                                                                        BuildSkipped +
                                                                        WhiteSpaceOne +
                                                                        Equals10 +
                                                                        LineEnd;

            // Project entry type
            // [10:53:29] :            [exec] 44> blah blah blah
            definitionMap[EntryType.ProjectEntry().Id] = LineStart +
                                                         Time +
                                                         WhiteSpaceOne +
                                                         Colon +
                                                         WhiteSpaceOneOrMore +
                                                         Exec +
                                                         WhiteSpaceOne +
                                                         ProjectId +
                                                         Arrow +
                                                         ProjectLineData +
                                                         LineEnd;

            // Project entry empty type
            // [10:53:29] :            [exec] 44>
            definitionMap[EntryType.ProjectEmptyEntry().Id] = LineStart +
                                                              Time +
                                                              WhiteSpaceOne +
                                                              Colon +
                                                              WhiteSpaceOneOrMore +
                                                              Exec +
                                                              WhiteSpaceOne +
                                                              ProjectId +
                                                              Arrow +
                                                              LineEnd;

            // Project end entry
            // [19:07:17] :          [exec] 54>Time Elapsed 00:00:14.56
            definitionMap[EntryType.ProjectEndEntry().Id] = LineStart +
                                                            Time +
                                                            WhiteSpaceOne +
                                                            Colon +
                                                            WhiteSpaceOneOrMore +
                                                            Exec +
                                                            WhiteSpaceOne +
                                                            ProjectId +
                                                            Arrow +
                                                            TimeElapsed +
                                                            LineEnd;

            // Project build failed
            // [19:07:17] :       [exec] 27>Build FAILED.
            definitionMap[EntryType.ProjectBuildFailedEntry().Id] = LineStart +
                                                                    Time +
                                                                    WhiteSpaceOne +
                                                                    Colon +
                                                                    WhiteSpaceOneOrMore +
                                                                    Exec +
                                                                    WhiteSpaceOne +
                                                                    ProjectId +
                                                                    Arrow +
                                                                    ProjectBuildFailed +
                                                                    LineEnd;

            // Project build succeeded
            // [19:07:17] :       [exec] 27>Build succeeded.
            definitionMap[EntryType.ProjectBuildSucceededEntry().Id] = LineStart +
                                                                       Time +
                                                                       WhiteSpaceOne +
                                                                       Colon +
                                                                       WhiteSpaceOneOrMore +
                                                                       Exec +
                                                                       WhiteSpaceOne +
                                                                       ProjectId +
                                                                       Arrow +
                                                                       ProjectBuildSucceeded +
                                                                       LineEnd;


            // Stage start
            // [19:07:17]W: Step 1/4: Clean up
            definitionMap[EntryType.StageStartType().Id] = LineStart +
                                                           Time +
                                                           AnySingleCharacter +
                                                           Colon +
                                                           WhiteSpaceOne +
                                                           StageData +
                                                           Colon +
                                                           WhiteSpaceOne +
                                                           StageLabel;


            // Stage exit
            // [19:07:17] :    [Step 4/4] Process exited with code 0
            definitionMap[EntryType.StageExitType().Id] = LineStart +
                                                          Time +
                                                          AnySingleCharacter +
                                                          Colon +
                                                          WhiteSpaceOneOrMore +
                                                          OpenSquareBracket +
                                                          StageData +
                                                          CloseSquareBracket +
                                                          WhiteSpaceOne +
                                                          StageExitCode;

            // Stage skipped
            // [11:57:05] :         [Step 1/6] Disabled build step this is the label (here) skipped
            definitionMap[EntryType.StageSkippedType().Id] = LineStart +
                                                             Time +
                                                             AnySingleCharacter +
                                                             Colon +
                                                             WhiteSpaceOneOrMore +
                                                             OpenSquareBracket +
                                                             StageData +
                                                             CloseSquareBracket +
                                                             WhiteSpaceOne +
                                                             StageSkippedData;

            // Default error
            // [11:57:05] :         [Step 1/6] stuff error more stuff
            definitionMap[EntryType.DefaultErrorEntry().Id] = LineStart +
                                                              Time +
                                                              AnySingleCharacter +
                                                              Colon +
                                                              WhiteSpaceOneOrMore +
                                                              OpenSquareBracket +
                                                              StageData +
                                                              CloseSquareBracket +
                                                              AnyNumberOfCharactersNotError +
                                                              Error;
        }
コード例 #2
0
 public static Func <IValueExtractor, IDataService, ISolutionStartEntry> CreateSolutionStartEntryFunc(uint lineNumber)
 {
     return((extractor, data) => new SolutionStartEntry(new Entry(EntryType.SolutionStart(), lineNumber), extractor, data));
 }