/
EvilBeaver
/
OneScript
Обзор
Документация
Войти
/
EvilBeaver
/
OneScript
Код
Запросы
0
Задачи
Вики
Пакеты
0
Релизы
0
CI/CD
Аналитика
Безопасность
develop
src/ScriptEngine/Machine/Contexts/AutoCollectionContext.cs
39 строк
1 KB
EvilBeaver
Большой рефакторинг коллекций и исправление ошибок
16 мар 2025, 23:39
16 мар 2025, 23:39
c8ef752
Код
Авторство
О чём код?
/*---------------------------------------------------------- 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.Collections; using System.Collections.Generic; using OneScript.Contexts; using OneScript.Execution; using OneScript.Types; namespace ScriptEngine.Machine.Contexts { public abstract class AutoCollectionContext<T, TItem> : AutoContext<T>, ICollectionContext<TItem> where T : AutoContext<T> where TItem : IValue { protected AutoCollectionContext() { } protected AutoCollectionContext(TypeDescriptor type) : base(type) { } public abstract int Count(); public int Count(IBslProcess process) => Count(); public abstract IEnumerator<TItem> GetEnumerator(); IEnumerator IEnumerable.GetEnumerator() { return GetEnumerator(); } } }