/// <summary>
 /// Provides a global access point for the single instance of the <see cref="GlobalSettingsProvider"/>
 /// class.
 /// </summary>
 /// <returns>A reference to the single instance of <see cref="GlobalSettingsProvider"/>.</returns>
 public static GlobalSettingsProvider Instance()
 {
     if (instance==null)
     {
         //Make sure the call is thread-safe.
         Mutex mutex=new Mutex();
         mutex.WaitOne();
         if( instance == null )
         {
             instance = new GlobalSettingsProvider();
         }
         mutex.Close();
     }
     return instance;
 }
Esempio n. 2
0
 /// <summary>
 /// Provides a global access point for the single instance of the <see cref="GlobalSettingsProvider"/>
 /// class.
 /// </summary>
 /// <returns>A reference to the single instance of <see cref="GlobalSettingsProvider"/>.</returns>
 public static GlobalSettingsProvider Instance()
 {
     if (instance == null)
     {
         //Make sure the call is thread-safe.
         Mutex mutex = new Mutex();
         mutex.WaitOne();
         if (instance == null)
         {
             instance = new GlobalSettingsProvider();
         }
         mutex.Close();
     }
     return(instance);
 }