/
smwwiki
/
OneScript_fork
Обзор
Документация
Войти
/
smwwiki
/
OneScript_fork
Код
Запросы
0
Задачи
Вики
Пакеты
0
Релизы
0
Аналитика
Безопасность
develop
src/OneScript.Core/Contexts/BslAnnotationAttribute.cs
52 строки
2 KB
EvilBeaver
Переделка в компиляцию без image (начало)
19 авг 2021, 14:09
19 авг 2021, 14:09
9e70f5b
Код
Авторство
О чём код?
/*---------------------------------------------------------- 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 OneScript.Values; namespace OneScript.Contexts { [AttributeUsage(AttributeTargets.Class | AttributeTargets.Field | AttributeTargets.Method | AttributeTargets.Parameter)] public class BslAnnotationAttribute : Attribute { public BslAnnotationAttribute(string name) { Name = name; } public BslAnnotationAttribute(string name, IEnumerable<BslAnnotationParameter> parameters) { Name = name; Parameters = parameters; } public string Name { get; } public IEnumerable<BslAnnotationParameter> Parameters { get; private set; } public void SetParameters(IEnumerable<BslAnnotationParameter> parameters) { Parameters = new List<BslAnnotationParameter>(parameters); } } public class BslAnnotationParameter { public BslAnnotationParameter(string name, BslPrimitiveValue value) { Name = name; Value = value; } public string Name { get; } public BslPrimitiveValue Value { get; } public int ConstantValueIndex { get; set; } = -1; } }