29 using System.Reflection;
31 using OpenSim.Framework;
33 using OpenSim.Services.Interfaces;
34 using OpenSim.Services.Base;
36 namespace OpenSim.Services.AvatarService
45 string dllName = String.Empty;
46 string connString = String.Empty;
47 string realm =
"Avatars";
52 IConfig dbConfig = config.Configs[
"DatabaseService"];
55 if (dllName == String.Empty)
56 dllName = dbConfig.GetString(
"StorageProvider", String.Empty);
57 if (connString == String.Empty)
58 connString = dbConfig.GetString(
"ConnectionString", String.Empty);
64 IConfig presenceConfig = config.Configs[
"AvatarService"];
65 if (presenceConfig != null)
67 dllName = presenceConfig.GetString(
"StorageProvider", dllName);
68 connString = presenceConfig.GetString(
"ConnectionString", connString);
69 realm = presenceConfig.GetString(
"Realm", realm);
75 if (dllName.Equals(String.Empty))
76 throw new Exception(
"No StorageProvider configured");
78 m_Database = LoadPlugin<IAvatarData>(dllName,
new Object[] { connString, realm });
79 if (m_Database == null)
80 throw new Exception(
"Could not find a storage interface in the given module " + dllName);
AvatarServiceBase(IConfigSource config)