/
smwwiki
/
OneScript_fork
Обзор
Документация
Войти
/
smwwiki
/
OneScript_fork
Код
Запросы
0
Задачи
Вики
Пакеты
0
Релизы
0
Аналитика
Безопасность
develop
src/TestApp/EditedFileSource.cs
33 строки
764 B
EvilBeaver
Merge remote-tracking branch 'remotes/origin/release/v1.8.1' into feature/compiler-v2
24 сен 2022, 19:04
24 сен 2022, 19:04
ec40cab
Код
Авторство
О чём код?
/*---------------------------------------------------------- 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.IO; using OneScript.Sources; namespace TestApp { internal class EditedFileSource : ICodeSource { private readonly string _code; private readonly string _path = ""; public EditedFileSource(string code, string path) { if (path != "") _path = Path.GetFullPath(path); _code = code; } public string GetSourceCode() { return _code; } public string Location => _path != "" ? _path : "<string>"; } }