1- using System ;
2-
31namespace Tynamix . ObjectFiller
42{
5- public class DoubleRange : IRandomizerPlugin < double > , IRandomizerPlugin < double ? > , IRandomizerPlugin < decimal > , IRandomizerPlugin < decimal ? >
3+ /// <summary>
4+ /// The double range plugin
5+ /// </summary>
6+ public class DoubleRange : IRandomizerPlugin < double > , IRandomizerPlugin < double ? > , IRandomizerPlugin < decimal > , IRandomizerPlugin < decimal ? >
67 {
7- private readonly double _minValue ;
8- private readonly double _maxValue ;
8+ /// <summary>
9+ /// The min value.
10+ /// </summary>
11+ private readonly double minValue ;
12+
13+ /// <summary>
14+ /// The max value.
15+ /// </summary>
16+ private readonly double maxValue ;
917
1018 /// <summary>
19+ /// Initializes a new instance of the <see cref="DoubleRange"/> class.
1120 /// Use to define just a max value for the double randomizer. Min value will be 0!
1221 /// </summary>
13- /// <param name="maxValue">Maximum double value</param>
22+ /// <param name="maxValue">
23+ /// Maximum double value
24+ /// </param>
1425 public DoubleRange ( double maxValue )
1526 : this ( 0 , maxValue )
1627 {
@@ -19,17 +30,23 @@ public DoubleRange(double maxValue)
1930
2031
2132 /// <summary>
33+ /// Initializes a new instance of the <see cref="DoubleRange"/> class.
2234 /// Use to define a min and max double value for the randomizer
2335 /// </summary>
24- /// <param name="minValue">Min value</param>
25- /// <param name="maxValue">Max value</param>
36+ /// <param name="minValue">
37+ /// Min value
38+ /// </param>
39+ /// <param name="maxValue">
40+ /// Max value
41+ /// </param>
2642 public DoubleRange ( double minValue , double maxValue )
2743 {
28- _minValue = minValue ;
29- _maxValue = maxValue ;
44+ this . minValue = minValue ;
45+ this . maxValue = maxValue ;
3046 }
3147
3248 /// <summary>
49+ /// Initializes a new instance of the <see cref="DoubleRange"/> class.
3350 /// Use this to generate a double value between double.MinValue and double.MaxValue
3451 /// </summary>
3552 public DoubleRange ( )
@@ -38,21 +55,37 @@ public DoubleRange()
3855
3956 }
4057
58+ /// <summary>
59+ /// Gets random data for type <see cref="T"/>
60+ /// </summary>
61+ /// <returns>Random data for type <see cref="T"/></returns>
4162 public double GetValue ( )
4263 {
43- return Random . NextDouble ( ) * ( _maxValue - _minValue ) + _minValue ;
64+ return Random . NextDouble ( ) * ( this . maxValue - this . minValue ) + this . minValue ;
4465 }
4566
67+ /// <summary>
68+ /// Gets random data for type <see cref="T"/>
69+ /// </summary>
70+ /// <returns>Random data for type <see cref="T"/></returns>
4671 double ? IRandomizerPlugin < double ? > . GetValue ( )
4772 {
48- return GetValue ( ) ;
73+ return this . GetValue ( ) ;
4974 }
5075
76+ /// <summary>
77+ /// Gets random data for type <see cref="T"/>
78+ /// </summary>
79+ /// <returns>Random data for type <see cref="T"/></returns>
5180 decimal IRandomizerPlugin < decimal > . GetValue ( )
5281 {
53- return ( decimal ) GetValue ( ) ;
82+ return ( decimal ) GetValue ( ) ;
5483 }
5584
85+ /// <summary>
86+ /// Gets random data for type <see cref="T"/>
87+ /// </summary>
88+ /// <returns>Random data for type <see cref="T"/></returns>
5689 decimal ? IRandomizerPlugin < decimal ? > . GetValue ( )
5790 {
5891 return ( decimal ) GetValue ( ) ;
0 commit comments