mirror of
https://github.com/space-wizards/RobustToolbox.git
synced 2026-09-02 18:17:09 +02:00
* 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>
34 lines
1.2 KiB
C#
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
|
|
{
|
|
}
|
|
}
|