예제 #1
0
        private bool IsInDirection(InternalRegistrationInfo registeredRequest, TemperatureChangedEventArgs temperatureArgs)
        {
            if (registeredRequest.ChangeDirection == Direction.None)
            {
                return(true);
            }

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

            _registerationRequests.Add(registrationInfo);
        }