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
'MessagePack.IngoreMemberAttribute' is not Inherited(after overriding property) in 2.5.140.
But it is Inherited(after overriding property) in1.9.11.
Repro steps
class Program
{
static void Main(string[] args)
{
Class2 class2 = new Class2();
//in 1.9.11 success.
//in 2.5.140 MessagePackDynamicObjectResolverException is thrown:
//all public members must mark KeyAttribute or IgnoreMemberAttribute.
//type:MessagePack2._5.Class2 member:Value
byte[] buffer = MessagePack.MessagePackSerializer.Serialize(class2);
class2 = MessagePack.MessagePackSerializer.Deserialize<Class2>(buffer);
}
}
[MessagePack.MessagePackObject]
public abstract class Class1
{
[MessagePack.IgnoreMember]
public virtual int Value { get; set; }
}
//For the convenience of display, other members that need to be serialized are hidden,
//which is definitely not the case in reality
[MessagePack.MessagePackObject]
public class Class2 : Class1
{
public override int Value { get; set; }
}
Expected behavior
'MessagePack.IngoreMemberAttribute' is Inherited(after overriding property).
Because the following: [AttributeUsage(AttributeTargets.Property | AttributeTargets.Field, AllowMultiple = false, Inherited = true)]
AArnott
changed the title
'MessagePack.IngoreMemberAttribute' is not Inherited(after overriding property) in 2.5.140.
'MessagePack.IgnoreMemberAttribute' is not Inherited(after overriding property) in 2.5.140.
Dec 30, 2023
Sponsorship may be an effective way to lead a contributor of this repo to prioritize addressing this issue. As a free and open source library, all or the majority of its development is done without any monetary benefit to its authors, and all of it is made available free of charge. But sponsorship is very much appreciated and, with agreement from a particular contributor and/or the owning team, can be a great way to support the project and help get your favorite features or bugs addressed in an upcoming version.
If sponsorship to drive completion of a feature or bug fix is an interesting option to you, please let us know. You can reach out to me privately on keybase.io or gitter.im as well.
Bug description
'MessagePack.IngoreMemberAttribute' is not Inherited(after overriding property) in 2.5.140.
But it is Inherited(after overriding property) in1.9.11.
Repro steps
Expected behavior
'MessagePack.IngoreMemberAttribute' is Inherited(after overriding property).
Because the following:
[AttributeUsage(AttributeTargets.Property | AttributeTargets.Field, AllowMultiple = false, Inherited = true)]
Actual behavior
As Bug description.
Additional context
Migrating from MessagePack v1.x to MessagePack v2.x.
The text was updated successfully, but these errors were encountered: