本文整理汇总了C#中IGenericData类的典型用法代码示例。如果您正苦于以下问题:C# IGenericData类的具体用法?C# IGenericData怎么用?C# IGenericData使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
IGenericData类属于命名空间,在下文中一共展示了IGenericData类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: 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);
}
}
示例2: Initialize
public void Initialize(IGenericData GenericData, IConfigSource source, IRegistryCore registry,
string defaultConnectionString)
{
GD = GenericData;
m_registry = registry;
IConfig config = source.Configs["Currency"];
if (config == null || source.Configs["Currency"].GetString("Module", "") != "BaseCurrency")
return;
IConfig gridInfo = source.Configs["GridInfoService"];
if (gridInfo != null)
{
InWorldCurrency = gridInfo.GetString ("CurrencySymbol", string.Empty) + " ";
RealCurrency = gridInfo.GetString ("RealCurrencySymbol", string.Empty) + " ";
}
if (source.Configs[Name] != null)
defaultConnectionString = source.Configs[Name].GetString("ConnectionString", defaultConnectionString);
if (GenericData != null)
GenericData.ConnectToDatabase(defaultConnectionString, "SimpleCurrency", true);
Framework.Utilities.DataManager.RegisterPlugin(Name, this);
m_config = new BaseCurrencyConfig(config);
Init(m_registry, Name, "", "/currency/", "CurrencyServerURI");
}
示例3: 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);
}
}
}
示例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, "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);
}
示例5: 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);
}
}
示例6: 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);
}
}
示例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 unneeded, IConfigSource source, IRegistryCore simBase, string defaultConnectionString)
{
m_registry = simBase;
if (source.Configs["AuroraConnectors"].GetString("ProfileConnector", "LocalConnector") == "RemoteConnector")
{
DataManager.DataManager.RegisterPlugin(Name, this);
}
}
示例9: Initialize
public void Initialize(IGenericData unneeded, IConfigSource source, IRegistryCore simBase, string defaultConnectionString)
{
if (source.Configs["AuroraConnectors"].GetString("OfflineMessagesConnector", "LocalConnector") == "SimianConnector")
{
m_ServerURIs = simBase.RequestModuleInterface<IConfigurationService>().FindValueOf("RemoteServerURI");
DataManager.DataManager.RegisterPlugin(Name, this);
}
}
示例10: Initialize
public void Initialize(IGenericData GenericData, Nini.Config.IConfigSource source, IRegistryCore simBase, string DefaultConnectionString)
{
DataManager.DataManager.RegisterPlugin(this);
string path = Util.BasePathCombine(System.IO.Path.Combine("data", "OpenRegionSettingsPage.html"));
if(System.IO.File.Exists(path))
HTMLPage = System.IO.File.ReadAllText(path);
}
示例11: Initialize
public void Initialize(IGenericData unneeded, ISimulationBase simBase, string DefaultConnectionString)
{
if (simBase.ConfigSource.Configs["AuroraConnectors"].GetString("MuteListConnector", "LocalConnector") == "SimianConnector")
{
m_ServerURIs = simBase.ApplicationRegistry.RequestModuleInterface<IConfigurationService>().FindValueOf("RemoteServerURI");
DataManager.DataManager.RegisterPlugin(Name, this);
}
}
示例12: Initialize
public void Initialize(IGenericData unneeded, IConfigSource source, string DefaultConnectionString)
{
if (source.Configs["AuroraConnectors"].GetString("OfflineMessagesConnector", "LocalConnector") == "SimianConnector")
{
m_ServerURI = source.Configs["AuroraData"].GetString("RemoteServerURI", "");
DataManager.DataManager.RegisterPlugin(Name, this);
}
}
示例13: Initialize
public void Initialize(IGenericData GenericData, IConfigSource source, string DefaultConnectionString)
{
if (source.Configs["AuroraConnectors"].GetString("GroupsConnector", "LocalConnector") == "RemoteConnector")
{
m_ServerURI = source.Configs["AuroraData"].GetString("RemoteServerURI", "");
if (m_ServerURI != "")
DataManager.DataManager.RegisterPlugin(Name, this);
}
}
示例14: Initialize
public void Initialize(IGenericData GenericData, IConfigSource source, IRegistryCore simBase,
string defaultConnectionString)
{
if (source.Configs["AuroraConnectors"].GetString("GroupsConnector", "LocalConnector") == "RemoteConnector")
{
m_registry = simBase;
DataManager.DataManager.RegisterPlugin(this);
}
}
示例15: Initialize
public void Initialize(IGenericData unneeded, ISimulationBase simBase, string defaultConnectionString)
{
IConfigSource source = simBase.ConfigSource;
if (source.Configs["AuroraConnectors"].GetString("OfflineMessagesConnector", "LocalConnector") == "RemoteConnector")
{
m_ServerURI = simBase.ApplicationRegistry.RequestModuleInterface<IAutoConfigurationService>().FindValueOf("RemoteServerURI", "AuroraData");
if (m_ServerURI != "")
DataManager.DataManager.RegisterPlugin(Name, this);
}
}