本文整理汇总了C#中IGenericData.ConnectToDatabase方法的典型用法代码示例。如果您正苦于以下问题:C# IGenericData.ConnectToDatabase方法的具体用法?C# IGenericData.ConnectToDatabase怎么用?C# IGenericData.ConnectToDatabase使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类IGenericData
的用法示例。
在下文中一共展示了IGenericData.ConnectToDatabase方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: Initialize
public void Initialize(IGenericData GenericData, IConfigSource source, IRegistryCore simBase, string defaultConnectionString)
{
if (source.Configs["AuroraConnectors"].GetString("RegionInfoConnector", "LocalConnector") == "LocalConnector")
{
GD = GenericData;
if (source.Configs[Name] != null)
defaultConnectionString = source.Configs[Name].GetString("ConnectionString", defaultConnectionString);
GD.ConnectToDatabase (defaultConnectionString, "Generics", source.Configs["AuroraConnectors"].GetBoolean ("ValidateTables", true));
GD.ConnectToDatabase (defaultConnectionString, "RegionInfo", source.Configs["AuroraConnectors"].GetBoolean ("ValidateTables", true));
DataManager.DataManager.RegisterPlugin(Name, this);
}
}
示例2: Initialize
public void Initialize(IGenericData GenericData, IConfigSource source, IRegistryCore simBase,
string defaultConnectionString)
{
if (source.Configs["AuroraConnectors"].GetString("UserInfoConnector", "LocalConnector") == "LocalConnector")
{
GD = GenericData;
string connectionString = defaultConnectionString;
if (source.Configs[Name] != null)
{
connectionString = source.Configs[Name].GetString("ConnectionString", defaultConnectionString);
m_allowDuplicatePresences =
source.Configs[Name].GetBoolean("AllowDuplicatePresences",
m_allowDuplicatePresences);
m_checkLastSeen =
source.Configs[Name].GetBoolean("CheckLastSeen",
m_checkLastSeen);
}
GD.ConnectToDatabase(connectionString, "UserInfo",
source.Configs["AuroraConnectors"].GetBoolean("ValidateTables", true));
DataManager.DataManager.RegisterPlugin(this);
}
}
示例3: Initialize
public void Initialize(IGenericData GenericData, IConfigSource source, IRegistryCore simBase,
string defaultConnectionString)
{
GD = GenericData;
if (source.Configs[Name] != null)
defaultConnectionString = source.Configs[Name].GetString("ConnectionString", defaultConnectionString);
GD.ConnectToDatabase(defaultConnectionString, "Generics",
source.Configs["AuroraConnectors"].GetBoolean("ValidateTables", true));
DataManager.DataManager.RegisterPlugin(Name + "Local", this);
m_maxOfflineMessages = source.Configs["AuroraConnectors"].GetInt("MaxOfflineMessages", m_maxOfflineMessages);
m_maxGroupOfflineMessages = source.Configs["AuroraConnectors"].GetInt("MaxGroupOfflineMessages",
m_maxGroupOfflineMessages);
m_saveGroupOfflineMessages = source.Configs["AuroraConnectors"].GetBoolean("SaveOfflineGroupChatMessages",
m_saveGroupOfflineMessages);
if (source.Configs["AuroraConnectors"].GetString("OfflineMessagesConnector", "LocalConnector") ==
"LocalConnector")
{
DataManager.DataManager.RegisterPlugin(this);
}
Init(simBase, Name);
}
示例4: Initialize
public void Initialize(IGenericData GenericData, IConfigSource source, IRegistryCore simBase,
string defaultConnectionString)
{
GD = GenericData;
if (source.Configs[Name] != null)
defaultConnectionString = source.Configs[Name].GetString("ConnectionString", defaultConnectionString);
GD.ConnectToDatabase(defaultConnectionString, "AbuseReports",
source.Configs["AuroraConnectors"].GetBoolean("ValidateTables", true));
DataManager.DataManager.RegisterPlugin(Name + "Local", this);
if (source.Configs["AuroraConnectors"].GetString("AbuseReportsConnector", "LocalConnector") ==
"LocalConnector")
{
WebPassword = Util.Md5Hash(source.Configs["Handlers"].GetString("WireduxHandlerPassword", String.Empty));
//List<string> Results = GD.Query("Method", "abusereports", "passwords", "Password");
//if (Results.Count == 0)
//{
// string newPass = MainConsole.Instance.PasswdPrompt("Password to access Abuse Reports");
// GD.Insert("passwords", new object[] { "abusereports", Util.Md5Hash(Util.Md5Hash(newPass)) });
//}
DataManager.DataManager.RegisterPlugin(Name, this);
}
}
示例5: Initialize
public void Initialize(IGenericData GenericData, IConfigSource source, IRegistryCore registry,
string defaultConnectionString)
{
m_gd = GenericData;
m_registry = registry;
IConfig config = source.Configs["Currency"];
if (config == null || source.Configs["Currency"].GetString("Module", "") != "SimpleCurrency")
return;
if (source.Configs[Name] != null)
defaultConnectionString = source.Configs[Name].GetString("ConnectionString", defaultConnectionString);
if (GenericData != null)
GenericData.ConnectToDatabase(defaultConnectionString, "SimpleCurrency", true);
DataManager.RegisterPlugin(Name, this);
m_config = new SimpleCurrencyConfig(config);
Init(m_registry, Name, "", "/currency/", "CurrencyServerURI");
if (!m_doRemoteCalls)
{
MainConsole.Instance.Commands.AddCommand("money add", "money add", "Adds money to a user's account.",
AddMoney);
MainConsole.Instance.Commands.AddCommand("money set", "money set",
"Sets the amount of money a user has.",
SetMoney);
MainConsole.Instance.Commands.AddCommand("money get", "money get",
"Gets the amount of money a user has.",
GetMoney);
}
}
示例6: Initialize
public void Initialize(IGenericData GenericData, IConfigSource source, string defaultConnectionString)
{
if (source.Configs["AuroraConnectors"].GetString("ProfileConnector", "LocalConnector") == "LocalConnector")
{
GD = GenericData;
if (source.Configs[Name] != null)
defaultConnectionString = source.Configs[Name].GetString("ConnectionString", defaultConnectionString);
GD.ConnectToDatabase(defaultConnectionString);
DataManager.DataManager.RegisterPlugin(Name, this);
}
else
{
//Check to make sure that something else exists
string m_ServerURI = source.Configs["AuroraData"].GetString("RemoteServerURI", "");
if (m_ServerURI == "") //Blank, not set up
{
OpenSim.Framework.Console.MainConsole.Instance.Output("[AuroraDataService]: Falling back on local connector for " + "ProfileConnector", "None");
GD = GenericData;
if (source.Configs[Name] != null)
defaultConnectionString = source.Configs[Name].GetString("ConnectionString", defaultConnectionString);
GD.ConnectToDatabase(defaultConnectionString);
DataManager.DataManager.RegisterPlugin(Name, this);
}
}
}
示例7: Initialize
public void Initialize(IGenericData GenericData, ISimulationBase simBase, string defaultConnectionString)
{
IConfigSource source = simBase.ConfigSource;
if (source.Configs["AuroraConnectors"].GetString("AgentConnector", "LocalConnector") == "LocalConnector")
{
GD = GenericData;
if (source.Configs[Name] != null)
defaultConnectionString = source.Configs[Name].GetString("ConnectionString", defaultConnectionString);
GD.ConnectToDatabase(defaultConnectionString);
DataManager.DataManager.RegisterPlugin(Name, this);
}
else
{
//Check to make sure that something else exists
string m_ServerURI = simBase.ApplicationRegistry.RequestModuleInterface<IAutoConfigurationService>().FindValueOf("RemoteServerURI", "AuroraData");
if (m_ServerURI == "") //Blank, not set up
{
OpenSim.Framework.Console.MainConsole.Instance.Output("[AuroraDataService]: Falling back on local connector for " + "AgentConnector", "None");
GD = GenericData;
if (source.Configs[Name] != null)
defaultConnectionString = source.Configs[Name].GetString("ConnectionString", defaultConnectionString);
GD.ConnectToDatabase(defaultConnectionString);
DataManager.DataManager.RegisterPlugin(Name, this);
}
}
}
示例8: Initialize
public void Initialize(IGenericData GenericData, IConfigSource source, string defaultConnectionString)
{
if (source.Configs["AuroraConnectors"].GetString("AvatarArchiverConnector", "LocalConnector") == "LocalConnector")
{
GD = GenericData;
if (source.Configs[Name] != null)
defaultConnectionString = source.Configs[Name].GetString("ConnectionString", defaultConnectionString);
GD.ConnectToDatabase(defaultConnectionString);
DataManager.DataManager.RegisterPlugin(Name, this);
}
}
示例9: Initialize
/// <summary>
/// Starts the database plugin, performs migrations if needed
/// </summary>
/// <param name = "GenericData">The Database Plugin</param>
/// <param name = "source">Config if more parameters are needed</param>
/// <param name="simBase"></param>
/// <param name = "DefaultConnectionString">The connection string to use</param>
public void Initialize(IGenericData GenericData, IConfigSource source, IRegistryCore simBase, string DefaultConnectionString)
{
if (source.Configs["AuroraConnectors"].GetString("SchedulerConnector", "LocalConnector") != "LocalConnector")
return;
if (source.Configs[Name] != null)
DefaultConnectionString = source.Configs[Name].GetString("ConnectionString", DefaultConnectionString);
GenericData.ConnectToDatabase(DefaultConnectionString, "Scheduler",
source.Configs["AuroraConnectors"].GetBoolean("ValidateTables", true));
m_Gd = GenericData;
DataManager.DataManager.RegisterPlugin(this);
}
示例10: Initialize
public void Initialize(IGenericData genericData, IConfigSource source, IRegistryCore simBase, string defaultConnectionString)
{
if (source.Configs["AuroraConnectors"].GetString("AssetConnector", "LocalConnector") != "LocalConnector")
return;
m_Gd = genericData;
m_Log.Warn("Asset Database is using " + ((IDataConnector)genericData).Identifier);
if (source.Configs[Name] != null)
defaultConnectionString = source.Configs[Name].GetString("ConnectionString", defaultConnectionString);
genericData.ConnectToDatabase(defaultConnectionString, "Asset", source.Configs["AuroraConnectors"].GetBoolean("ValidateTables", true));
DataManager.DataManager.RegisterPlugin(Name, this);
}
示例11: Initialize
/// <summary>
/// Starts the database plugin, performs migrations if needed
/// </summary>
/// <param name="genericData">The Database Plugin</param>
/// <param name="source">Config if more parameters are needed</param>
/// <param name="simBase"></param>
/// <param name="defaultConnectionString">The connection string to use</param>
public void Initialize(IGenericData genericData, IConfigSource source, IRegistryCore simBase,
string defaultConnectionString)
{
if (source.Configs["WhiteCoreConnectors"].GetString("SchedulerConnector", "LocalConnector") != "LocalConnector")
return;
if (source.Configs[Name] != null)
defaultConnectionString = source.Configs[Name].GetString("ConnectionString", defaultConnectionString);
if (genericData != null)
genericData.ConnectToDatabase(defaultConnectionString, "Scheduler",
source.Configs["WhiteCoreConnectors"].GetBoolean("ValidateTables", true));
GD = genericData;
Framework.Utilities.DataManager.RegisterPlugin(this);
}
示例12: Initialize
public void Initialize(IGenericData GenericData, ISimulationBase simBase, string defaultConnectionString)
{
IConfigSource source = simBase.ConfigSource;
if (source.Configs["AuroraConnectors"].GetString("WebStatsDataConnector", "LocalConnector") == "LocalConnector")
{
GD = GenericData;
if (source.Configs[Name] != null)
defaultConnectionString = source.Configs[Name].GetString("ConnectionString", defaultConnectionString);
GD.ConnectToDatabase(defaultConnectionString);
DataManager.DataManager.RegisterPlugin(Name, this);
}
}
示例13: Initialize
public void Initialize(IGenericData GenericData, IConfigSource source, IRegistryCore registry, string DefaultConnectionString)
{
if (source.Configs["AuroraConnectors"].GetString("PresenceInfoConnector", "LocalConnector") == "LocalConnector")
{
GD = GenericData;
if (source.Configs[Name] != null)
{
DefaultConnectionString = source.Configs[Name].GetString("ConnectionString", DefaultConnectionString);
DatabaseToAuthTable = source.Configs[Name].GetString("DatabasePathToAuthTable", DatabaseToAuthTable);
}
GD.ConnectToDatabase(DefaultConnectionString, "PresenceInfo", true);
DataManager.DataManager.RegisterPlugin(this);
}
}
示例14: Initialize
public override void Initialize(IGenericData GenericData, IConfigSource source, IRegistryCore simBase, string defaultConnectionString)
{
if (source.Configs["AuroraConnectors"].GetString("InventoryConnector", "LocalConnector") == "RobustConnector")
{
GD = GenericData;
m_registry = simBase;
string connectionString = defaultConnectionString;
if (source.Configs[Name] != null)
connectionString = source.Configs[Name].GetString("ConnectionString", defaultConnectionString);
GD.ConnectToDatabase(connectionString, "Inventory", source.Configs["AuroraConnectors"].GetBoolean("ValidateTables", true));
DataManager.DataManager.RegisterPlugin(Name, this);
}
}
示例15: Initialize
public void Initialize (IGenericData GenericData, IConfigSource source, IRegistryCore simBase, string defaultConnectionString)
{
if (source.Configs ["UniverseConnectors"].GetString ("FriendsConnector", "LocalConnector") != "LocalConnector")
return;
GD = GenericData;
string connectionString = defaultConnectionString;
if (source.Configs [Name] != null)
connectionString = source.Configs [Name].GetString ("ConnectionString", defaultConnectionString);
if (GD != null)
GD.ConnectToDatabase (connectionString, "Friends", source.Configs ["UniverseConnectors"].GetBoolean ("ValidateTables", true));
Framework.Utilities.DataManager.RegisterPlugin (this);
}