using System; using JetBrains.Annotations; namespace Robust.Shared.Serialization.Manager.Attributes; /// /// Marks a field or property as being serializable/deserializable, including all of the fields from its type into /// the current data definition. Does not create a named field of its own, and should be used sparingly for /// conciseness and readability only. /// /// /// This should never be used in a way where the included/collapsed fields conflict in name with other fields! /// /// /// /// otherField: 42 /// myField: /// subfield1: foo /// subfield2: bar /// /// becomes /// /// otherField: 42 /// subfield1: foo /// subfield2: bar /// /// [AttributeUsage(AttributeTargets.Field | AttributeTargets.Property)] [MeansImplicitAssignment] [MeansImplicitUse(ImplicitUseKindFlags.Assign)] public sealed class IncludeDataFieldAttribute : DataFieldBaseAttribute { /// See . /// See . /// See . /// See . public IncludeDataFieldAttribute( bool readOnly = false, int priority = 1, bool serverOnly = false, Type? customTypeSerializer = null ) : base(readOnly, priority, serverOnly, customTypeSerializer) { } public override string ToString() { return "[INCLUDE]"; } }