Ejemplo n.º 1
0
        void AnalyzeJob(AnalyzeJobData jobData)
        {
            string path     = jobData.Change.Path;
            int    revision = jobData.Change.Revision;

            if (_args.Verbosity > 3)
            {
                Console.WriteLine("Analyze " + jobData.Change.Change.ToString().PadRight(7) + path + "   " + revision);
            }
            switch (jobData.Change.Change)
            {
            case Change.Add:
                AddPath(path, revision, jobData.Recursive && jobData.Change.IsCopy);
                break;

            case Change.Replace:
                DeletePath(path, revision, jobData.Recursive);
                AddPath(path, revision, jobData.Recursive && jobData.Change.IsCopy);
                break;

            case Change.Modify:
                DeletePath(path, revision, false);
                AddPath(path, revision, false);
                break;

            case Change.Delete:
                DeletePath(path, revision, jobData.Recursive);
                break;
            }
        }
Ejemplo n.º 2
0
 void QueueAnalyzeJob(AnalyzeJobData jobData)
 {
     _pendingAnalyzeJobs.Increment();
     ThreadPool.QueueUserWorkItem(AnalyzeJob, jobData);
 }