Files
RobustToolbox/Robust.Serialization.Generator/DataField.cs
T
34ce2ba534 serv5 (#6496)
* Add source generator for DataDefinition validation

* Add source generator for reading

* Add source generator for writing

* Include prototypes and other meansdatadefinition types

* Target ISerializationGenerated in data definitions

* Murder

* Use array, struct, enum methods

* Source generate get field definitions

* serv5

* Fix and pray

* Fix release compile

* Tayrtahn review

* a

* Generator bugfix

---------

Co-authored-by: metalgearsloth <comedian_vs_clown@hotmail.com>
2026-07-08 22:18:35 +10:00

27 lines
606 B
C#

using Microsoft.CodeAnalysis;
using Robust.Roslyn.Shared.Helpers;
namespace Robust.Serialization.Generator;
public sealed record DataField(
ISymbol Symbol,
ITypeSymbol Type,
DataFieldAttribute Attribute,
(INamedTypeSymbol Serializer, CustomSerializerType Type)? CustomSerializer
);
[Flags]
public enum CustomSerializerType
{
None = 0,
Copier = 1 << 0,
CopyCreator = 1 << 1,
MappingValidator = 1 << 2,
SequenceValidator = 1 << 3,
ValueValidator = 1 << 4,
MappingReader = 1 << 5,
SequenceReader = 1 << 6,
ValueReader = 1 << 7,
Writer = 1 << 8,
}