public TestHost(OptionsAttribute /*!*/ options) { _options = options; _pal = options.Pal != null ? (PlatformAdaptationLayer)Activator.CreateInstance(options.Pal) : Driver.IsWin8 ? new Win8PAL() : PlatformAdaptationLayer.Default; }
public ScriptEngine CreateRubyEngine(bool privateBinding = false, OptionsAttribute options = null) { var runtimeSetup = ScriptRuntimeSetup.ReadConfiguration(); var languageSetup = runtimeSetup.AddRubySetup(); runtimeSetup.DebugMode = IsDebug; runtimeSetup.PrivateBinding = privateBinding; runtimeSetup.HostType = typeof(TestHost); runtimeSetup.HostArguments = new object[] { options ?? new OptionsAttribute() }; languageSetup.Options["ApplicationBase"] = BaseDirectory; languageSetup.Options["NoAdaptiveCompilation"] = NoAdaptiveCompilation; languageSetup.Options["CompilationThreshold"] = CompilationThreshold; languageSetup.Options["Verbosity"] = 2; var runtime = Ruby.CreateRuntime(runtimeSetup); return(Ruby.GetEngine(runtime)); }
public TestHost(OptionsAttribute/*!*/ options) { _options = options; _pal = options.Pal != null ? (PlatformAdaptationLayer)Activator.CreateInstance(options.Pal) : PlatformAdaptationLayer.Default; }
public ScriptEngine CreateRubyEngine(bool privateBinding = false, OptionsAttribute options = null) { var runtimeSetup = ScriptRuntimeSetup.ReadConfiguration(); var languageSetup = runtimeSetup.AddRubySetup(); runtimeSetup.DebugMode = IsDebug; runtimeSetup.PrivateBinding = privateBinding; runtimeSetup.HostType = typeof(TestHost); runtimeSetup.HostArguments = new object[] { options ?? new OptionsAttribute() }; languageSetup.Options["ApplicationBase"] = BaseDirectory; languageSetup.Options["NoAdaptiveCompilation"] = NoAdaptiveCompilation; languageSetup.Options["CompilationThreshold"] = CompilationThreshold; languageSetup.Options["Verbosity"] = 2; var runtime = Ruby.CreateRuntime(runtimeSetup); return Ruby.GetEngine(runtime); }