本文整理汇总了C#中Solution.ActivateScript方法的典型用法代码示例。如果您正苦于以下问题:C# Solution.ActivateScript方法的具体用法?C# Solution.ActivateScript怎么用?C# Solution.ActivateScript使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Solution
的用法示例。
在下文中一共展示了Solution.ActivateScript方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: Setup
public void Setup()
{
string fileContent =
"// I told the doctor I broke my leg in two places.\n" +
"// He told me to stop going to those places.\n" +
"// - Henny Youngman\n" +
"\n" +
"[Imperative]\n" +
"{\n" +
"\t aVar = 2;\n" +
"\t nVar = -4.5678; // Assign value of -4.5678\n" +
"\t bVar = aVar;\n" +
"\t sVar = (32.7654 + 5) + bVar;\n" +
"\n" +
"\t // An associative block.\n" +
"\t [Associative]\n" +
"\t {\n" +
"\t \tsVar = 3;\n" +
"\t }\n" +
"}\n";
testSolution = Solution.CreateTemporary();
testSolution.AddNewScript(fileContent);
testSolution.ActivateScript(0);
textCore = TextEditorCore.CreateTemporary();
textCore.ChangeScript(0);
textCore.ParseScriptImmediate();
}
示例2: Setup
public void Setup()
{
string fileContent =
"hello\n" +
"\n" +
"\t\tcruel\n" +
"\tworld";
testSolution = Solution.CreateTemporary();
testSolution.AddNewScript(fileContent);
testSolution.ActivateScript(0);
textCore = TextEditorCore.CreateTemporary();
textCore.ChangeScript(0);
}