public void VBScriptEngine_AddRestrictedHostObject_BaseClass() { var host = new ExtendedHostFunctions() as HostFunctions; engine.AddRestrictedHostObject("host", host); Assert.IsInstanceOfType(engine.Evaluate("host.newObj()"), typeof(PropertyBag)); TestUtil.AssertException <ScriptEngineException>(() => engine.Evaluate("host.type(\"System.Int32\")")); }
public void TestInitialize() { engine = new V8ScriptEngine(V8ScriptEngineFlags.EnableDebugging); engine.AddHostObject("host", host = new ExtendedHostFunctions()); }
public void VBScriptEngine_AddRestrictedHostObject_BaseClass() { var host = new ExtendedHostFunctions() as HostFunctions; engine.AddRestrictedHostObject("host", host); Assert.IsInstanceOfType(engine.Evaluate("host.newObj()"), typeof(PropertyBag)); TestUtil.AssertException<ScriptEngineException>(() => engine.Evaluate("host.type(\"System.Int32\")")); }
public void TestInitialize() { engine = new JScriptEngine(WindowsScriptEngineFlags.EnableDebugging); engine.DisableCaseInsensitivePropertyLookups = true; engine.AddHostObject("host", host = new ExtendedHostFunctions()); }