private bool IsInDirection(InternalRegistrationInfo registeredRequest, TemperatureChangedEventArgs temperatureArgs) { if (registeredRequest.ChangeDirection == Direction.None) { return(true); } return(registeredRequest.ChangeDirection == temperatureArgs.ChangeDirection); }
private bool IsOutOfWaiverMargin(InternalRegistrationInfo registeredRequest, TemperatureChangedEventArgs temperatureArgs) { return(Math.Abs(temperatureArgs.Temperature - registeredRequest.Threshold) > registeredRequest.WaiverMargin); }
private bool IsThreshold(InternalRegistrationInfo registeredRequest, TemperatureChangedEventArgs temperatureArgs) { return(registeredRequest.Threshold == temperatureArgs.Temperature); }
public void RequestRegistration(TemperatureThresholdRegistrationInfo temperatureTresholdRegistrationInfo) { InternalRegistrationInfo registrationInfo = new InternalRegistrationInfo(temperatureTresholdRegistrationInfo); _registerationRequests.Add(registrationInfo); }