当前位置: 首页>>代码示例>>C#>>正文


C# ISimulationService.GetInnerService方法代码示例

本文整理汇总了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);
        }
开发者ID:mugginsm,项目名称:Aurora-Sim,代码行数:25,代码来源:SimulationServiceInConnector.cs

示例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));
        }
开发者ID:AlexRa,项目名称:opensim-mods-Alex,代码行数:28,代码来源:SimulationServiceInConnector.cs

示例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;
        }
开发者ID:kow,项目名称:Aurora-Sim,代码行数:31,代码来源:SimulationServiceInConnector.cs

示例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);
        }
开发者ID:BogusCurry,项目名称:arribasim-dev,代码行数:16,代码来源:SimulationServiceInConnector.cs


注:本文中的ISimulationService.GetInnerService方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。