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.

Ignore formats removes next node #120

@janovrom

Description

@janovrom

Imagine this code:

public class BufferView
    {
        [ZeroFormatter.IgnoreFormat] public int Width { get => TriangleCount; set => TriangleCount = value; }
        [ZeroFormatter.IgnoreFormat] public int Height { get => VertexCount; set => VertexCount = value; }
        [ZeroFormatter.Index(0)] public virtual byte Padding { get; set; } // IgnoreFormat for some reason removes the first index
        [ZeroFormatter.Index(1)] public virtual long Start { get; set; }
        [ZeroFormatter.Index(2)] public virtual long ByteLength { get; set; }
        [ZeroFormatter.Index(3)] public virtual int TriangleCount { get; set; }
        [ZeroFormatter.Index(4)] public virtual int VertexCount { get; set; }
    }

This will result in Padding not being serialized - when searching for this property in the ZFC-generated file, it's no there. If the properties with IgnoreFormatAttribute are moved to the end, even the whole next ZeroFormattable class is removed.

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