YamlBlockSequenceItemStyleAttribute Class

Overrides how nested block collections are emitted for items in block sequences written by the attributed member.

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

Remarks

Apply this attribute to a property or field whose value may contain block sequences. The override is scoped to the serialization of that member value and affects nested mappings and sequences encountered below it.

Inheritance
YamlAttribute YamlBlockSequenceItemStyleAttribute

Constructors

NameDescription
YamlBlockSequenceItemStyleAttribute()Initializes a new instance of the YamlBlockSequenceItemStyleAttribute class.
YamlBlockSequenceItemStyleAttribute(YamlSequenceItemStyle)Initializes a new instance of the YamlBlockSequenceItemStyleAttribute class with a mapping style override.

YamlBlockSequenceItemStyleAttribute overloads

YamlBlockSequenceItemStyleAttribute()

YamlBlockSequenceItemStyleAttribute.cs

Initializes a new instance of the YamlBlockSequenceItemStyleAttribute class.

public YamlBlockSequenceItemStyleAttribute()

YamlBlockSequenceItemStyleAttribute(YamlSequenceItemStyle)

YamlBlockSequenceItemStyleAttribute.cs

Initializes a new instance of the YamlBlockSequenceItemStyleAttribute class with a mapping style override.

public YamlBlockSequenceItemStyleAttribute(YamlSequenceItemStyle mappingStyle)
Parameters
mappingStyle YamlSequenceItemStyle
The style to use for mappings that are items in block sequences.
Exceptions
ArgumentOutOfRangeException
mappingStyle is not a defined YamlSequenceItemStyle.

Properties

NameDescription
MappingStyleGets or sets the style to use for mappings that are items in block sequences.
SequenceStyleGets or sets the style to use for sequences that are items in block sequences.

Gets or sets the style to use for mappings that are items in block sequences.

public YamlSequenceItemStyle MappingStyle { get; set; }

Property value

YamlSequenceItemStyle

Exceptions

ArgumentOutOfRangeException
Value is not a defined YamlSequenceItemStyle.

Gets or sets the style to use for sequences that are items in block sequences.

public YamlSequenceItemStyle SequenceStyle { get; set; }

Property value

YamlSequenceItemStyle

Exceptions

ArgumentOutOfRangeException
Value is not a defined YamlSequenceItemStyle.