aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/OpenSim.RegionServer/Grid.cs
diff options
context:
space:
mode:
authorMW2007-05-26 14:34:57 +0000
committerMW2007-05-26 14:34:57 +0000
commitc3a40b7d42276f152d8f4f6a7a3ad4eca3c6d7a8 (patch)
treec5de8198621ecacf0798ff84aa00208c6f51a78f /OpenSim/OpenSim.RegionServer/Grid.cs
parentDie Avatar class, and you to Primitive class! (diff)
downloadopensim-SC_OLD-c3a40b7d42276f152d8f4f6a7a3ad4eca3c6d7a8.zip
opensim-SC_OLD-c3a40b7d42276f152d8f4f6a7a3ad4eca3c6d7a8.tar.gz
opensim-SC_OLD-c3a40b7d42276f152d8f4f6a7a3ad4eca3c6d7a8.tar.bz2
opensim-SC_OLD-c3a40b7d42276f152d8f4f6a7a3ad4eca3c6d7a8.tar.xz
Die WebFrontEnd, Die Grid class!
Diffstat (limited to 'OpenSim/OpenSim.RegionServer/Grid.cs')
-rw-r--r--OpenSim/OpenSim.RegionServer/Grid.cs78
1 files changed, 1 insertions, 77 deletions
diff --git a/OpenSim/OpenSim.RegionServer/Grid.cs b/OpenSim/OpenSim.RegionServer/Grid.cs
index db5b8fe..0b8db4d 100644
--- a/OpenSim/OpenSim.RegionServer/Grid.cs
+++ b/OpenSim/OpenSim.RegionServer/Grid.cs
@@ -9,82 +9,6 @@ namespace OpenSim
9{ 9{
10 public class Grid 10 public class Grid
11 { 11 {
12 public IAssetServer AssetServer; 12
13 public IGridServer GridServer;
14 public IUserServer UserServer;
15 public string AssetDll = "";
16 public string GridDll = "";
17
18 public Grid()
19 {
20 }
21
22 public virtual void Initialise()
23 {
24 //load the dlls
25 this.AssetServer = this.LoadAssetDll(this.AssetDll);
26 this.GridServer = this.LoadGridDll(this.GridDll);
27 }
28 public virtual void Close()
29 {
30 this.AssetServer.Close();
31 this.GridServer.Close();
32 }
33
34 private IAssetServer LoadAssetDll(string dllName)
35 {
36 Assembly pluginAssembly = Assembly.LoadFrom(dllName);
37 IAssetServer server = null;
38
39 foreach (Type pluginType in pluginAssembly.GetTypes())
40 {
41 if (pluginType.IsPublic)
42 {
43 if (!pluginType.IsAbstract)
44 {
45 Type typeInterface = pluginType.GetInterface("IAssetPlugin", true);
46
47 if (typeInterface != null)
48 {
49 IAssetPlugin plug = (IAssetPlugin)Activator.CreateInstance(pluginAssembly.GetType(pluginType.ToString()));
50 server = plug.GetAssetServer();
51 break;
52 }
53
54 typeInterface = null;
55 }
56 }
57 }
58 pluginAssembly = null;
59 return server;
60 }
61
62 private IGridServer LoadGridDll(string dllName)
63 {
64 Assembly pluginAssembly = Assembly.LoadFrom(dllName);
65 IGridServer server = null;
66
67 foreach (Type pluginType in pluginAssembly.GetTypes())
68 {
69 if (pluginType.IsPublic)
70 {
71 if (!pluginType.IsAbstract)
72 {
73 Type typeInterface = pluginType.GetInterface("IGridPlugin", true);
74
75 if (typeInterface != null)
76 {
77 IGridPlugin plug = (IGridPlugin)Activator.CreateInstance(pluginAssembly.GetType(pluginType.ToString()));
78 server = plug.GetGridServer();
79 break;
80 }
81
82 typeInterface = null;
83 }
84 }
85 }
86 pluginAssembly = null;
87 return server;
88 }
89 } 13 }
90} 14}