/
EvilBeaver
/
OneScript
Обзор
Документация
Войти
/
EvilBeaver
/
OneScript
Код
Запросы
0
Задачи
Вики
Пакеты
0
Релизы
0
CI/CD
Аналитика
Безопасность
develop
src/ScriptEngine/Machine/CodeStat/CodeStatEntry.cs
46 строк
2 KB
Sergey Batanov
Fix #645: Исправлена статистика в Выполнить.
25 мар 2018, 13:10
Не верифицирован
25 мар 2018, 13:10
ad71de9
Код
Авторство
О чём код?
/*---------------------------------------------------------- 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; namespace ScriptEngine.Machine { public struct CodeStatEntry { public readonly string ScriptFileName; public readonly string SubName; public readonly int LineNumber; public CodeStatEntry(string ScriptFileName, string SubName, int LineNumber) { this.ScriptFileName = ScriptFileName; this.SubName = SubName; this.LineNumber = LineNumber; } public override int GetHashCode() { return ScriptFileName.GetHashCode() + SubName.GetHashCode() + LineNumber; } public override bool Equals(object obj) { if (obj is CodeStatEntry) { var other = (CodeStatEntry)obj; return ScriptFileName.Equals(other.ScriptFileName, StringComparison.Ordinal) && SubName.Equals(other.SubName, StringComparison.Ordinal) && (LineNumber == other.LineNumber); } return false; } public override string ToString() { return $"{{{ScriptFileName}}}:{LineNumber}"; } } }