Scalar Class

Represents a scalar event.

public sealed class Scalar : NodeEvent
Inheritance
NodeEvent Scalar

Constructors

NameDescription
Scalar(string)Initializes a new instance of the Scalar class.
Scalar(string, ScalarStyle)Initializes a new instance of the Scalar class.
Scalar(string?, string)Initializes a new instance of the Scalar class.
Scalar(string, string, string)Initializes a new instance of the Scalar class.
Scalar(string?, string?, string, ScalarStyle, bool, bool)Initializes a new instance of the Scalar class.
Scalar(string?, string?, string, ScalarStyle, bool, bool, Mark, Mark)Initializes a new instance of the Scalar class.

Scalar overloads

Scalar(string)

Scalar.cs

Initializes a new instance of the Scalar class.

public Scalar(string value)
Parameters
value string
The value.

Scalar(string, ScalarStyle)

Scalar.cs

Initializes a new instance of the Scalar class.

public Scalar(string value, ScalarStyle style)
Parameters
value string
The value.
style ScalarStyle
The style of this scalar

Scalar(string?, string)

Scalar.cs

Initializes a new instance of the Scalar class.

public Scalar(string? tag, string value)
Parameters
tag string?
The tag.
value string
The value.

Scalar(string, string, string)

Scalar.cs

Initializes a new instance of the Scalar class.

public Scalar(string anchor, string tag, string value)
Parameters
anchor string
tag string
value string

Scalar(string?, string?, string, ScalarStyle, bool, bool)

Scalar.cs

Initializes a new instance of the Scalar class.

public Scalar(string? anchor, string? tag, string value, ScalarStyle style, bool isPlainImplicit, bool isQuotedImplicit)
Parameters
anchor string?
The anchor.
tag string?
The tag.
value string
The value.
style ScalarStyle
The style.
isPlainImplicit bool
.
isQuotedImplicit bool
.

Scalar(string?, string?, string, ScalarStyle, bool, bool, Mark, Mark)

Scalar.cs

Initializes a new instance of the Scalar class.

public Scalar(string? anchor, string? tag, string value, ScalarStyle style, bool isPlainImplicit, bool isQuotedImplicit, Mark start, Mark end)
Parameters
anchor string?
The anchor.
tag string?
The tag.
value string
The value.
style ScalarStyle
The style.
isPlainImplicit bool
.
isQuotedImplicit bool
.
start Mark
The start position of the event.
end Mark
The end position of the event.

Properties

NameDescription
IsCanonicalGets a value indicating whether this instance is canonical.
IsPlainImplicitGets a value indicating whether the tag is optional for the plain style.
IsQuotedImplicitGets a value indicating whether the tag is optional for any non-plain style.
NestingIncreaseGets a value indicating the variation of depth caused by this event. The value can be either -1, 0 or 1. For start events, it will be 1, for end events, it will be -1, and for the remaining events, it will be 0.
StyleGets the style of the scalar.
ValueGets the value.

IsCanonical

Scalar.cs

Gets a value indicating whether this instance is canonical.

public override bool IsCanonical { get; }

Property value

bool

IsPlainImplicit

Scalar.cs

Gets a value indicating whether the tag is optional for the plain style.

public bool IsPlainImplicit { get; }

Property value

bool

IsQuotedImplicit

Scalar.cs

Gets a value indicating whether the tag is optional for any non-plain style.

public bool IsQuotedImplicit { get; }

Property value

bool

NestingIncrease

Scalar.cs

Gets a value indicating the variation of depth caused by this event. The value can be either -1, 0 or 1. For start events, it will be 1, for end events, it will be -1, and for the remaining events, it will be 0.

public override int NestingIncrease { get; }

Property value

int

Gets the style of the scalar.

public ScalarStyle Style { get; }

Property value

ScalarStyle The style.

Gets the value.

public string Value { get; }

Property value

string The value.

Methods

NameDescription
ToString()Returns a String that represents the current Object.

ToString()

Scalar.cs

Returns a String that represents the current Object.

public override string ToString()

Returns

string A String that represents the current Object.