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


C# IScene.RequestModuleInterface方法代码示例

本文整理汇总了C#中IScene.RequestModuleInterface方法的典型用法代码示例。如果您正苦于以下问题:C# IScene.RequestModuleInterface方法的具体用法?C# IScene.RequestModuleInterface怎么用?C# IScene.RequestModuleInterface使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在IScene的用法示例。


在下文中一共展示了IScene.RequestModuleInterface方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: LLLoginServiceInConnector

        public LLLoginServiceInConnector(IConfigSource config, IHttpServer server, IScene scene) :
                base(config, server, String.Empty)
        {
            m_log.Debug("[LLLOGIN IN CONNECTOR]: Starting...");
            string loginService = ReadLocalServiceFromConfig(config);

            ISimulationService simService = scene.RequestModuleInterface<ISimulationService>();
            ILibraryService libService = scene.RequestModuleInterface<ILibraryService>();

            Object[] args = new Object[] { config, simService, libService };
            m_LoginService = ServerUtils.LoadPlugin<ILoginService>(loginService, args);

            InitializeHandlers(server);
        }
开发者ID:JeffCost,项目名称:opensim,代码行数:14,代码来源:LLLoginServiceInConnector.cs

示例2: Initialise

        bool m_renderMeshes = true;     // true if to render meshes rather than just bounding boxes

        #region IMapTileTerrainRenderer Members

        public void Initialise (IScene scene, IConfigSource config)
        {
            m_scene = scene;
            m_imgDecoder = m_scene.RequestModuleInterface<IJ2KDecoder> ();
            m_config = config;
            m_assetCacheDir = m_config.Configs ["AssetCache"].GetString ("CacheDirectory", m_assetCacheDir);
            if (m_assetCacheDir == "") {
                var defpath = scene.RequestModuleInterface<ISimulationBase> ().DefaultDataPath;
                m_assetCacheDir = System.IO.Path.Combine (defpath, Constants.DEFAULT_ASSETCACHE_DIR);
            }

            List<string> renderers = RenderingLoader.ListRenderers (Util.ExecutingDirectory ());
            if (renderers.Count > 0) {
                m_primMesher = RenderingLoader.LoadRenderer (renderers [0]);
                MainConsole.Instance.Debug ("[WarpTile generator]: Loaded prim mesher " + m_primMesher);
            } else {
                MainConsole.Instance.Info ("[WarpTile generator]: No prim mesher loaded, prim rendering will be disabled");
            }

            var mapConfig = m_config.Configs ["MapModule"];
            if (mapConfig != null) {
                m_texturePrimSize = mapConfig.GetFloat ("TexturePrimSize", m_texturePrimSize);
                m_renderMeshes = mapConfig.GetBoolean ("RenderMeshes", m_renderMeshes);
            }


            ReadCacheMap ();
        }
开发者ID:EnricoNirvana,项目名称:WhiteCore-Dev,代码行数:32,代码来源:WarpTileRenderer.cs

示例3: Initialise

 public void Initialise(IScene scene, IConfigSource config)
 {
     m_scene = scene;
     m_imgDecoder = m_scene.RequestModuleInterface<IJ2KDecoder>();
     m_config = config;
     ReadCacheMap();
 }
开发者ID:velus,项目名称:Async-Sim-Testing,代码行数:7,代码来源:WarpTileRenderer.cs

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

示例5: RemoveRegion

 public void RemoveRegion(IScene scene)
 {
     ISyncMessagePosterService syncMessage = scene.RequestModuleInterface<ISyncMessagePosterService>();
     if (syncMessage != null)
         syncMessage.PostToServer(SyncMessageHelper.LogoutRegionAgents(scene.RegionInfo.RegionHandle));
     scene.EventManager.OnNewClient -= OnNewClient;
     scene.EventManager.OnClosingClient -= OnClosingClient;
     m_scenes.Remove(scene);
 }
开发者ID:samiam123,项目名称:Aurora-Sim,代码行数:9,代码来源:ActivityDetector.cs

示例6: AddRegion

        public void AddRegion (IScene scene)
        {
            if (m_storeDirectory == "") {
                var simBase = scene.RequestModuleInterface<ISimulationBase> ();
                m_storeDirectory = Path.Combine (simBase.DefaultDataPath, "Region");
            }

            m_scene = scene;
            scene.RegisterModuleInterface<IRestartModule> (this);
        }
开发者ID:EnricoNirvana,项目名称:WhiteCore-Dev,代码行数:10,代码来源:RestartModule.cs

示例7: AddRegion

 public void AddRegion(IScene scene)
 {
     if (m_enabled)
     {
         scene.EventManager.OnRegisterCaps +=
             (agentID, server) => OnRegisterCaps(scene, agentID, server);
     }
     m_scene = scene;
     ISyncMessageRecievedService syncRecievedService =
         m_scene.RequestModuleInterface<ISyncMessageRecievedService>();
     if (syncRecievedService != null)
         syncRecievedService.OnMessageReceived += syncRecievedService_OnMessageReceived;
 }
开发者ID:emperorstarfinder,项目名称:My-Aurora-Sim,代码行数:13,代码来源:GenericVoiceModule.cs

