Files
RobustToolbox/Robust.Shared/Serialization/Manager/Attributes/ImplicitDataDefinitionForInheritorsAttribute.cs
T
4747e5a05a Add and update a lot of documentation (#6337)
* Serialization docs

Co-authored-by: Moony <moonheart08@users.noreply.github.com>

* ECS docs

Co-authored-by: Moony <moonheart08@users.noreply.github.com>

* scattered docs

Co-authored-by: Moony <moonheart08@users.noreply.github.com>

* Fixes

---------

Co-authored-by: Moony <moonheart08@users.noreply.github.com>
Co-authored-by: PJB3005 <pieterjan.briers+git@gmail.com>
2025-12-15 20:26:17 +01:00

34 lines
1.2 KiB
C#

using System;
namespace Robust.Shared.Serialization.Manager.Attributes
{
/// <summary>
/// Marks all classes or interfaces that inherit from the one with this attribute with
/// <see cref="DataDefinitionAttribute"/>, without requiring this be done manually.
/// Cannot be reversed by inheritors!
/// </summary>
/// <example>
/// <code>
/// [ImplicitDataDefinitionForInheritors]
/// public abstract class BaseClass
/// {
/// [DataField]
/// public bool Enabled;
/// }
/// <br/>
/// // Not only do we not need to mark this as a data definition,
/// // we inherit our fields from our parent class as normal and can add our own fields.
/// public sealed class MyClass : BaseClass
/// {
/// [DataField]
/// public int Counter;
/// }
/// </code>
/// </example>
/// <seealso cref="ImplicitDataRecordAttribute"/>
[AttributeUsage(AttributeTargets.Class | AttributeTargets.Interface)]
public sealed class ImplicitDataDefinitionForInheritorsAttribute : Attribute
{
}
}