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


C# Scene.StackModuleInterface方法代码示例

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


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

示例1: AddRegion

        public void AddRegion(Scene scene)
        {
            if (!m_enableWindlight)
                return;

            m_scene = scene;
            m_scene.RegisterModuleInterface<IWindLightSettingsModule>(this);
            m_scene.StackModuleInterface<IAuroraBackupModule>(this);
            IRegionInfoConnector RegionInfoConnector = Aurora.DataManager.DataManager.RequestPlugin<IRegionInfoConnector>();
            if (RegionInfoConnector != null)
                m_WindlightSettings = RegionInfoConnector.LoadRegionWindlightSettings(m_scene.RegionInfo.RegionID);

            scene.EventManager.OnClientClosed += EventManager_OnClientClosed;
            scene.EventManager.OnRegisterCaps += OnRegisterCaps;
            scene.EventManager.OnMakeRootAgent += OnMakeRootAgent;
            scene.EventManager.OnSignificantClientMovement += OnSignificantClientMovement;
            scene.EventManager.OnAvatarEnteringNewParcel += AvatarEnteringNewParcel;
        }
开发者ID:RevolutionSmythe,项目名称:Aurora-Sim,代码行数:18,代码来源:WindLightSettingsModule.cs

示例2: InternalSceneBackup

 public InternalSceneBackup(Scene scene)
 {
     m_scene = scene;
     m_scene.StackModuleInterface<IAuroraBackupModule>(this);
     m_scene.RegisterModuleInterface<IBackupModule>(this);
     m_scene.EventManager.OnFrame += UpdateStorageBackup;
 }
开发者ID:x8ball,项目名称:Aurora-Sim,代码行数:7,代码来源:Backup.cs

