예제 #1
0
 public JT808ReportService(
     JT808ReceiveAtomicCounterService jT808ReceiveAtomicCounterService,
     JT808SendAtomicCounterService jT808SendAtomicCounterService,
     IJT808TcpClientFactory jT808TcpClientFactory)
 {
     this.jT808ReceiveAtomicCounterService = jT808ReceiveAtomicCounterService;
     this.jT808SendAtomicCounterService    = jT808SendAtomicCounterService;
     this.jT808TcpClientFactory            = jT808TcpClientFactory;
     JT808Reports = new List <JT808Report>();
 }
예제 #2
0
 public JT808ReportHostedService(
     ILoggerFactory loggerFactory,
     IOptionsMonitor <JT808ReportOptions> jT808ReportOptionsAccessor,
     JT808ReceiveAtomicCounterService jT808ReceiveAtomicCounterService,
     JT808SendAtomicCounterService jT808SendAtomicCounterService,
     IJT808TcpClientFactory jT808TcpClientFactory)
 {
     logger             = loggerFactory.CreateLogger("JT808ReportHostedService");
     jT808ReportOptions = jT808ReportOptionsAccessor;
     jT808ReportOptions.CurrentValue.FileExistsAndCreate();
     this.jT808ReceiveAtomicCounterService = jT808ReceiveAtomicCounterService;
     this.jT808SendAtomicCounterService    = jT808SendAtomicCounterService;
     this.jT808TcpClientFactory            = jT808TcpClientFactory;
     jT808ReportOptions.OnChange((options) => { options.FileExistsAndCreate(); });
 }