wip: Serialization 4

This commit is contained in:
Syntriax 2024-02-10 20:03:02 +03:00
parent 4c04e3d02f
commit 4faac1b5ca
1 changed files with 16 additions and 16 deletions

View File

@ -7,26 +7,26 @@ public class YamlSerializer : ISerializer
{
private readonly YamlDotNet.Serialization.ISerializer serializer = new SerializerBuilder()
.WithNamingConvention(CamelCaseNamingConvention.Instance)
// .WithTypeConverter(new BehaviourYamlConverter())
// .WithTypeConverter(new BehaviourControllerYamlConverter())
// .WithTypeConverter(new BehaviourDTOListConverter())
// .WithTypeConverter(new GameManagerYamlConverter())
// .WithTypeConverter(new GameObjectYamlConverter())
// .WithTypeConverter(new GameObjectDTOListConverter())
// .WithTypeConverter(new StateEnableYamlConverter())
// .WithTypeConverter(new TransformYamlConverter())
.WithTypeConverter(new BehaviourYamlConverter())
.WithTypeConverter(new BehaviourControllerYamlConverter())
.WithTypeConverter(new BehaviourDTOListConverter())
.WithTypeConverter(new GameManagerYamlConverter())
.WithTypeConverter(new GameObjectYamlConverter())
.WithTypeConverter(new GameObjectDTOListConverter())
.WithTypeConverter(new StateEnableYamlConverter())
.WithTypeConverter(new TransformYamlConverter())
.WithTypeConverter(new Vector2DYamlConverter())
.Build();
private readonly YamlDotNet.Serialization.IDeserializer deserializer = new DeserializerBuilder()
.WithNamingConvention(UnderscoredNamingConvention.Instance)
// .WithTypeConverter(new BehaviourYamlConverter())
// .WithTypeConverter(new BehaviourControllerYamlConverter())
// .WithTypeConverter(new BehaviourDTOListConverter())
// .WithTypeConverter(new GameManagerYamlConverter())
// .WithTypeConverter(new GameObjectYamlConverter())
// .WithTypeConverter(new GameObjectDTOListConverter())
// .WithTypeConverter(new StateEnableYamlConverter())
// .WithTypeConverter(new TransformYamlConverter())
.WithTypeConverter(new BehaviourYamlConverter())
.WithTypeConverter(new BehaviourControllerYamlConverter())
.WithTypeConverter(new BehaviourDTOListConverter())
.WithTypeConverter(new GameManagerYamlConverter())
.WithTypeConverter(new GameObjectYamlConverter())
.WithTypeConverter(new GameObjectDTOListConverter())
.WithTypeConverter(new StateEnableYamlConverter())
.WithTypeConverter(new TransformYamlConverter())
.WithTypeConverter(new Vector2DYamlConverter())
.Build();