Ejemplo n.º 1
0
        private bool IsInDirection(InternalRegistrationInfo registeredRequest, TemperatureChangedEventArgs temperatureArgs)
        {
            if (registeredRequest.ChangeDirection == Direction.None)
            {
                return(true);
            }

            return(registeredRequest.ChangeDirection == temperatureArgs.ChangeDirection);
        }
Ejemplo n.º 2
0
 private bool IsOutOfWaiverMargin(InternalRegistrationInfo registeredRequest, TemperatureChangedEventArgs temperatureArgs)
 {
     return(Math.Abs(temperatureArgs.Temperature - registeredRequest.Threshold) > registeredRequest.WaiverMargin);
 }
Ejemplo n.º 3
0
 private bool IsThreshold(InternalRegistrationInfo registeredRequest, TemperatureChangedEventArgs temperatureArgs)
 {
     return(registeredRequest.Threshold == temperatureArgs.Temperature);
 }
Ejemplo n.º 4
0
        public void RequestRegistration(TemperatureThresholdRegistrationInfo temperatureTresholdRegistrationInfo)
        {
            InternalRegistrationInfo registrationInfo = new InternalRegistrationInfo(temperatureTresholdRegistrationInfo);

            _registerationRequests.Add(registrationInfo);
        }