public PCVMActor(Scene scene, IConfigSource source, OtpNode node, OtpActorMbox mbox) : base(mbox) { m_scene = scene; m_source = source; m_node = node; m_mbox = mbox; m_dict = new PCDict(); m_vm = new PCVM(m_scene, m_source, m_dict); }
private void CommandLoad(Object[] args) { string path = (string)args[0]; bool debug = (bool)args[1]; Assembly assembly; Type applicationType; IPCApplication application; try { assembly = Assembly.LoadFrom(path); applicationType = null; foreach (Type pluginType in assembly.GetTypes()) { if (pluginType.IsPublic) { Type typeInterface = pluginType.GetInterface("IPCApplication", true); if (typeInterface != null) { applicationType = pluginType; break; } } } if (applicationType != null) { application = (IPCApplication)Activator.CreateInstance(applicationType); using (PCVM vm = new PCVM(m_scene, m_source, new PCDict())) { try { Tools.Parser parser = PCVM.MakeParser(); application.Initialize(m_scene, m_source, parser, vm); application.Run(debug); } catch { } } } } finally { } }