SerializerSettings.DefaultStyle not working
yariker opened this issue · comments
Yaroslav Bugaria commented
The SerializerSettings.DefaultStyle
property seems to have no effect. The following code still produces a block syntax (SharpYaml v1.6.5.0):
var serializer = new Serializer(new SerializerSettings { DefaultStyle = YamlStyle.Flow });
var text = serializer.Serialize(new { List = new List<int> { 1, 2, 3 }, Name = "Hello", Value = "World!" });
Console.WriteLine(text);
// Outputs:
// List:
// - 1
// - 2
// - 3
// Name: Hello
// Value: World!
Any idea why?