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>
30 lines
886 B
C#
30 lines
886 B
C#
using System;
|
|
using JetBrains.Annotations;
|
|
|
|
namespace Robust.Shared.Serialization.Manager.Attributes;
|
|
|
|
/// <summary>
|
|
/// Marks this type as being data-serializable and automatically marks all properties as data fields.
|
|
/// </summary>
|
|
/// <include file='Docs.xml' path='entries/entry[@name="MeansDataDefinitionHaver"]/*'/>
|
|
/// <example>
|
|
/// <code>
|
|
/// [DataRecord]
|
|
/// public sealed record MyRecord(int Foo, bool Bar);
|
|
/// </code>
|
|
/// which has the serialized yaml equivalent of:
|
|
/// <code>
|
|
/// foo: 0
|
|
/// bar: false
|
|
/// </code>
|
|
/// </example>
|
|
/// <seealso cref="DataDefinitionAttribute"/>
|
|
/// <seealso cref="DataFieldAttribute"/>
|
|
[AttributeUsage(AttributeTargets.Class | AttributeTargets.Struct, Inherited = false)]
|
|
[MeansDataDefinition]
|
|
[MeansDataRecord]
|
|
[MeansImplicitUse]
|
|
public sealed class DataRecordAttribute : Attribute
|
|
{
|
|
}
|