29 using System.Reflection;
32 using OpenSim.Services.Base;
35 namespace OpenSim.Services.ProfilesService
39 static readonly ILog m_log =
41 MethodBase.GetCurrentMethod().DeclaringType);
45 public string ConfigName
53 if(
string.IsNullOrEmpty(configName))
55 m_log.WarnFormat(
"[PROFILES SERVICE]: Configuration section not given!");
59 string dllName = String.Empty;
60 string connString = null;
61 string realm = String.Empty;
63 IConfig dbConfig = config.Configs[
"DatabaseService"];
66 if (dllName == String.Empty)
67 dllName = dbConfig.GetString(
"StorageProvider", String.Empty);
68 if (
string.IsNullOrEmpty(connString))
69 connString = dbConfig.GetString(
"ConnectionString", String.Empty);
72 IConfig ProfilesConfig = config.Configs[configName];
73 if (ProfilesConfig != null)
75 dllName = ProfilesConfig.GetString(
"StorageProvider", dllName);
76 connString = ProfilesConfig.GetString(
"ConnectionString", connString);
77 realm = ProfilesConfig.GetString(
"Realm", realm);
80 ProfilesData = LoadPlugin<IProfilesData>(dllName,
new Object[] { connString });
81 if (ProfilesData == null)
82 throw new Exception(
"Could not find a storage interface in the given module");
IProfilesData ProfilesData
UserProfilesServiceBase(IConfigSource config, string configName)