Describe the bug
When an Enum Member has the following annotation, EnumMember(Value = ""). The returned value should be "", as opposed to the Enum Member Name.
To Reproduce
Console.WriteLine("Start");
var yamlValue = new YamlDotNet.Serialization.Serializer().Serialize(EnumMemberedEnum.EmptyValue);
//yamlValue == "EmptyValue" // Should be '' as opposed to EmptyValue
var yamlObject = (new YamlDotNet.Serialization.Deserializer().Deserialize<EnumMemberedEnum>(yamlValue));
Console.WriteLine("End");
public enum EnumMemberedEnum
{
No = 0,
[System.Runtime.Serialization.EnumMember(Value = "goodbye")]
Hello = 1,
[System.Runtime.Serialization.EnumMember(Value = "")]
EmptyValue = 2,
[System.Runtime.Serialization.EnumMember()]
NullValue = 3
}
Describe the bug When an Enum Member has the following annotation, EnumMember(Value = ""). The returned value should be "", as opposed to the Enum Member Name.
To Reproduce