本文整理汇总了C#中ProtoScript.Runners.DebugRunner.LoadAndPreStart方法的典型用法代码示例。如果您正苦于以下问题:C# DebugRunner.LoadAndPreStart方法的具体用法?C# DebugRunner.LoadAndPreStart怎么用?C# DebugRunner.LoadAndPreStart使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ProtoScript.Runners.DebugRunner
的用法示例。
在下文中一共展示了DebugRunner.LoadAndPreStart方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: SetupDebugRunner
private bool SetupDebugRunner(string scriptPath)
{
if (string.IsNullOrEmpty(scriptPath))
return false; // No script to execute.
if (File.Exists(scriptPath) == false)
return false; // File does not exist.
Logger.LogInfo("SetupDebugRunner", "Init");
System.Diagnostics.Stopwatch sw = new System.Diagnostics.Stopwatch();
sw.Start();
SetupCommonRunner(true);
RunConfiguration runnerConfig = new RunConfiguration();
runnerConfig.IsParrallel = false;
#if DEBUG
var verboseFlag = this.core.Options.Verbose;
var prevAsmOutput = this.core.AsmOutput;
this.core.Options.Verbose = true;
this.ByteCodeStream = new MemoryStream();
this.core.AsmOutput = new StreamWriter(this.ByteCodeStream);
#endif
debugRunner = new DebugRunner(this.core);
bool startSucceeded = debugRunner.LoadAndPreStart(scriptPath, runnerConfig);
#if DEBUG
this.core.Options.Verbose = verboseFlag;
this.core.AsmOutput.Close();
this.core.AsmOutput = prevAsmOutput == null ? Console.Out : prevAsmOutput;
#endif
Logger.LogPerf("SetupDebugRunner", sw.ElapsedMilliseconds + " ms");
return startSucceeded;
}