Пример #1
0
        public virtual void RunSourceIndexing()
        {
            try
            {
                // Get the list of files from the source tool
                var files = GetFileListing();
                if (LogWriter.IsVerboseEnough(VerbosityLevel.Detailed))
                {
                    foreach (var file in files)
                    {
                        LogWriter.Log(VerbosityLevel.Detailed, string.Format(" {0}", file.PdbFilePath));
                    }
                }

                // Setup the front end
                FrontEnd.SetParameters(Parameters);
                // Evaluate the pdb source files given our front end
                FrontEnd.EvaluateFiles(files);
                // Pull out the repositories with all of their files
                var repositories = FrontEnd.GetRepositoryInfo();
                // Build the text data for the srcsrv stream from the backend
                var srcSrvStream = BackEnd.BuildSrcSrvStream(repositories);

                LogWriter.Log(VerbosityLevel.Detailed, string.Format("Writing stream\n{0}", srcSrvStream));

                // Write the stream out to the pdb file
                PdbStr.WriteStream(Parameters, srcSrvStream);
                int total = 0;
                foreach (var repo in repositories)
                {
                    total += repo.SourceFiles.Count;
                }

                LogWriter.Log(VerbosityLevel.Basic, string.Format("Pdb contains {0} files, {1} files indexed", files.Count, total));
            }
            catch (Exception ex)
            {
                LogWriter.Log(VerbosityLevel.Error, string.Format("Exception: {0}", ex.ToString()));
            }
        }
Пример #2
0
 public string GetSourceIndexingResults()
 {
     return(PdbStr.ReadStream(Parameters));
 }