Esempio n. 1
0
 public ZoneJob(IServiceProvider container)
 {
     this.scope = container.CreateScope();
     this.scheduleRepository = scope.ServiceProvider.GetRequiredService <IScheduleRepository>();
     this.zoneRepository     = scope.ServiceProvider.GetRequiredService <IZoneRepository>();
     this.controlService     = scope.ServiceProvider.GetRequiredService <IZoneControlService>();
 }
Esempio n. 2
0
 public void SetEnablement(IZoneControlService service, bool isEnabled)
 {
     if (!isEnabled)
     {
         service.Stop(Channel);
     }
     this.IsEnabled = isEnabled;
 }
Esempio n. 3
0
 public ZoneService(IZoneRepository zoneRepository, IZoneControlService controlService)
 {
     this.zoneRepository = zoneRepository;
     this.controlService = controlService;
 }
Esempio n. 4
0
 public bool IsStarted(IZoneControlService service)
 {
     return(service.IsStarted(Channel));
 }
Esempio n. 5
0
 public void Stop(IZoneControlService service)
 {
     service.Stop(Channel);
 }
Esempio n. 6
0
 public void SetNewChannel(IZoneControlService service, int newChannel)
 {
     service.Stop(Channel);
     this.Channel = newChannel;
 }