Пример #1
0
 public Confidence(ConfidenceRatingEnum rating)
 {
     if (rating == ConfidenceRatingEnum.numeric)
     {
         throw new ArgumentException("To set numeric confidence level, use another constructor.");
     }
     this.rating = rating;
 }
Пример #2
0
 public Confidence(float value)
 {
     if ((value < 0.0f) || (value > 1.0f))
     {
         throw new ArgumentException("Confidence level must be in [0..1] range.");
     }
     rating     = ConfidenceRatingEnum.numeric;
     this.value = value;
 }
Пример #3
0
 public Confidence(ConfidenceRatingEnum rating)
 {
     if (rating == ConfidenceRatingEnum.numeric) throw new ArgumentException("To set numeric confidence level, use another constructor.");
     this.rating = rating;
 }
Пример #4
0
 public Confidence(float value)
 {
     if ((value < 0.0f) || (value > 1.0f)) throw new ArgumentException("Confidence level must be in [0..1] range.");
     rating = ConfidenceRatingEnum.numeric;
     this.value = value;
 }