diff options
author | Sean Dague | 2007-07-16 15:40:11 +0000 |
---|---|---|
committer | Sean Dague | 2007-07-16 15:40:11 +0000 |
commit | 2a3c79df83e800d5dfe75a1a3b140ed81da2b1d6 (patch) | |
tree | e3f80ad51736cf17e856547b1bcf956010927434 /OpenSim/Region/Environment/StorageManager.cs | |
parent | *Trunk compiles now (diff) | |
download | opensim-SC_OLD-2a3c79df83e800d5dfe75a1a3b140ed81da2b1d6.zip opensim-SC_OLD-2a3c79df83e800d5dfe75a1a3b140ed81da2b1d6.tar.gz opensim-SC_OLD-2a3c79df83e800d5dfe75a1a3b140ed81da2b1d6.tar.bz2 opensim-SC_OLD-2a3c79df83e800d5dfe75a1a3b140ed81da2b1d6.tar.xz |
changed to native line ending encoding
Diffstat (limited to 'OpenSim/Region/Environment/StorageManager.cs')
-rw-r--r-- | OpenSim/Region/Environment/StorageManager.cs | 120 |
1 files changed, 60 insertions, 60 deletions
diff --git a/OpenSim/Region/Environment/StorageManager.cs b/OpenSim/Region/Environment/StorageManager.cs index 8f8ac97..fb12c4d 100644 --- a/OpenSim/Region/Environment/StorageManager.cs +++ b/OpenSim/Region/Environment/StorageManager.cs | |||
@@ -1,60 +1,60 @@ | |||
1 | using System; | 1 | using System; |
2 | using System.Collections.Generic; | 2 | using System.Collections.Generic; |
3 | using System.Text; | 3 | using System.Text; |
4 | 4 | ||
5 | using OpenSim.Framework; | 5 | using OpenSim.Framework; |
6 | using OpenSim.Framework.Communications; | 6 | using OpenSim.Framework.Communications; |
7 | using OpenSim.Framework.Servers; | 7 | using OpenSim.Framework.Servers; |
8 | using OpenSim.Region.Capabilities; | 8 | using OpenSim.Region.Capabilities; |
9 | using OpenSim.Region.Environment.Scenes; | 9 | using OpenSim.Region.Environment.Scenes; |
10 | using OpenSim.Region.Interfaces; | 10 | using OpenSim.Region.Interfaces; |
11 | 11 | ||
12 | using System.Reflection; | 12 | using System.Reflection; |
13 | 13 | ||
14 | namespace OpenSim.Region.Environment | 14 | namespace OpenSim.Region.Environment |
15 | { | 15 | { |
16 | public class StorageManager | 16 | public class StorageManager |
17 | { | 17 | { |
18 | private IRegionDataStore m_dataStore; | 18 | private IRegionDataStore m_dataStore; |
19 | 19 | ||
20 | public IRegionDataStore DataStore | 20 | public IRegionDataStore DataStore |
21 | { | 21 | { |
22 | get | 22 | get |
23 | { | 23 | { |
24 | return m_dataStore; | 24 | return m_dataStore; |
25 | } | 25 | } |
26 | } | 26 | } |
27 | 27 | ||
28 | public StorageManager(IRegionDataStore storage) | 28 | public StorageManager(IRegionDataStore storage) |
29 | { | 29 | { |
30 | m_dataStore = storage; | 30 | m_dataStore = storage; |
31 | } | 31 | } |
32 | 32 | ||
33 | public StorageManager(string dllName, string dataStoreFile, string dataStoreDB) | 33 | public StorageManager(string dllName, string dataStoreFile, string dataStoreDB) |
34 | { | 34 | { |
35 | Assembly pluginAssembly = Assembly.LoadFrom(dllName); | 35 | Assembly pluginAssembly = Assembly.LoadFrom(dllName); |
36 | 36 | ||
37 | foreach (Type pluginType in pluginAssembly.GetTypes()) | 37 | foreach (Type pluginType in pluginAssembly.GetTypes()) |
38 | { | 38 | { |
39 | if (pluginType.IsPublic) | 39 | if (pluginType.IsPublic) |
40 | { | 40 | { |
41 | Type typeInterface = pluginType.GetInterface("IRegionDataStore", true); | 41 | Type typeInterface = pluginType.GetInterface("IRegionDataStore", true); |
42 | 42 | ||
43 | if (typeInterface != null) | 43 | if (typeInterface != null) |
44 | { | 44 | { |
45 | IRegionDataStore plug = (IRegionDataStore)Activator.CreateInstance(pluginAssembly.GetType(pluginType.ToString())); | 45 | IRegionDataStore plug = (IRegionDataStore)Activator.CreateInstance(pluginAssembly.GetType(pluginType.ToString())); |
46 | plug.Initialise(dataStoreFile, dataStoreDB); | 46 | plug.Initialise(dataStoreFile, dataStoreDB); |
47 | 47 | ||
48 | m_dataStore = plug; | 48 | m_dataStore = plug; |
49 | } | 49 | } |
50 | 50 | ||
51 | typeInterface = null; | 51 | typeInterface = null; |
52 | } | 52 | } |
53 | } | 53 | } |
54 | 54 | ||
55 | pluginAssembly = null; | 55 | pluginAssembly = null; |
56 | 56 | ||
57 | //TODO: Add checking and warning to make sure it initialised. | 57 | //TODO: Add checking and warning to make sure it initialised. |
58 | } | 58 | } |
59 | } | 59 | } |
60 | } | 60 | } |