當前位置: 首頁>>代碼示例>>C#>>正文


C# DebugRunner.Run方法代碼示例

本文整理匯總了C#中ProtoScript.Runners.DebugRunner.Run方法的典型用法代碼示例。如果您正苦於以下問題:C# DebugRunner.Run方法的具體用法?C# DebugRunner.Run怎麽用?C# DebugRunner.Run使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在ProtoScript.Runners.DebugRunner的用法示例。


在下文中一共展示了DebugRunner.Run方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的C#代碼示例。

示例1: DebugRunnerRunOnly

        internal static ProtoCore.Core DebugRunnerRunOnly(string code)
        {
            ProtoCore.Core core;
            DebugRunner fsr;
            ProtoScript.Config.RunConfiguration runnerConfig;
            string testPath = @"..\..\..\Scripts\Debugger\";

            // Specify some of the requirements of IDE.
            var options = new ProtoCore.Options();
            options.ExecutionMode = ProtoCore.ExecutionMode.Serial;
            options.SuppressBuildOutput = false;

            core = new ProtoCore.Core(options);
            core.Executives.Add(ProtoCore.Language.kAssociative, new ProtoAssociative.Executive(core));
            core.Executives.Add(ProtoCore.Language.kImperative, new ProtoImperative.Executive(core));

            runnerConfig = new ProtoScript.Config.RunConfiguration();
            runnerConfig.IsParrallel = false;
            fsr = new DebugRunner(core);

            DLLFFIHandler.Register(FFILanguage.CSharp, new CSModuleHelper());
            CLRModuleType.ClearTypes();

            //Run

            fsr.PreStart(code, runnerConfig);
            DebugRunner.VMState vms = null;

            vms = fsr.Run();

            return core;
        }
開發者ID:Benglin,項目名稱:designscript,代碼行數:32,代碼來源:DebugTestFx.cs

示例2: DebugRunnerRunOnly

        internal  static ProtoCore.Core DebugRunnerRunOnly(string code, out RuntimeCore runtimeCore)
        {
            ProtoCore.Core core;
            DebugRunner fsr;

            // Specify some of the requirements of IDE.
            var options = new ProtoCore.Options();
            options.ExecutionMode = ProtoCore.ExecutionMode.Serial;
            options.SuppressBuildOutput = false;
            options.GCTempVarsOnDebug = false;

            string testPath = @"..\..\..\test\Engine\ProtoTest\ImportFiles\";
            options.IncludeDirectories.Add(testPath);

            core = new ProtoCore.Core(options);
            core.Compilers.Add(ProtoCore.Language.kAssociative, new ProtoAssociative.Compiler(core));
            core.Compilers.Add(ProtoCore.Language.kImperative, new ProtoImperative.Compiler(core));

            fsr = new DebugRunner(core);

            DLLFFIHandler.Register(FFILanguage.CSharp, new CSModuleHelper());
            CLRModuleType.ClearTypes();

            //Run

            fsr.PreStart(code);
            DebugRunner.VMState vms = null;

            vms = fsr.Run();
            runtimeCore = fsr.runtimeCore;
            return core;
        }
開發者ID:joespiff,項目名稱:Dynamo,代碼行數:32,代碼來源:DebugTestFx.cs


注:本文中的ProtoScript.Runners.DebugRunner.Run方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。