示例3: AddRegion

        public void AddRegion(Scene scene)
        {
            if (m_ScriptConfig == null)
                return;
            m_ScriptFailCount = 0;
            m_ScriptErrorMessage = String.Empty;

            if (m_ScriptConfig == null)
            {
//                m_log.ErrorFormat("[XEngine] No script configuration found. Scripts disabled");
                return;
            }

            m_Enabled = m_ScriptConfig.GetBoolean("Enabled", true);

            if (!m_Enabled)
                return;

            AppDomain.CurrentDomain.AssemblyResolve +=
                OnAssemblyResolve;

            m_Scene = scene;
            m_log.InfoFormat("[XEngine]: Initializing scripts in region {0}", m_Scene.RegionInfo.RegionName);

            m_MinThreads = m_ScriptConfig.GetInt("MinThreads", 2);
            m_MaxThreads = m_ScriptConfig.GetInt("MaxThreads", 100);
            m_IdleTimeout = m_ScriptConfig.GetInt("IdleTimeout", 60);
            string priority = m_ScriptConfig.GetString("Priority", "BelowNormal");
            m_StartDelay = m_ScriptConfig.GetInt("StartDelay", 15000);
            m_MaxScriptQueue = m_ScriptConfig.GetInt("MaxScriptEventQueue",300);
            m_StackSize = m_ScriptConfig.GetInt("ThreadStackSize", 262144);
            m_SleepTime = m_ScriptConfig.GetInt("MaintenanceInterval", 10) * 1000;
            m_AppDomainLoading = m_ScriptConfig.GetBoolean("AppDomainLoading", true);

            m_EventLimit = m_ScriptConfig.GetInt("EventLimit", 30);
            m_KillTimedOutScripts = m_ScriptConfig.GetBoolean("KillTimedOutScripts", false);
            m_SaveTime = m_ScriptConfig.GetInt("SaveInterval", 120) * 1000;
            m_ScriptEnginesPath = m_ScriptConfig.GetString("ScriptEnginesPath", "ScriptEngines");

            m_Prio = ThreadPriority.BelowNormal;
            switch (priority)
            {
                case "Lowest":
                    m_Prio = ThreadPriority.Lowest;
                    break;
                case "BelowNormal":
                    m_Prio = ThreadPriority.BelowNormal;
                    break;
                case "Normal":
                    m_Prio = ThreadPriority.Normal;
                    break;
                case "AboveNormal":
                    m_Prio = ThreadPriority.AboveNormal;
                    break;
                case "Highest":
                    m_Prio = ThreadPriority.Highest;
                    break;
                default:
                    m_log.ErrorFormat("[XEngine] Invalid thread priority: '{0}'. Assuming BelowNormal", priority);
                    break;
            }

            lock (m_ScriptEngines)
            {
                m_ScriptEngines.Add(this);
            }

            // Needs to be here so we can queue the scripts that need starting
            //
            m_Scene.EventManager.OnRezScript += OnRezScript;

            // Complete basic setup of the thread pool
            //
            SetupEngine(m_MinThreads, m_MaxThreads, m_IdleTimeout, m_Prio,
                        m_MaxScriptQueue, m_StackSize);

            m_Scene.StackModuleInterface<IScriptModule>(this);

            m_XmlRpcRouter = m_Scene.RequestModuleInterface<IXmlRpcRouter>();
            if (m_XmlRpcRouter != null)
            {
                OnScriptRemoved += m_XmlRpcRouter.ScriptRemoved;
                OnObjectRemoved += m_XmlRpcRouter.ObjectRemoved;
            }

            MainConsole.Instance.Commands.AddCommand(
                "Scripts", false, "xengine status", "xengine status", "Show status information",
                "Show status information on the script engine.",
                HandleShowStatus);

            MainConsole.Instance.Commands.AddCommand(
                "Scripts", false, "scripts show", "scripts show [<script-item-uuid>]", "Show script information",
                "Show information on all scripts known to the script engine."
                    + "If a <script-item-uuid> is given then only information on that script will be shown.",
                HandleShowScripts);

            MainConsole.Instance.Commands.AddCommand(
                "Scripts", false, "show scripts", "show scripts [<script-item-uuid>]", "Show script information",
                "Synonym for scripts show command", HandleShowScripts);

//.........这里部分代码省略.........
开发者ID:p07r0457,项目名称:opensim,代码行数:101,代码来源:XEngine.cs

示例4: AddRegion

        public void AddRegion(Scene scene)
        {
            if (m_ScriptConfig == null)
                return;
            m_ScriptFailCount = 0;
            m_ScriptErrorMessage = String.Empty;

            if (m_ScriptConfig == null)
            {
//                m_log.ErrorFormat("[XEngine] No script configuration found. Scripts disabled");
                return;
            }

            m_Enabled = m_ScriptConfig.GetBoolean("Enabled", true);

            if (!m_Enabled)
                return;

            AppDomain.CurrentDomain.AssemblyResolve +=
                OnAssemblyResolve;

            m_log.InfoFormat("[XEngine] Initializing scripts in region {0}",
                             scene.RegionInfo.RegionName);
            m_Scene = scene;

            m_MinThreads = m_ScriptConfig.GetInt("MinThreads", 2);
            m_MaxThreads = m_ScriptConfig.GetInt("MaxThreads", 100);
            m_IdleTimeout = m_ScriptConfig.GetInt("IdleTimeout", 60);
            string priority = m_ScriptConfig.GetString("Priority", "BelowNormal");
            m_MaxScriptQueue = m_ScriptConfig.GetInt("MaxScriptEventQueue",300);
            m_StackSize = m_ScriptConfig.GetInt("ThreadStackSize", 262144);
            m_SleepTime = m_ScriptConfig.GetInt("MaintenanceInterval", 10) * 1000;

            m_EventLimit = m_ScriptConfig.GetInt("EventLimit", 30);
            m_KillTimedOutScripts = m_ScriptConfig.GetBoolean("KillTimedOutScripts", false);
            m_SaveTime = m_ScriptConfig.GetInt("SaveInterval", 120) * 1000;

            m_Prio = ThreadPriority.BelowNormal;
            switch (priority)
            {
                case "Lowest":
                    m_Prio = ThreadPriority.Lowest;
                    break;
                case "BelowNormal":
                    m_Prio = ThreadPriority.BelowNormal;
                    break;
                case "Normal":
                    m_Prio = ThreadPriority.Normal;
                    break;
                case "AboveNormal":
                    m_Prio = ThreadPriority.AboveNormal;
                    break;
                case "Highest":
                    m_Prio = ThreadPriority.Highest;
                    break;
                default:
                    m_log.ErrorFormat("[XEngine] Invalid thread priority: '{0}'. Assuming BelowNormal", priority);
                    break;
            }

            lock (m_ScriptEngines)
            {
                m_ScriptEngines.Add(this);
            }

            // Needs to be here so we can queue the scripts that need starting
            //
            m_Scene.EventManager.OnRezScript += OnRezScript;

            // Complete basic setup of the thread pool
            //
            SetupEngine(m_MinThreads, m_MaxThreads, m_IdleTimeout, m_Prio,
                        m_MaxScriptQueue, m_StackSize);

            m_Scene.StackModuleInterface<IScriptModule>(this);

            m_XmlRpcRouter = m_Scene.RequestModuleInterface<IXmlRpcRouter>();
            if (m_XmlRpcRouter != null)
            {
                OnScriptRemoved += m_XmlRpcRouter.ScriptRemoved;
                OnObjectRemoved += m_XmlRpcRouter.ObjectRemoved;
            }
        }
开发者ID:intari,项目名称:OpenSimMirror,代码行数:83,代码来源:XEngine.cs

示例5: AddRegion

        public void AddRegion(Scene scene)
        {
            if (!m_enabled)
                return;

            //Register the console commands
            if (FirstStartup)
            {
                scene.AddCommand(this, "ADNE", "ADNE", "Subcommands for Aurora DotNet Engine", AuroraDotNetConsoleCommands);
                scene.AddCommand(this, "help ADNE", "help ADNE", "Brings up the help for ADNE", AuroraDotNetConsoleHelp);

                //Fire this once to make sure that the APIs are found later...
                GetAPIs();

                // Create all objects we'll be using
                ScriptProtection = new ScriptProtectionModule(Config);

                EventManager = new EventManager(this);

                Compiler = new Compiler(this);

                AppDomainManager = new AppDomainManager(this);

                ScriptErrorReporter = new ScriptErrorReporter(Config);

                AssemblyResolver = new AssemblyResolver(ScriptEnginesPath);
            }
            
            FirstStartup = false;

        	m_Scenes.Add(scene);

            scene.StackModuleInterface<IScriptModule>(this);
        }
开发者ID:NickyPerian,项目名称:Aurora,代码行数:34,代码来源:ScriptEngine.cs

示例6: Initialise

 public void Initialise(Scene scene, IConfigSource source, ISimulationBase openSimBase)
 {
     scene.StackModuleInterface<IAuroraBackupModule>(this);
 }
开发者ID:rknop,项目名称:Aurora-Sim,代码行数:4,代码来源:EstateInitializer.cs

示例7: AddRegion

        public void AddRegion(Scene Sceneworld)
        {
            m_log.Info("[" + ScriptEngineName + "]: ScriptEngine initializing");

            m_Scene = Sceneworld;

            // Make sure we have config
            if (ConfigSource.Configs[ScriptEngineName] == null)
                ConfigSource.AddConfig(ScriptEngineName);

            ScriptConfigSource = ConfigSource.Configs[ScriptEngineName];

            m_enabled = ScriptConfigSource.GetBoolean("Enabled", true);
            if (!m_enabled)
                return;

            // Create all objects we'll be using
            m_EventQueueManager = new EventQueueManager(this);
            m_EventManager = new EventManager(this, true);

            // We need to start it
            m_ScriptManager = new ScriptManager(this);
            m_ScriptManager.Setup();
            m_AppDomainManager = new AppDomainManager(this);
            if (m_MaintenanceThread == null)
                m_MaintenanceThread = new MaintenanceThread();

            m_log.Info("[" + ScriptEngineName + "]: Reading configuration "+
                    "from config section \"" + ScriptEngineName + "\"");

            ReadConfig();

            m_Scene.StackModuleInterface<IScriptModule>(this);
        }
开发者ID:Ideia-Boa,项目名称:diva-distribution,代码行数:34,代码来源:ScriptEngine.cs

示例8: AddRegion

        public void AddRegion(Scene scene)
        {
            if (ConfigSource.Configs[ScriptEngineName] == null)
                ConfigSource.AddConfig(ScriptEngineName);

            _scriptConfigSource = ConfigSource.Configs[ScriptEngineName];

            _enabled = _scriptConfigSource.GetBoolean("Enabled", true);
            
            if (!_enabled) return;

            IWorldComm comms = scene.RequestModuleInterface<IWorldComm>();
            if (comms == null)
            {
                _log.Error("[Phlox]: Script engine can not start, no worldcomm module found");
                return;
            }

            comms.SetWorkArrivedDelegate(this.WorkArrived);

            _scene = scene;
            
            _exeScheduler = new ExecutionScheduler(this.WorkArrived, this, comms);
            _stateManager = new StateManager(_exeScheduler);
            _exeScheduler.StateManager = _stateManager;

            _scriptLoader = new ScriptLoader(scene.CommsManager.AssetCache, _exeScheduler, this.WorkArrived, this);
            _scriptLoader.StateManager = _stateManager;

            _masterScheduler = new MasterScheduler(_exeScheduler, _scriptLoader, _stateManager);
            _stateManager.MMasterScheduler = _masterScheduler;
            _eventRouter = new EventRouter(this);

            _scene.EventManager.OnRezScript += new EventManager.NewRezScript(EventManager_OnRezScript);
            _scene.EventManager.OnRemoveScript += new EventManager.RemoveScript(EventManager_OnRemoveScript);
            _scene.EventManager.OnReloadScript += new EventManager.ReloadScript(EventManager_OnReloadScript);
            _scene.EventManager.OnScriptReset += new EventManager.ScriptResetDelegate(EventManager_OnScriptReset);
            _scene.EventManager.OnGetScriptRunning += new EventManager.GetScriptRunning(EventManager_OnGetScriptRunning);
            _scene.EventManager.OnStartScript += new EventManager.StartScript(EventManager_OnStartScript);
            _scene.EventManager.OnStopScript += new EventManager.StopScript(EventManager_OnStopScript);
            _scene.EventManager.OnCompileScript += new EventManager.CompileScript(EventManager_OnCompileScript);
            _scene.EventManager.OnGroupCrossedToNewParcel += new EventManager.GroupCrossedToNewParcelDelegate(EventManager_OnGroupCrossedToNewParcel);
            _scene.EventManager.OnSOGOwnerGroupChanged += new EventManager.SOGOwnerGroupChangedDelegate(EventManager_OnSOGOwnerGroupChanged);
            _scene.EventManager.OnCrossedAvatarReady += OnCrossedAvatarReady;
            _scene.EventManager.OnGroupBeginInTransit += EventManager_OnGroupBeginInTransit;
            _scene.EventManager.OnGroupEndInTransit += EventManager_OnGroupEndInTransit;

            _masterScheduler.Start();

            _scene.StackModuleInterface<IScriptModule>(this);

            Phlox.Util.Preloader.Preload();
        }
开发者ID:digitalmystic,项目名称:halcyon,代码行数:53,代码来源:EngineInterface.cs

示例9: InternalSceneBackup

            public InternalSceneBackup (Scene scene)
            {
                m_scene = scene;
                m_scene.StackModuleInterface<IAuroraBackupModule> (this);
                m_scene.RegisterModuleInterface<IBackupModule> (this);

                if (MainConsole.Instance != null)
                {
                    MainConsole.Instance.Commands.AddCommand ("delete object owner",
                    "delete object owner <UUID>",
                    "Delete object by owner", HandleDeleteObject);
                    MainConsole.Instance.Commands.AddCommand ("delete object creator",
                        "delete object creator <UUID>",
                        "Delete object by creator", HandleDeleteObject);
                    MainConsole.Instance.Commands.AddCommand ("delete object uuid",
                        "delete object uuid <UUID>",
                        "Delete object by uuid", HandleDeleteObject);
                    MainConsole.Instance.Commands.AddCommand ("delete object name",
                        "delete object name <name>",
                        "Delete object by name", HandleDeleteObject);
                }
            }
开发者ID:rknop,项目名称:Aurora-Sim,代码行数:22,代码来源:Backup.cs

示例10: AddRegion

        public void AddRegion(Scene scene)
        {
            m_scene = scene;

            m_scene.StackModuleInterface<IScriptModule>(this);
        }
开发者ID:szielins,项目名称:opensim,代码行数:6,代码来源:MockScriptEngine.cs


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