/
EvilBeaver
/
OneScript
Обзор
Документация
Войти
/
EvilBeaver
/
OneScript
Код
Запросы
0
Задачи
Вики
Пакеты
0
Релизы
0
CI/CD
Аналитика
Безопасность
develop
src/OneScript.Core/Contexts/DeprecatedNameAttribute.cs
28 строк
999 B
EvilBeaver
Начал применение DeprecatedName к перечислению
05 сен 2025, 13:50
05 сен 2025, 13:50
a52aac6
Код
Авторство
О чём код?
/*---------------------------------------------------------- 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 OneScript.Contexts { /// <summary> /// Позволяет объявить терм (имя или алиас), как устаревший. /// </summary> [AttributeUsage(AttributeTargets.Class | AttributeTargets.Method | AttributeTargets.Property | AttributeTargets.Field | AttributeTargets.Enum, AllowMultiple = true)] public class DeprecatedNameAttribute : Attribute { public DeprecatedNameAttribute(string name, bool throwOnUse = false) { Name = name; ThrowOnUse = throwOnUse; } public string Name { get; } public bool ThrowOnUse { get; } } }