Beispiel #1
0
        public void InitializeMRM(MRMBase mmb, uint localID, UUID itemID)
        {
            m_log.Info("[MRM] Created MRM Instance");

            IWorld m_world = new World(m_scene);
            IHost  m_host  = new Host(new SOPObject(m_scene, localID), m_scene, new ExtensionHandler(m_extensions),
                                      m_microthreads);

            mmb.InitMiniModule(m_world, m_host, itemID);
        }
Beispiel #2
0
        public void InitializeMRM(MRMBase mmb, uint localID, UUID itemID)
        {
            m_log.Info("[MRM] Created MRM Instance");

            IWorld world;
            IHost  host;

            GetGlobalEnvironment(localID, out world, out host);

            mmb.InitMiniModule(world, host, itemID);
        }
Beispiel #3
0
 /// <summary>
 /// Start the script in the same application domain as opensim.
 /// </summary>
 /// <returns>True if the script was started successfully.</returns>
 private bool StartLocal()
 {
     try {
         m_mrm = (MRMBase)Activator.CreateInstanceFrom(m_assembly, m_class).Unwrap();
         m_mrm.InitMiniModule(m_world, m_host, ID);
         m_mrm.Start(m_args);
         return true;
     } catch (Exception e) {
         m_world.Shutdown();
         ErrorString = "Unable to start MRM." + e.Message + "\n" + e.StackTrace;
         while (e.InnerException != null) {
             e = e.InnerException;
             ErrorString += "\n\nInner Exception: " + e.Message + "\n" + e.StackTrace;
         }
         return false;
     }
 }
Beispiel #4
0
        public string Start(string assembly, string clazz, IHost host, IWorld world, UUID id, string name, Unloader unloader, string[] args)
        {
            m_scheduler = new MicroScheduler();
            _unloader = unloader;
            AppDomain.CurrentDomain.UnhandledException += (sender, exceptionArgs) => Kill(exceptionArgs.ExceptionObject as Exception);

            try {
                m_id = id;
                m_name = name;
                m_mrm = (MRMBase)Activator.CreateInstanceFrom(assembly, clazz).Unwrap();
                m_world = new SandboxedWorld(world);
                m_host = new SandboxedHost(host, m_world.Objects, m_scheduler);
                m_mrm.InitMiniModule(m_world, m_host, id);
                m_mrm.Start(args);
            } catch (Exception e) {
                return FullError(e);
            }
            return null;
        }