예제 #1
0
 /// <summary>
 /// Function to get instance of this class
 /// </summary>
 /// <returns>Instance of the ConnectionStrings class</returns>
 public static NandanaConnStrings GetInstance()
 {
     // To be thread safe, we use Mutex to synchronize threads
     m_Mutex.WaitOne();             // WaitOne() requests a thread
     if (m_Instance == null)
     {
         m_Instance = new NandanaConnStrings();
     }
     m_Mutex.ReleaseMutex();
     return(m_Instance);
 }
예제 #2
0
        /// <summary>
        /// Private function to retrive connection string from the Configuration settings
        /// </summary>
        /// <returns>String containing connection String</returns>
        private string GetConnectionString()
        {
            NandanaConnStrings oConnString = NandanaConnStrings.GetInstance();

            return(oConnString.GetConnectionStringByDBType());
        }