コード例 #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())
 {
 }