TomlSingleOrArrayAttribute Class

Definition

Assembly Tomlyn.dll
Inherits ObjectAttributeTomlAttribute
Show inherited members (42)

Allows a collection member to be deserialized from either a single TOML value or a TOML array.

[AttributeUsage(AttributeTargets.Property | AttributeTargets.Field, AllowMultiple = false)]
public sealed class TomlSingleOrArrayAttribute : TomlAttribute

Remarks

When the TOML input contains a single value instead of an array, Tomlyn treats it as a collection containing exactly one element. For mutable read-only collection members, values are appended to the existing collection.