예제 #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);
        }
예제 #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;
        }
예제 #3
0
 public RandomDataProvider() : this(RandomNumberProvider.GetInstance())
 {
 }