mirror of
https://github.com/space-wizards/RobustToolbox.git
synced 2026-02-14 19:29:36 +01:00
This allows us to make it obsolete to *inherit* from a class, and only that. Intended so people stop inheriting UI controls for no good reason. Fixes #5856
17 lines
475 B
C#
17 lines
475 B
C#
using System;
|
|
|
|
namespace Robust.Shared.Analyzers;
|
|
|
|
/// <summary>
|
|
/// Specify that this class is allowed to be inherited.
|
|
/// </summary>
|
|
/// <remarks>
|
|
/// Robust uses analyzers to prevent accidental usage of non-sealed classes:
|
|
/// a class must be either marked [Virtual], abstract, or sealed.
|
|
/// </remarks>
|
|
/// <seealso cref="ObsoleteInheritanceAttribute"/>
|
|
[AttributeUsage(AttributeTargets.Class, Inherited = false)]
|
|
public sealed class VirtualAttribute : Attribute
|
|
{
|
|
}
|