コード例 #1
0
        public SensorTemplate(string unit, float upperLimit, float lowerLimit, float maxRateOfChange, MatchStyle matchStyle, string pattern, SummaryType sType)
        {
            if (String.IsNullOrWhiteSpace(unit))
            {
                throw new ArgumentException("You must a non-blank default unit.");
            }

            if (pattern == null)
            {
                throw new ArgumentException("The pattern to match a sensor on cannot be blank.");
            }

            if (lowerLimit > upperLimit)
            {
                throw new ArgumentOutOfRangeException(
                          "The lower limit must be less than the upper limit for this preset.");
            }

            _unit            = unit;
            _upperLimit      = upperLimit;
            _lowerLimit      = lowerLimit;
            _maxRateOfChange = maxRateOfChange;
            _sType           = sType;

            _matchStyle = matchStyle;
            _pattern    = pattern;
        }
コード例 #2
0
ファイル: SensorTemplate.cs プロジェクト: rwlamont/AllItUp
        public SensorTemplate(string unit, float upperLimit, float lowerLimit, float maxRateOfChange, MatchStyle matchStyle, string pattern,SummaryType sType)
        {
            if (String.IsNullOrWhiteSpace(unit))
                throw new ArgumentException("You must a non-blank default unit.");

            if (pattern == null)
                throw new ArgumentException("The pattern to match a sensor on cannot be blank.");

            if (lowerLimit > upperLimit)
                throw new ArgumentOutOfRangeException(
                    "The lower limit must be less than the upper limit for this preset.");

            _unit = unit;
            _upperLimit = upperLimit;
            _lowerLimit = lowerLimit;
            _maxRateOfChange = maxRateOfChange;
            _sType = sType;

            _matchStyle = matchStyle;
            _pattern = pattern;
        }
コード例 #3
0
ファイル: SensorTemplate.cs プロジェクト: rwlamont/AllItUp
 public SensorTemplate(string unit, float upperLimit, float lowerLimit, float maxRateOfChange, MatchStyle matchStyle, string pattern)
     : this(unit,upperLimit,lowerLimit,maxRateOfChange,matchStyle,pattern,SummaryType.Average)
 {
 }
コード例 #4
0
 public SensorTemplate(string unit, float upperLimit, float lowerLimit, float maxRateOfChange, MatchStyle matchStyle, string pattern) : this(unit, upperLimit, lowerLimit, maxRateOfChange, matchStyle, pattern, SummaryType.Average)
 {
 }