Ejemplo n.º 1
0
 public void Handle(IApplicationEventEngine eventClient)
 {
     foreach (var manifestPath in AgentReader.DetectManifests(AnalysisLocation.Path))
     {
         eventClient.Fire(new ManifestDetectedEvent(AnalysisLocation, AgentReader, manifestPath));
     }
 }
Ejemplo n.º 2
0
 public CacheDestroyCommandRunner(IServiceProvider serviceProvider, Runner runner, ICacheManager cacheManager,
                                  IApplicationActivityEngine activityEngine, IApplicationEventEngine eventEngine)
     : base(serviceProvider, runner)
 {
     CacheManager   = cacheManager;
     ActivityEngine = activityEngine;
     EventEngine    = eventEngine;
 }
    public void Handle(IApplicationEventEngine eventClient)
    {
        var libYearPackages = _calculateLibYearFromFile.AsList(_pathToBoM);

        eventClient.Fire(new LibYearComputedEvent {
            LibYearPackages = libYearPackages
        });
    }
 public void Handle(IApplicationEventEngine eventClient)
 {
     foreach (var agentPath in _agentsDetector.Detect())
     {
         eventClient.Fire(new AgentDetectedForDetectManifestEvent(
                              _analysisLocation, _agentManager.GetReader(agentPath)));
     }
 }
Ejemplo n.º 5
0
 public AgentsDetectCommandRunner(IServiceProvider serviceProvider, Runner runner, IAgentsDetector agentsDetector,
                                  IApplicationActivityEngine activityEngine, IApplicationEventEngine eventEngine)
     : base(serviceProvider, runner)
 {
     ActivityEngine = activityEngine;
     EventEngine    = eventEngine;
     AgentsDetector = agentsDetector;
 }
Ejemplo n.º 6
0
 public ComputeLibYearCommandRunner(
     IServiceProvider serviceProvider, Runner runner,
     ICalculateLibYearFromFile calculateLibYearFromCycloneDxFile,
     IApplicationActivityEngine activityEngine, IApplicationEventEngine eventEngine)
     : base(serviceProvider, runner)
 {
     _calculateLibYearFromCycloneDxFile = calculateLibYearFromCycloneDxFile;
     _activityEngine = activityEngine;
     _eventEngine    = eventEngine;
 }
Ejemplo n.º 7
0
 public void Handle(IApplicationEventEngine eventClient)
 {
     // Destroy the cache
     try
     {
         var exitCode = _cacheManager.Destroy(_cacheDir).ToExitCode();
         eventClient.Fire(new CacheDestroyedEvent {
             ExitCode = exitCode
         });
     }
     catch (CacheException error)
     {
         eventClient.Fire(new CacheDestroyFailedEvent {
             ResultMessage = error.Message
         });
     }
 }
Ejemplo n.º 8
0
    public void Handle(IApplicationEventEngine eventClient)
    {
        var analysis = _cacheDb.RetrieveAnalysis(_analysisId);

        if (analysis == null)
        {
            return;
        }

        var historyIntervalStops =
            _computeHistoryService.ComputeWithHistoryInterval(_analysisLocation, _gitExecutablePath, analysis.HistoryInterval);

        foreach (var historyIntervalStop in historyIntervalStops)
        {
            eventClient.Fire(new HistoryIntervalStopFoundEvent
            {
                GitCommitIdentifier = historyIntervalStop.GitCommitIdentifier,
                AnalysisLocation    = _analysisLocation
            });
        }
    }