public ReaderModuleService(IRepository <MasterReaderModule> readerModuleRepository, IBinService binService, ISecurityService securityService) { _readerModuleRepository = readerModuleRepository; _binService = binService; _securityService = securityService; }
public bool Validate(IBinService binService) { var(Angle, Level) = binService.GetSensorReadings(); var isValidated = false; if (Angle >= MIN_ANGLE && Level <= MAX_LEVEL) { Console.WriteLine("Bin is open"); isValidated = true; } this.lidState = Level >= MAX_LEVEL ? OverflowLidState.Instance : ClosedLidState.Instance; return(isValidated); }
public bool Validate(IBinService binService) { var (Angle, Level) = binService.GetSensorReadings(); var isValidated = false; if (Angle <= MAX_ANGLE) { if(Level >= MAX_LEVEL) { Console.WriteLine("Bin is full"); isValidated = true; } else { Console.WriteLine("Bin is closed"); isValidated = true; } } this.lidState = Level >= MAX_LEVEL ? OverflowLidState.Instance : OpenLidState.Instance; return isValidated; }
public BinsController(IBinService binService) { _binService = binService; }
public void Transition(IBinService binService) { binService.Transition(this.lidState); }
public BinController(IBinService <int, StoredFileModelApi <int>, StoredFolderModelApi <int> > binService) { this._binService = binService; }