本文整理汇总了C#中ISimulationService类的典型用法代码示例。如果您正苦于以下问题:C# ISimulationService类的具体用法?C# ISimulationService怎么用?C# ISimulationService使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
ISimulationService类属于命名空间,在下文中一共展示了ISimulationService类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: FinishedStartup
public void FinishedStartup()
{
if (m_registry == null)
return; //Not enabled
m_CapsService = m_registry.RequestModuleInterface<ICapsService> ();
m_GridService = m_registry.RequestModuleInterface<IGridService> ();
m_PresenceService = m_registry.RequestModuleInterface<IAgentInfoService> ();
m_UserAccountService = m_registry.RequestModuleInterface<IUserAccountService> ();
m_UserAgentService = m_registry.RequestModuleInterface<IUserAgentService> ();
m_SimulationService = m_registry.RequestModuleInterface<ISimulationService> ();
m_DefaultGatewayRegion = FindDefaultRegion ();
}
示例2: 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;
}
示例3: GatekeeperAgentHandler
public GatekeeperAgentHandler(IGatekeeperService gatekeeper, ISimulationService service, bool proxy)
: base("POST", "/foreignagent")
{
m_SimulationService = service;
m_GatekeeperService = gatekeeper;
m_Proxy = proxy;
}
示例4: 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));
}
示例5: 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);
}
示例6: RexLoginService
public RexLoginService(IConfigSource config, ISimulationService simService, ILibraryService libraryService)
: base(config, simService, libraryService)
{
//TODO: Read configuration about m_UseOSInventory
//TODO: Read configuration about rexavatar
//TODO: Load rexavatar plugin
}
示例7: AgentPostHandler
// TODO: unused: private bool m_AllowForeignGuests;
public AgentPostHandler(ISimulationService service, IAuthenticationService authentication, bool foreignGuests) :
base("POST", "/agent")
{
m_SimulationService = service;
m_AuthenticationService = authentication;
// TODO: unused: m_AllowForeignGuests = foreignGuests;
}
示例8: ObjectHandler
public ObjectHandler(ISimulationService sim, IConfigSource source)
{
IConfig simulationConfig = source.Configs["Handlers"];
if(simulationConfig != null)
m_allowForeignIncomingObjects = simulationConfig.GetBoolean("AllowIncomingForeignObjects", m_allowForeignIncomingObjects );
m_SimulationService = sim;
}
示例9: GatekeeperService
public GatekeeperService(IConfigSource config, ISimulationService simService)
{
if (!m_Initialized)
{
m_Initialized = true;
IConfig serverConfig = config.Configs["GatekeeperService"];
if (serverConfig == null)
throw new Exception(String.Format("No section GatekeeperService in config file"));
string accountService = serverConfig.GetString("UserAccountService", String.Empty);
string homeUsersService = serverConfig.GetString("UserAgentService", string.Empty);
string gridService = serverConfig.GetString("GridService", String.Empty);
string presenceService = serverConfig.GetString("PresenceService", String.Empty);
string simulationService = serverConfig.GetString("SimulationService", String.Empty);
string gridUserService = serverConfig.GetString("GridUserService", String.Empty);
// These are mandatory, the others aren't
if (gridService == string.Empty || presenceService == string.Empty)
throw new Exception("Incomplete specifications, Gatekeeper Service cannot function.");
string scope = serverConfig.GetString("ScopeID", UUID.Zero.ToString());
UUID.TryParse(scope, out m_ScopeID);
//m_WelcomeMessage = serverConfig.GetString("WelcomeMessage", "Welcome to OpenSim!");
m_AllowTeleportsToAnyRegion = serverConfig.GetBoolean("AllowTeleportsToAnyRegion", true);
m_ExternalName = serverConfig.GetString("ExternalName", string.Empty);
if (m_ExternalName != string.Empty && !m_ExternalName.EndsWith("/"))
m_ExternalName = m_ExternalName + "/";
Object[] args = new Object[] { config };
m_GridService = ServerUtils.LoadPlugin<IGridService>(gridService, args);
m_PresenceService = ServerUtils.LoadPlugin<IPresenceService>(presenceService, args);
if (accountService != string.Empty)
m_UserAccountService = ServerUtils.LoadPlugin<IUserAccountService>(accountService, args);
if (homeUsersService != string.Empty)
m_UserAgentService = ServerUtils.LoadPlugin<IUserAgentService>(homeUsersService, args);
if (gridUserService != string.Empty)
m_GridUserService = ServerUtils.LoadPlugin<IGridUserService>(gridUserService, args);
if (simService != null)
m_SimulationService = simService;
else if (simulationService != string.Empty)
m_SimulationService = ServerUtils.LoadPlugin<ISimulationService>(simulationService, args);
m_AllowedClients = serverConfig.GetString("AllowedClients", string.Empty);
m_DeniedClients = serverConfig.GetString("DeniedClients", string.Empty);
m_ForeignAgentsAllowed = serverConfig.GetBoolean("ForeignAgentsAllowed", true);
LoadDomainExceptionsFromConfig(serverConfig, "AllowExcept", m_ForeignsAllowedExceptions);
LoadDomainExceptionsFromConfig(serverConfig, "DisallowExcept", m_ForeignsDisallowedExceptions);
if (m_GridService == null || m_PresenceService == null || m_SimulationService == null)
throw new Exception("Unable to load a required plugin, Gatekeeper Service cannot function.");
m_log.Debug("[GATEKEEPER SERVICE]: Starting...");
}
}
示例10: GetService
public ISimulationService GetService()
{
if (_service == null)
{
_service = new SimulationService(null);
}
return _service;
}
示例11: 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);
}
示例12: GatekeeperService
public GatekeeperService(IConfigSource config, ISimulationService simService)
{
IConfig serverConfig = config.Configs["GatekeeperService"];
if (serverConfig == null)
throw new Exception(String.Format("No section GatekeeperService in config file"));
string accountService = serverConfig.GetString("UserAccountService", String.Empty);
string homeUsersService = serverConfig.GetString("HomeUsersSecurityService", string.Empty);
string gridService = serverConfig.GetString("GridService", String.Empty);
string presenceService = serverConfig.GetString("PresenceService", String.Empty);
string simulationService = serverConfig.GetString("SimulationService", String.Empty);
//m_AuthDll = serverConfig.GetString("AuthenticationService", String.Empty);
// These 3 are mandatory, the others aren't
if (gridService == string.Empty || presenceService == string.Empty || m_AuthDll == string.Empty)
throw new Exception("Incomplete specifications, Gatekeeper Service cannot function.");
string scope = serverConfig.GetString("ScopeID", UUID.Zero.ToString());
UUID.TryParse(scope, out m_ScopeID);
//m_WelcomeMessage = serverConfig.GetString("WelcomeMessage", "Welcome to OpenSim!");
m_AllowTeleportsToAnyRegion = serverConfig.GetBoolean("AllowTeleportsToAnyRegion", true);
m_ExternalName = serverConfig.GetString("ExternalName", string.Empty);
Object[] args = new Object[] { config };
m_GridService = ServerUtils.LoadPlugin<IGridService>(gridService, args);
m_PresenceService = ServerUtils.LoadPlugin<IPresenceService>(presenceService, args);
if (accountService != string.Empty)
m_UserAccountService = ServerUtils.LoadPlugin<IUserAccountService>(accountService, args);
if (homeUsersService != string.Empty)
m_UserAgentService = ServerUtils.LoadPlugin<IUserAgentService>(homeUsersService, args);
if (simService != null)
m_SimulationService = simService;
else if (simulationService != string.Empty)
m_SimulationService = ServerUtils.LoadPlugin<ISimulationService>(simulationService, args);
if (m_GridService == null || m_PresenceService == null || m_SimulationService == null)
throw new Exception("Unable to load a required plugin, Gatekeeper Service cannot function.");
m_log.Debug("[GATEKEEPER SERVICE]: Starting...");
}
示例13: GatekeeperServiceInConnector
public GatekeeperServiceInConnector(IConfigSource config, IHttpServer server, ISimulationService simService) :
base(config, server, String.Empty)
{
IConfig gridConfig = config.Configs["GatekeeperService"];
if (gridConfig != null)
{
string serviceDll = gridConfig.GetString("LocalServiceModule", string.Empty);
Object[] args = new Object[] { config, simService };
m_GatekeeperService = ServerUtils.LoadPlugin<IGatekeeperService>(serviceDll, args);
}
if (m_GatekeeperService == null)
throw new Exception("Gatekeeper server connector cannot proceed because of missing service");
HypergridHandlers hghandlers = new HypergridHandlers(m_GatekeeperService);
server.AddXmlRPCHandler("link_region", hghandlers.LinkRegionRequest, false);
server.AddXmlRPCHandler("get_region", hghandlers.GetRegion, false);
server.AddHTTPHandler("/foreignagent/", new GatekeeperAgentHandler(m_GatekeeperService).Handler);
}
示例14: 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");
bool authentication = serverConfig.GetBoolean("RequireAuthentication", false);
if (authentication)
m_AuthenticationService = scene.RequestModuleInterface<IAuthenticationService>();
bool foreignGuests = serverConfig.GetBoolean("AllowForeignGuests", false);
//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_SimulationService = scene.RequestModuleInterface<ISimulationService>();
//ServerUtils.LoadPlugin<ISimulationService>(simService, args);
if (m_SimulationService == null)
throw new Exception("No Local ISimulationService Module");
//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, foreignGuests));
server.AddStreamHandler(new AgentPutHandler(m_SimulationService, m_AuthenticationService));
server.AddStreamHandler(new AgentDeleteHandler(m_SimulationService, m_AuthenticationService));
//server.AddStreamHandler(new ObjectPostHandler(m_SimulationService, authentication));
//server.AddStreamHandler(new NeighborPostHandler(m_SimulationService, authentication));
}
示例15: LLLoginService
public LLLoginService(IConfigSource config, ISimulationService simService, ILibraryService libraryService)
: base(config, simService, libraryService)
{
m_log.Debug("[DIVA LLOGIN SERVICE]: Starting...");
}