本文整理汇总了C#中ISimulationService.GetInnerService方法的典型用法代码示例。如果您正苦于以下问题:C# ISimulationService.GetInnerService方法的具体用法?C# ISimulationService.GetInnerService怎么用?C# ISimulationService.GetInnerService使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ISimulationService
的用法示例。
在下文中一共展示了ISimulationService.GetInnerService方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: PostStart
public void PostStart(IConfigSource config, IRegistryCore registry)
{
IConfig handlerConfig = config.Configs["Handlers"];
if (handlerConfig.GetString("SimulationInHandler", "") != Name)
return;
bool secure = handlerConfig.GetBoolean("SecureSimulation", true);
IHttpServer server = registry.RequestModuleInterface<ISimulationBase>().GetHttpServer((uint)handlerConfig.GetInt("SimulationInHandlerPort"));
m_LocalSimulationService = registry.RequestModuleInterface<ISimulationService>();
string path = "/" + UUID.Random().ToString() + "/agent/";
IGridRegisterModule registerModule = registry.RequestModuleInterface<IGridRegisterModule>();
if (registerModule != null && secure)
registerModule.AddGenericInfo("SimulationAgent", path);
else
{
secure = false;
path = "/agent/";
}
server.AddHTTPHandler(path, new AgentHandler(m_LocalSimulationService.GetInnerService(), secure).Handler);
server.AddHTTPHandler("/object/", new ObjectHandler(m_LocalSimulationService.GetInnerService()).Handler);
}
示例2: SimulationServiceInConnector
public SimulationServiceInConnector(IConfigSource config, IHttpServer server, IScene scene) :
base(config, server, String.Empty)
{
//IConfig serverConfig = config.Configs["SimulationService"];
//if (serverConfig == null)
// throw new Exception("No section 'SimulationService' in config file");
//string simService = serverConfig.GetString("LocalServiceModule",
// String.Empty);
//if (simService == String.Empty)
// throw new Exception("No SimulationService in config file");
//Object[] args = new Object[] { config };
m_LocalSimulationService = scene.RequestModuleInterface<ISimulationService>();
m_LocalSimulationService = m_LocalSimulationService.GetInnerService();
//ServerUtils.LoadPlugin<ISimulationService>(simService, args);
//System.Console.WriteLine("XXXXXXXXXXXXXXXXXXX m_AssetSetvice == null? " + ((m_AssetService == null) ? "yes" : "no"));
//server.AddStreamHandler(new AgentGetHandler(m_SimulationService, m_AuthenticationService));
//server.AddStreamHandler(new AgentPostHandler(m_SimulationService, m_AuthenticationService));
//server.AddStreamHandler(new AgentPutHandler(m_SimulationService, m_AuthenticationService));
//server.AddStreamHandler(new AgentDeleteHandler(m_SimulationService, m_AuthenticationService));
server.AddHTTPHandler("/agent/", new AgentHandler(m_LocalSimulationService).Handler);
server.AddHTTPHandler("/object/", new ObjectHandler(m_LocalSimulationService).Handler);
//server.AddStreamHandler(new ObjectPostHandler(m_SimulationService, authentication));
}
示例3: EventManager_OnGenericEvent
object EventManager_OnGenericEvent(string FunctionName, object parameters)
{
if (FunctionName != "PreRegisterRegion")
return null;
IConfig handlerConfig = m_config.Configs["Handlers"];
if (handlerConfig.GetString("SimulationInHandler", "") != Name)
return null;
if (m_LocalSimulationService != null)
return null;
bool secure = handlerConfig.GetBoolean("SecureSimulation", true);
IHttpServer server = m_registry.RequestModuleInterface<ISimulationBase>().GetHttpServer((uint)handlerConfig.GetInt("SimulationInHandlerPort"));
m_LocalSimulationService = m_registry.RequestModuleInterface<ISimulationService>();
string path = "/" + UUID.Random().ToString() + "/agent/";
IGridRegisterModule registerModule = m_registry.RequestModuleInterface<IGridRegisterModule>();
if (registerModule != null && secure)
registerModule.AddGenericInfo("SimulationAgent", path);
else
{
secure = false;
path = "/agent/";
}
server.AddHTTPHandler(path, new AgentHandler(m_LocalSimulationService.GetInnerService(), secure).Handler);
server.AddHTTPHandler("/object/", new ObjectHandler(m_LocalSimulationService.GetInnerService(), m_config).Handler);
return null;
}
示例4: SimulationServiceInConnector
// private IAuthenticationService m_AuthenticationService;
public SimulationServiceInConnector(IConfigSource config, IHttpServer server, IScene scene) :
base(config, server, String.Empty)
{
m_LocalSimulationService = scene.RequestModuleInterface<ISimulationService>();
m_LocalSimulationService = m_LocalSimulationService.GetInnerService();
// This one MUST be a stream handler because compressed fatpacks
// are pure binary and shoehorning that into a string with UTF-8
// encoding breaks it
server.AddStreamHandler(new AgentPostHandler(m_LocalSimulationService));
server.AddStreamHandler(new AgentPutHandler(m_LocalSimulationService));
server.AddHTTPHandler("/agent/", new AgentHandler(m_LocalSimulationService).Handler);
server.AddHTTPHandler("/object/", new ObjectHandler(m_LocalSimulationService).Handler);
}