FailsafeSchema Class
Implements the YAML failsafe schema.
public class FailsafeSchema : SchemaBaseRemarks
The failsafe schema is guaranteed to work with any YAML document. It is therefore the recommended schema for generic YAML tools. A YAML processor should therefore support this schema, at least as an option.
- Inheritance
SchemaBaseFailsafeSchema
Constructors
| Name | Description |
|---|---|
| FailsafeSchema() | Initializes a new instance of the FailsafeSchema class. |
FailsafeSchema()
FailsafeSchema.csInitializes a new instance of the FailsafeSchema class.
public FailsafeSchema()Properties
| Name | Description |
|---|---|
| AllowFailsafeString | Gets or sets a value indicating whether this schema should always fallback to a failsafe string in case of not matching any scalar rules. Default is true for FailsafeSchema |
AllowFailsafeString
FailsafeSchema.csGets or sets a value indicating whether this schema should always fallback to a failsafe string in case of not matching any scalar rules. Default is true for FailsafeSchema
protected bool AllowFailsafeString { get; set; }Property value
bool true if [allow failsafe string]; otherwise, false.
Methods
| Name | Description |
|---|---|
| GetDefaultTag(MappingStart) | Gets the default tag for mapping nodes. |
| GetDefaultTag(SequenceStart) | Gets the default tag for sequence nodes. |
| TryParse(Scalar, bool, string?, object?) | Tries to parse. |
GetDefaultTag overloads
GetDefaultTag(MappingStart)
FailsafeSchema.csGets the default tag for mapping nodes.
protected override string GetDefaultTag(MappingStart nodeEvent)GetDefaultTag(SequenceStart)
FailsafeSchema.csGets the default tag for sequence nodes.
protected override string GetDefaultTag(SequenceStart nodeEvent)TryParse(Scalar, bool, string?, object?)
FailsafeSchema.csConstants
| Name | Description |
|---|---|
| MapLongTag | The map long tag: tag:yaml.org,2002:map |
| MapShortTag | The map short tag: !!map. |
| SeqLongTag | The seq long tag: tag:yaml.org,2002:seq |
| SeqShortTag | The seq short tag: !!seq |
MapLongTag
The map long tag: tag:yaml.org,2002:map
public const string MapLongTag = "tag:yaml.org,2002:map"MapShortTag
The map short tag: !!map.
public const string MapShortTag = "!!map"SeqLongTag
The seq long tag: tag:yaml.org,2002:seq
public const string SeqLongTag = "tag:yaml.org,2002:seq"SeqShortTag
The seq short tag: !!seq
public const string SeqShortTag = "!!seq"