本文整理汇总了C#中IGenericData类的典型用法代码示例。如果您正苦于以下问题:C# IGenericData类的具体用法?C# IGenericData怎么用?C# IGenericData使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
IGenericData类属于命名空间,在下文中一共展示了IGenericData类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的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);
}
}
开发者ID:velus,项目名称:Async-Sim-Testing,代码行数:33,代码来源:Simple.CurrencyConnector.cs
示例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");
}
开发者ID:WhiteCoreSim,项目名称:WhiteCore-Dev,代码行数:29,代码来源:Base.CurrencyConnector.cs
示例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);
}
}
}
开发者ID:WordfromtheWise,项目名称:Aurora,代码行数:31,代码来源:LocalProfileConnector.cs
示例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);
}
开发者ID:nathanmarck,项目名称:Aurora-Sim,代码行数:25,代码来源:LocalOfflineMessagesConnector.cs
示例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);
}
}
开发者ID:Gnu32,项目名称:Silverfin,代码行数:25,代码来源:LocalUserInfoConnector.cs
示例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);
}
}
开发者ID:savino1976,项目名称:Aurora-Sim,代码行数:26,代码来源:LocalAbuseReportsConnector.cs
示例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);
}
}
}
开发者ID:KristenMynx,项目名称:Aurora-Sim,代码行数:32,代码来源:LocalAgentConnector.cs
示例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);
}
}
开发者ID:rknop,项目名称:Aurora-Sim,代码行数:8,代码来源:RemoteProfileConnector.cs
示例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);
}
}
开发者ID:rknop,项目名称:Aurora-Sim,代码行数:8,代码来源:SimianOfflineMessagesConnector.cs
示例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);
}
开发者ID:nathanmarck,项目名称:Aurora-Sim,代码行数:8,代码来源:OpenRegionSettingsConnector.cs
示例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);
}
}
开发者ID:mugginsm,项目名称:Aurora-Sim,代码行数:8,代码来源:SimianMuteListConnector.cs
示例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);
}
}
开发者ID:shangcheng,项目名称:Aurora,代码行数:8,代码来源:SimianOfflineMessagesConnector.cs
示例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);
}
}
开发者ID:shangcheng,项目名称:Aurora,代码行数:9,代码来源:RemoteGroupsServiceConnector.cs
示例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);
}
}
开发者ID:satlanski2,项目名称:Aurora-Sim,代码行数:9,代码来源:RemoteGroupsServiceConnector.cs
示例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);
}
}
开发者ID:KristenMynx,项目名称:Aurora-Sim,代码行数:10,代码来源:RemoteOfflineMessagesConnector.cs
示例16: Initialize
public void Initialize(IGenericData GenericData, ISimulationBase simBase, string defaultConnectionString)
{
IConfigSource source = simBase.ConfigSource;
if (source.Configs["AuroraConnectors"].GetString("GroupsConnector", "LocalConnector") == "RemoteConnector")
{
m_ServerURIs = simBase.ApplicationRegistry.RequestModuleInterface<IConfigurationService>().FindValueOf("RemoteServerURI");
if (m_ServerURIs.Count != 0)
DataManager.DataManager.RegisterPlugin(Name, this);
}
}
开发者ID:mugginsm,项目名称:Aurora-Sim,代码行数:10,代码来源:RemoteGroupsServiceConnector.cs
示例17: Initialize
public void Initialize(IGenericData unneeded, IConfigSource source, string DefaultConnectionString)
{
if (source.Configs["AuroraConnectors"].GetString("RegionConnector", "LocalConnector") == "SimianConnector")
{
m_ServerURI = source.Configs["AuroraData"].GetString("RemoteServerURI", string.Empty);
//If blank, no connector
if (m_ServerURI != string.Empty)
DataManager.DataManager.RegisterPlugin(Name, this);
}
}
开发者ID:WordfromtheWise,项目名称:Aurora,代码行数:11,代码来源:SimianRegionConnector.cs
示例18: Initialize
public void Initialize (IGenericData unneeded, IConfigSource source, IRegistryCore simBase, string defaultConnectionString)
{
if (source.Configs["AuroraConnectors"].GetString ("ProfileConnector", "LocalConnector") == "IWCConnector")
{
m_localService = new LocalProfileConnector ();
m_localService.Initialize (unneeded, source, simBase, defaultConnectionString);
m_remoteService = new RemoteProfileConnector ();
m_remoteService.Initialize (unneeded, source, simBase, defaultConnectionString);
m_registry = simBase;
DataManager.DataManager.RegisterPlugin (Name, this);
}
}
开发者ID:kow,项目名称:Aurora-Sim,代码行数:12,代码来源:IWCProfileConnector.cs
示例19: 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);
}
}
开发者ID:WordfromtheWise,项目名称:Aurora,代码行数:13,代码来源:LocalAvatarArchiverConnector.cs
示例20: 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);
}
开发者ID:nathanmarck,项目名称:Aurora-Sim,代码行数:20,代码来源:LocalSchedulerConnector.cs
注:本文中的IGenericData类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论