示例8: 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

示例9: AddRegion

        public void AddRegion (IScene scene)
        {
            if (!m_Enabled)
                return;

            // set the savestate location if not configured
            if (m_savestate_oar_directory == "") {
                var simBase = scene.RequestModuleInterface<ISimulationBase> ();
                m_savestate_oar_directory = Path.Combine (simBase.DefaultDataPath, "Region/SaveStates/");
            }

            scene.EventManager.OnNewClient += OnNewClient;
            scene.EventManager.OnClosingClient += OnClosingClient;
        }
开发者ID:Virtual-Universe,项目名称:Virtual-Universe,代码行数:14,代码来源:GodMode.cs

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

示例11: AddRegion

        public void AddRegion(IScene scene)
        {
            if (!m_Enabled)
                return;

            m_Scenelist.Add(scene);

            scene.RegisterModuleInterface(this);

            scene.EventManager.OnNewClient += OnNewClient;
            scene.EventManager.OnClosingClient += OnClosingClient;
            scene.EventManager.OnIncomingInstantMessage += OnGridInstantMessage;

            moneyService =  scene.RequestModuleInterface<IMoneyModule>();

        }
开发者ID:Virtual-Universe,项目名称:Virtual-Universe,代码行数:16,代码来源:InventoryTransferModule.cs

示例12: LandObject

        public LandObject(UUID owner_id, bool is_group_owned, IScene scene)
        {
            m_scene = scene;

            LandData.Maturity = m_scene.RegionInfo.RegionSettings.Maturity;
            LandData.OwnerID = owner_id;
            LandData.GroupID = is_group_owned ? owner_id : UUID.Zero;
            LandData.IsGroupOwned = is_group_owned;

            LandData.RegionID = scene.RegionInfo.RegionID;
            LandData.ScopeID = scene.RegionInfo.ScopeID;
            LandData.RegionHandle = scene.RegionInfo.RegionHandle;

            m_parcelManagementModule = scene.RequestModuleInterface<IParcelManagementModule>();

            //We don't set up the InfoID here... it will just be overwriten
        }
开发者ID:NanaYngvarrdottir,项目名称:WhiteCore-Dev,代码行数:17,代码来源:LandObject.cs

示例13: RegionLoaded

        public void RegionLoaded (IScene scene)
        {
            if (!m_enabled)
                return;

            if (m_TransferModule == null) {
                m_TransferModule = scene.RequestModuleInterface<IMessageTransferModule> ();

                if (m_TransferModule == null) {
                    MainConsole.Instance.Error ("[Instant message]: No message transfer module, IM will not work!");
                    scene.EventManager.OnNewClient -= EventManager_OnNewClient;
                    scene.EventManager.OnClosingClient -= EventManager_OnClosingClient;
                    scene.EventManager.OnIncomingInstantMessage -= OnGridInstantMessage;

                    m_Scene = null;
                    m_enabled = false;
                }
            }
        }
开发者ID:WhiteCoreSim,项目名称:WhiteCore-Dev,代码行数:19,代码来源:InstantMessageModule.cs

示例14: Close

        public void Close(IScene scene)
        {
            //Deregister the interface
            scene.UnregisterModuleInterface<IGridRegisterModule>(this);
            m_scenes.Remove(scene);

            MainConsole.Instance.InfoFormat("[RegisterRegionWithGrid]: Deregistering region {0} from the grid...",
                             scene.RegionInfo.RegionName);

            //Deregister from the grid server
            IGridService GridService = scene.RequestModuleInterface<IGridService>();
            GridRegion r = BuildGridRegion(scene.RegionInfo);
            r.IsOnline = false;
            string error = "";
            if(scene.RegionInfo.HasBeenDeleted)
                GridService.DeregisterRegion(r);
            else if ((error = GridService.UpdateMap(r)) != "")
                MainConsole.Instance.WarnFormat("[RegisterRegionWithGrid]: Deregister from grid failed for region {0}, {1}",
                                 scene.RegionInfo.RegionName, error);
        }
开发者ID:andsim,项目名称:Aurora-Sim,代码行数:20,代码来源:RegisterRegionWithGrid.cs

示例15: RegionLoaded

        public void RegionLoaded (IScene scene)
        {
            if (!m_enabled)
                return;

            if (m_TransferModule == null) {
                OfflineMessagesConnector = Framework.Utilities.DataManager.RequestPlugin<IOfflineMessagesConnector> ();
                m_TransferModule = scene.RequestModuleInterface<IMessageTransferModule> ();
                if (m_TransferModule == null || OfflineMessagesConnector == null) {
                    scene.EventManager.OnNewClient -= OnNewClient;
                    scene.EventManager.OnClosingClient -= OnClosingClient;

                    m_enabled = false;
                    m_Scene = null;

                    MainConsole.Instance.Error (
                        "[OFFLINE MESSAGING] No message transfer module or OfflineMessagesConnector is enabled. Disabling offline messages");
                    return;
                }
                m_TransferModule.OnUndeliveredMessage += UndeliveredMessage;
            }
        }
开发者ID:EnricoNirvana,项目名称:WhiteCore-Dev,代码行数:22,代码来源:OfflineMessagesModule.cs


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