How to have the `INamingConvention` passed into a custom value converter?

41 views Asked by At

I wrote a custom value converter for YamlDotNet. I initialize it like this:

var ser = new SerializerBuilder().WithNamingConvention(UnderscoredNamingConvention.Instance).WithTypeConverter(MyTypeConverter.Instance).Build();

How to get the naming convention into the MyTypeConverter without having to explicitly pass it e.g. via a constructor parameter?

0

There are 0 answers