YamlIgnoreAttribute Class

Instructs the YamlSerializer when to ignore the public field or public read/write property value.

[AttributeUsage(AttributeTargets.Class | AttributeTargets.Struct | AttributeTargets.Property | AttributeTargets.Field | AttributeTargets.Interface, AllowMultiple = false)]
public sealed class YamlIgnoreAttribute : YamlAttribute

Remarks

When applied to a type, it sets the default ignore condition for all its properties and fields. When applied to a member, it overrides the type-level condition and YamlSerializerOptions.DefaultIgnoreCondition for that member.

Inheritance
YamlAttribute YamlIgnoreAttribute

Constructors

NameDescription
YamlIgnoreAttribute()

YamlIgnoreAttribute()

YamlIgnoreAttribute.cs
public YamlIgnoreAttribute()

No documentation is available.

Properties

NameDescription
ConditionGets or sets the condition that must be met before the member is ignored.

Gets or sets the condition that must be met before the member is ignored.

public YamlIgnoreCondition Condition { get; set; }

Property value

YamlIgnoreCondition

Remarks

The default value is YamlIgnoreCondition.Always.