public AirQualityProcessor(LoggerFactory loggerFactory, IFileService file, IAirQualityService arso, IShiftRegister shiftRegister, IAirQualitySettings settings, IStopCheckService stopCheckService, ITwitterPush twitterPush, INtpService ntpService) { Contract.Requires(file != null); Contract.Requires(arso != null); Contract.Requires(shiftRegister != null); Contract.Requires(settings != null, nameof(settings) + " is null."); Contract.Requires(stopCheckService != null, "stopCheckService is null."); Contract.Requires(twitterPush != null, "tweeterPush is null."); Contract.Requires(ntpService != null, "ntpService is null."); logger = loggerFactory(nameof(AirQualityProcessor)); this.file = file; this.arso = arso; this.shiftRegister = shiftRegister; this.settings = settings; this.stopCheckService = stopCheckService; this.twitterPush = twitterPush; this.ntpService = ntpService; lastDataDirectory = Path.Combine(Path.GetDirectoryName(typeof(AirQualityProcessor).Assembly.Location), "LastData"); file.CreateDirectory(lastDataDirectory); lastDataPath = Path.Combine(lastDataDirectory, "arso.xml"); }
public Processor(LoggerFactory loggerFactory, ISettings settings, IImageProcessor imageProcessor, IWittyPiService wittyPiService, INtpService ntpService, IStopCheckService stopCheckService, IAirQualityProcessor airQualityProcessor, IHeartbeatService heartbeatService) { this.logger = loggerFactory(nameof(Processor)); this.settings = settings; this.imageProcessor = imageProcessor; this.wittyPiService = wittyPiService; this.ntpService = ntpService; this.stopCheckService = stopCheckService; this.airQualityProcessor = airQualityProcessor; this.heartbeatService = heartbeatService; }