Skip to content
This repository was archived by the owner on May 16, 2022. It is now read-only.
This repository was archived by the owner on May 16, 2022. It is now read-only.

Abstract properties are not Serialized and Deserialized and serialization got stuck in other case if remove IgnoreIndex attribute from abstract class #74

@Waqas-Zamir

Description

@Waqas-Zamir

Below is the sample abstract and concrete class.

[ZeroFormattable]
public abstract class BaseAggregate
{
    public abstract string AggregateId { get; set; }
}

[ZeroFormattable]
public class AccountAggregate : BaseAggregate
{
    // ZeroFormatter requires virtual keyword with each property to be serialized
    // But a member marked as override cannot have virtual keyword
   [Index(0)]
   public override string AggregateId { get; set; }
}

The ZeroFormatter.ZeroFormatterSerializer.Serialize<AccountAggregate>(accountAggregateObject) got stuck.

And if I put IgnoreIndex attribute on AggregateId property in base class. The serialize and deserialize works but the deserialized object doesn't contain value in the AggregateId property.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions