public ScriptEngine() { FilterTypeNames = new HashSet<string>(); EnumTypeNames = new HashSet<string>(); m_Engine = new JScriptEngine(WindowsScriptEngineFlags.EnableDebugging) {AllowReflection = true}; m_Engine.AddHostType("Debug", typeof (Debug)); AddEnumTypes(Assembly.GetAssembly(typeof (IRenderScript))); var asm = Assembly.GetExecutingAssembly(); AddRenderScriptTypes(asm); AddEnumTypes(asm); }
private void ExposeTypesToEngine(Microsoft.ClearScript.ScriptEngine engine) { var typeCollection = new HostTypeCollection( typeof(com.espertech.esper.client.EPAdministrator).Assembly); engine.AddHostObject("esper", typeCollection); engine.AddHostType("Object", typeof(Object)); engine.AddHostType("typeHelper", typeof(com.espertech.esper.util.TypeHelper)); engine.AddHostType("Collections", typeof(com.espertech.esper.compat.collections.Collections)); engine.AddHostType("EventBean", typeof(com.espertech.esper.client.EventBean)); engine.AddHostType("EventBean", typeof(com.espertech.esper.client.EventBean)); engine.AddHostType("EPAdministrator", typeof(com.espertech.esper.client.EPAdministrator)); engine.AddHostType("EPRuntime", typeof(com.espertech.esper.client.EPRuntime)); }
public ScriptEngine() { FilterTypeNames = new HashSet<string>(); EnumTypeNames = new HashSet<string>(); m_Engine = new JScriptEngine(WindowsScriptEngineFlags.EnableDebugging) {AllowReflection = true}; m_Engine.AddHostType("Debug", typeof (Debug)); AddEnumTypes(Assembly.GetAssembly(typeof (IRenderScript))); foreach (var asm in (Extension.RenderScripts.Select(s => s.GetType().Assembly) .Concat(new[] {typeof (RenderChain.RenderChain).Assembly})).Distinct()) { AddRenderScriptTypes(asm); AddEnumTypes(asm); } }
public ScriptEngine() { FilterTypeNames = new HashSet <string>(); EnumTypeNames = new HashSet <string>(); m_Engine = new JScriptEngine(WindowsScriptEngineFlags.EnableDebugging) { AllowReflection = true }; m_Engine.AddHostType("Debug", typeof(Debug)); AddEnumTypes(Assembly.GetAssembly(typeof(IRenderScript))); var asm = Assembly.GetExecutingAssembly(); AddRenderScriptTypes(asm); AddEnumTypes(asm); }
protected ScriptEngine() { FilterTypeNames = new HashSet <string>(); EnumTypeNames = new HashSet <string>(); Engine = new JScriptEngine { AllowReflection = true }; Engine.AddHostType("Debug", typeof(Debug)); AddEnumTypes(Assembly.GetAssembly(typeof(IScript))); foreach (var asm in Extension.Scripts.Select(s => s.GetType().Assembly) .Concat(new[] { typeof(TChain).Assembly }).Distinct()) { AddScriptTypes(asm); AddEnumTypes(asm); } }
public override bool TryInvoke(ScriptEngine engine, BindingFlags invokeFlags, object[] args, object[] bindArgs, out object result) { result = target.InvokeMethod(name, args); return(true); }
private static HostItem Create(ScriptEngine engine, HostTarget target, HostItemFlags flags) { return(new HostItem(engine, target, flags)); }
// ReSharper disable MemberCanBeProtected.Local public ExpandoHostItem(ScriptEngine engine, HostTarget target, HostItemFlags flags) : base(engine, target, flags) { }
public DispatchExHostItem(ScriptEngine engine, HostTarget target, HostItemFlags flags) : base(engine, target, flags) { EnsurePatched(); }
private static HostItem Create(ScriptEngine engine, HostTarget target, HostItemFlags flags) { return(TargetSupportsExpandoMembers(target, flags) ? new DispatchExHostItem(engine, target, flags) : new HostItem(engine, target, flags)); }