Vixen
02b45cc4
csharp
public sealed class DataMemberAttribute

Includes a member in its type's serialised form, optionally under a different name or at a chosen position. Only needed to override a default: a public field or read/write property of a DataContractAttribute type is already serialised.

No guide page documents this yet — the page shows what the code says about itself.

As a annotation

Valid on
Property, Field

Fields and properties (2)

  • public int Order

    Sort key for the emitted member order. Members sharing an order keep their declaration order, so the default of 0 leaves the whole type in declaration order.

  • public string? Name

    Name written to the serialised form. Defaults to the member's name; setting it lets the member be renamed in C# without touching existing data.

Methods (3)

  • public DataMemberAttribute()

    Serialises the member under its own name, in declaration order.

  • public DataMemberAttribute(int order)

    Serialises the member with an explicit sort key.

  • public DataMemberAttribute(string name)

    Serialises the member under an explicit name.

Used by (4)

  • AnnotatedVixen.Core.Tests
  • AnnotatedClassVixen.Core.Serialization.Tests
  • AnnotationTestsVixen.Core.Tests
  • ReflectedTypesVixen.Editor.Scripts