Beispiel #1
0
        /// <summary>
        /// Returns the only instance of RandomNumberProvider.
        /// </summary>
        /// <returns>RandomNumberProvider only instance.</returns>
        public static RandomNumberProvider GetInstance()
        {
            // No need for multi threading fix.
            if (instance == null)
            {
                instance = new RandomNumberProvider();
            }

            return(instance);
        }
Beispiel #2
0
        /// <summary>
        /// Returns the only instance of RandomNumberProvider.
        /// </summary>
        /// <returns>RandomNumberProvider only instance.</returns>
        public static RandomNumberProvider GetInstance()
        {
            // No need for multi threading fix.
            if (instance == null)
            {
                instance = new RandomNumberProvider();
            }

            return instance;
        }
Beispiel #3
0
 public RandomDataProvider() : this(RandomNumberProvider.GetInstance())
 {
 }