Пример #1
0
 /// <summary>
 /// Gets the singleton instance of the database
 /// </summary>
 /// <returns>The singleton instance of the database</returns>
 public static ChatServiceDatabase getInstance()
 {
     if (instance == null)
     {
         instance = new ChatServiceDatabase();
     }
     return(instance);
 }
Пример #2
0
 /// <summary>
 /// Gets the singleton instance of the database
 /// </summary>
 /// <returns>The singleton instance of the database</returns>
 public static ChatServiceDatabase getInstance()
 {
     //TODO low importance: Add a semaphore to this and the other databases.
     if (instance == null)
     {
         instance = new ChatServiceDatabase();
     }
     return(instance);
 }
Пример #3
0
        public static ChatServiceDatabase getInstance()
        {
            if (instance == null)
            {
                Debug.consoleMsg("Creating instance of the ChatServiceDatabase");
                instance = new ChatServiceDatabase();
                return(instance);
            }

            else
            {
                return(instance);
            }
        }