feat: yamldotnet 16 support (#1574)

* feat: yamldotnet 16 support

* update yamldotnet

* fix interface

* update Vecc.YamlDotNet.Analyzers.StaticGenerator
This commit is contained in:
Ivan Josipovic
2024-08-11 13:21:59 -07:00
committed by GitHub
parent e05bc143b9
commit 36a0204643
5 changed files with 10 additions and 11 deletions

View File

@@ -10,7 +10,7 @@ namespace k8s.Models
return type == typeof(ResourceQuantity);
}
public object ReadYaml(IParser parser, Type type)
public object ReadYaml(IParser parser, Type type, ObjectDeserializer rootDeserializer)
{
if (parser?.Current is YamlDotNet.Core.Events.Scalar scalar)
{
@@ -32,8 +32,7 @@ namespace k8s.Models
throw new InvalidOperationException(parser?.Current?.ToString());
}
public void WriteYaml(IEmitter emitter, object value, Type type)
public void WriteYaml(IEmitter emitter, object value, Type type, ObjectSerializer serializer)
{
var obj = (ResourceQuantity)value;
emitter?.Emit(new YamlDotNet.Core.Events.Scalar(obj?.ToString()));