示例#1
0
 public ReaderModuleService(IRepository <MasterReaderModule> readerModuleRepository, IBinService binService,
                            ISecurityService securityService)
 {
     _readerModuleRepository = readerModuleRepository;
     _binService             = binService;
     _securityService        = securityService;
 }
示例#2
0
        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;
        }
示例#4
0
 public BinsController(IBinService binService)
 {
     _binService = binService;
 }
示例#5
0
 public void Transition(IBinService binService)
 {
     binService.Transition(this.lidState);
 }
 public BinController(IBinService <int, StoredFileModelApi <int>, StoredFolderModelApi <int> > binService)
 {
     this._binService = binService;
 }