/
EvilBeaver
/
OneScript
Обзор
Документация
Войти
/
EvilBeaver
/
OneScript
Код
Запросы
0
Задачи
Вики
Пакеты
0
Релизы
0
CI/CD
Аналитика
Безопасность
develop
src/Tests/OneScript.Core.Tests/HelperClasses/EngineWrapper.cs
88 строк
2 KB
EvilBeaver
Тесты C# перенесены в папку Tests
27 фев 2023, 12:45
27 фев 2023, 12:45
8663e73
Код
Авторство
О чём код?
/*---------------------------------------------------------- This Source Code Form is subject to the terms of the Mozilla Public License, v.2.0. If a copy of the MPL was not distributed with this file, You can obtain one at http://mozilla.org/MPL/2.0/. ----------------------------------------------------------*/ // // using System; // using System.Collections.Generic; // using System.Linq; // using System.Text; // using OneScript.StandardLibrary; // using ScriptEngine; // using ScriptEngine.Environment; // // namespace NUnitTests // { // internal class EngineWrapper : IHostApplication // { // private string[] commandLineArgs; // // public HostedScriptEngine Engine { get; private set; } // // public HostedScriptEngine StartEngine() // { // Engine = new HostedScriptEngine(); // Engine.Initialize(); // // commandLineArgs = new string[] // { // }; // // return Engine; // } // // public int RunTestString(string source) // { // var process = Engine.CreateProcess(this, Engine.Loader.FromString(source)); // return process.Start(); // } // // private int RunTestScript(ICodeSource source, string resourceName) // { // var module = Engine.GetCompilerService().Compile(source); // // Engine.LoadUserScript(new UserAddedScript // { // Type = UserAddedScriptType.Class, // Image = module, // Symbol = resourceName // }); // // var process = Engine.CreateProcess(this, source); // return process.Start(); // } // // internal int RunTestScriptFromPath(string scriptFilePath, string argsScript = "") // { // if (argsScript != "") // commandLineArgs = argsScript.Split(' '); // // var sourceToCompile = Engine.Loader.FromFile(scriptFilePath); // // return RunTestScript(sourceToCompile, scriptFilePath); // } // // public string[] GetCommandLineArguments() // { // return commandLineArgs; // } // // public bool InputString(out string result, int maxLen) // { // result = ""; // return false; // } // // public void ShowExceptionInfo(Exception exc) // { // throw exc; // } // // public void Echo(string str, MessageStatusEnum status = MessageStatusEnum.Ordinary) // { // Console.WriteLine(str); // } // } // }