OSDN Git Service

Making RadegastInstance public.. also added the GridClient to the constructor
authorDouglas R. Miles <logicmoo@gmail.com>
Fri, 28 Aug 2009 19:30:12 +0000 (19:30 +0000)
committerDouglas R. Miles <logicmoo@gmail.com>
Fri, 28 Aug 2009 19:30:12 +0000 (19:30 +0000)
git-svn-id: https://radegast.googlecode.com/svn/trunk@174 f7a694da-4d33-11de-9ad6-1127a62b9fcd

Radegast/Core/RadegastInstance.cs

index e0d1b60..076c393 100644 (file)
@@ -57,7 +57,7 @@ namespace Radegast
             {\r
                 if (globalInstance == null)\r
                 {\r
-                    globalInstance = new RadegastInstance();\r
+                    globalInstance = new RadegastInstance(new GridClient());\r
                 }\r
                 return globalInstance;\r
             }\r
@@ -121,11 +121,13 @@ namespace Radegast
 \r
         public readonly List<IRadegastPlugin> PluginsLoaded = new List<IRadegastPlugin>();\r
 \r
-        private RadegastInstance()\r
+        public RadegastInstance(GridClient client0)\r
         {\r
+            // incase something else calls GlobalInstance while we are loading\r
+            globalInstance = this; \r
             InitializeLoggingAndConfig();\r
 \r
-            client = new GridClient();\r
+            client = client0;\r
 \r
             client.Settings.MULTIPLE_SIMS = true;\r
 \r