You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
public class Tree
{
[CborProperty("age")]
public readonly int _age;
[CborConstructor]
public Tree(int age)
{
_age = age;
}
}
While this throws: CborException: Cannot find a field or property named age on type TestApp.Tree
public class Tree
{
[CborProperty("age")]
public readonly int _age;
[CborIgnore]
public long Age2 => 5; // 1
[CborConstructor]
public Tree(int age)
{
_age = age;
}
}
if you replace the long in the row // 1 with an int, it does work. I tried to ignore it with the [CborIgnore] approach and this one #10, but both doesn't help
The text was updated successfully, but these errors were encountered:
Really hard to say in a few words, can't really break it down to my usual tree example. Basically, I am adding a few custom types with: CborOptions.Default.Registry.ConverterRegistry.RegisterConverter(typeof(byte[]), new DsonObjectConverter<byte[]>(x => x, y => y)); (note: dson = cbor)
and then I am adding exactly what you suggested right here #10
This works:
While this throws:
CborException: Cannot find a field or property named age on type TestApp.Tree
if you replace the long in the row // 1 with an int, it does work. I tried to ignore it with the [CborIgnore] approach and this one #10, but both doesn't help
The text was updated successfully, but these errors were encountered: