YamlPosition
OfficeIMO.Yaml
A location in the decoded YAML text. Offsets count UTF-16 code units from the start of the text; a byte-order mark consumed while decoding a stream is not part of the text. Lines and columns are one-based, and columns count UTF-16 code units from the start of the line.
Inheritance
- ValueType
- YamlPosition
Usage
Explore 19 API references to this type
This type appears in these public API surfaces even when no hand-authored example is attached directly to the page.
Returned or exposed by 14
- Property YamlAlias.End
- Property YamlAlias.Start
- Property YamlException.Position
- Property YamlLimitExceededException.Position
- Property YamlMapping.End
- Property YamlMapping.Start
- Property YamlNode.End
- Property YamlNode.Start
- Property YamlReader.End
- Property YamlReader.Start
- Property YamlScalar.End
- Property YamlScalar.Start
- Property YamlSequence.End
- Property YamlSequence.Start
Accepted by parameters 5
- Method YamlPosition.Equals
- Method YamlPosition.op_Equality
- Method YamlPosition.op_Equality
- Method YamlPosition.op_Inequality
- Method YamlPosition.op_Inequality
Constructors
public YamlPosition(long offset, int line, int column) #Creates a position from its zero-based offset and one-based line and column.
Parameters
- offset long
- line int
- column int
Methods
public bool Equals(YamlPosition other) #Indicates whether the current object is equal to another object of the same type.
Parameters
- other OfficeIMO.Yaml.YamlPosition
- An object to compare with this object.
Returns
bool true if the current object is equal to the other parameter; otherwise, false.public override bool Equals(object? obj) #Indicates whether this instance and a specified object are equal.
Parameters
- obj object?
- The object to compare with the current instance.
Returns
bool true if obj and this instance are the same type and represent the same value; otherwise, false.public override int GetHashCode() #Returns the hash code for this instance.
Returns
int A 32-bit signed integer that is the hash code for this instance.public static bool op_Equality(YamlPosition left, YamlPosition right) #Compares two positions for equality.
Parameters
- left OfficeIMO.Yaml.YamlPosition
- right OfficeIMO.Yaml.YamlPosition
Returns
boolpublic static bool op_Inequality(YamlPosition left, YamlPosition right) #Compares two positions for inequality.
Parameters
- left OfficeIMO.Yaml.YamlPosition
- right OfficeIMO.Yaml.YamlPosition
Returns
boolpublic override string ToString() #Formats the position as line:column for diagnostics.
Returns
string