public static void Initialize() { if (_sm_UserActivityDB_Internal == null) { lock (sm_ThreadObject) { if (_sm_UserActivityDB_Internal == null) { VF.MongoDatabase databaseClient = RealmPlayersDB.GetInstance(); _sm_UserActivityDB_Internal = databaseClient.GetCollection <Element>("UserActivity"); } } } }
public static VF.MongoDatabase GetInstance() { if (sm_GlobalInstance == null) { lock (sm_ThreadObject) { if (sm_GlobalInstance == null) { sm_GlobalInstance = new VF.MongoDatabase("127.0.0.1", "RealmPlayersDB"); } } } return(sm_GlobalInstance); }
public static VF.MongoDatabase GetInstance(bool _DebugMode = false) { if (sm_GlobalInstance == null) { lock (sm_ThreadObject) { if (sm_GlobalInstance == null) { if (_DebugMode == true) { sm_GlobalInstance = new VF.MongoDatabase("192.168.1.198", "RealmPlayersDB"); } else { sm_GlobalInstance = new VF.MongoDatabase("127.0.0.1", "RealmPlayersDB"); } } } } return(sm_GlobalInstance); }