mirror of
https://github.com/space-wizards/RobustToolbox.git
synced 2026-09-02 18:17:09 +02:00
* 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>
16 lines
350 B
C#
16 lines
350 B
C#
using System;
|
|
|
|
namespace Robust.Shared.Serialization.Manager.Definition;
|
|
|
|
public static class DataDefinitionUtility
|
|
{
|
|
public static string AutoGenerateTag(string name)
|
|
{
|
|
if (name == "ID")
|
|
return "id";
|
|
|
|
var span = name.AsSpan();
|
|
return $"{char.ToLowerInvariant(span[0])}{span.Slice(1).ToString()}";
|
|
}
|
|
}
|