상속: System.Attribute
예제 #1
0
파일: Driver.cs 프로젝트: ife/IronLanguages
 public TestHost(OptionsAttribute /*!*/ options)
 {
     _options = options;
     _pal     = options.Pal != null ? (PlatformAdaptationLayer)Activator.CreateInstance(options.Pal) :
                Driver.IsWin8 ? new Win8PAL() :
                PlatformAdaptationLayer.Default;
 }
예제 #2
0
파일: Driver.cs 프로젝트: ife/IronLanguages
        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));
        }
예제 #3
0
파일: Driver.cs 프로젝트: madpilot/ironruby
 public TestHost(OptionsAttribute/*!*/ options) {
     _options = options;
     _pal = options.Pal != null ?
         (PlatformAdaptationLayer)Activator.CreateInstance(options.Pal) :
         PlatformAdaptationLayer.Default;
 }
예제 #4
0
파일: Driver.cs 프로젝트: TerabyteX/main
        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);
        }