< Summary

Information
Class: LGDXRobotCloud.API.Services.Common.EventService
Assembly: LGDXRobotCloud.API
File(s): /builds/yukaitung/lgdxrobot2-cloud/LGDXRobotCloud.API/Services/Common/EventService.cs
Line coverage
0%
Covered lines: 0
Uncovered lines: 9
Coverable lines: 9
Total lines: 34
Line coverage: 0%
Branch coverage
0%
Covered branches: 0
Total branches: 6
Branch coverage: 0%
Method coverage

Feature is only available for sponsors

Upgrade to PRO version

Metrics

MethodBranch coverage Crap Score Cyclomatic complexity Line coverage
AutoTaskHasCreated()0%620%
RobotCommandsHasUpdated(...)0%620%
RobotHasNextTaskTriggered(...)0%620%

File(s)

/builds/yukaitung/lgdxrobot2-cloud/LGDXRobotCloud.API/Services/Common/EventService.cs

#LineLine coverage
 1namespace LGDXRobotCloud.API.Services.Common;
 2
 3public interface IEventService
 4{
 5  event EventHandler AutoTaskCreated;
 6  void AutoTaskHasCreated();
 7
 8  event EventHandler<Guid> RobotCommandsUpdated;
 9  void RobotCommandsHasUpdated(Guid robotId);
 10
 11  event EventHandler<Guid> RobotHasNextTask;
 12  void RobotHasNextTaskTriggered(Guid robotId);
 13}
 14
 15public class EventService : IEventService
 16{
 17  public event EventHandler? AutoTaskCreated;
 18  public void AutoTaskHasCreated()
 019  {
 020    AutoTaskCreated?.Invoke(this, EventArgs.Empty);
 021  }
 22
 23  public event EventHandler<Guid>? RobotCommandsUpdated;
 24  public void RobotCommandsHasUpdated(Guid robotId)
 025  {
 026    RobotCommandsUpdated?.Invoke(this, robotId);
 027  }
 28
 29  public event EventHandler<Guid>? RobotHasNextTask;
 30  public void RobotHasNextTaskTriggered(Guid robotId)
 031  {
 032    RobotHasNextTask?.Invoke(this, robotId);
 033  }
 34}