# YamlQueryMatch

A node a query selected, with the path that addresses it.

Class 

`OfficeIMO.Yaml`

**Namespace**

`OfficeIMO.Yaml`

**Assembly**

`OfficeIMO.Yaml`

**Source revision**

`ba882f6b0d07` with working tree changes

**Source**

[YamlQuery.cs:26](https://github.com/EvotecIT/OfficeIMO/blob/ba882f6b0d07acddd884b5e7d3086b0cfff0a05a/OfficeIMO.Yaml/Model/YamlQuery.cs#L26)

**Modifiers**

sealed

A node a query selected, with the path that addresses it.

## Inheritance

- object
- YamlQueryMatch

## Usage

Explore 6 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 6

- Method [YamlAlias.Query](/api/yaml/officeimo-yaml-yamlalias/#method-query-string)
- Method [YamlDocument.Query](/api/yaml/officeimo-yaml-yamldocument/#method-query-string)
- Method [YamlMapping.Query](/api/yaml/officeimo-yaml-yamlmapping/#method-query-string)
- Method [YamlNode.Query](/api/yaml/officeimo-yaml-yamlnode/#method-query-string)
- Method [YamlScalar.Query](/api/yaml/officeimo-yaml-yamlscalar/#method-query-string)
- Method [YamlSequence.Query](/api/yaml/officeimo-yaml-yamlsequence/#method-query-string)

Filter members 

Show inherited

## Methods

`public override string ToString()` [#](#method-tostring)

[YamlQuery.cs:26](https://github.com/EvotecIT/OfficeIMO/blob/ba882f6b0d07acddd884b5e7d3086b0cfff0a05a/OfficeIMO.Yaml/Model/YamlQuery.cs#L26)

Returns the path and the node's start position.

Returns

`string`

## Inherited Methods

`public virtual bool Equals(object? obj)` [#](#method-equals-object)

Inherited from object

Parameters

**obj object? required**

Returns

`bool`

`public virtual int GetHashCode()` [#](#method-gethashcode)

Inherited from object

Returns

`int`

`public Type GetType()` [#](#method-gettype)

Inherited from object

Returns

`Type`

## Properties

`public YamlNode Node { get; }` [#](#property-node)

[YamlQuery.cs:17](https://github.com/EvotecIT/OfficeIMO/blob/ba882f6b0d07acddd884b5e7d3086b0cfff0a05a/OfficeIMO.Yaml/Model/YamlQuery.cs#L17)

Gets the selected node as written: a value reached through an alias is the alias's anchored node, and a mapping value written as an alias is the [YamlAlias](/api/yaml/officeimo-yaml-yamlalias/). [YamlNode.Start](/api/yaml/officeimo-yaml-yamlnode/) and [YamlNode.End](/api/yaml/officeimo-yaml-yamlnode/) give its source position.

`public string Path { get; }` [#](#property-path)

[YamlQuery.cs:23](https://github.com/EvotecIT/OfficeIMO/blob/ba882f6b0d07acddd884b5e7d3086b0cfff0a05a/OfficeIMO.Yaml/Model/YamlQuery.cs#L23)

Gets the path of the node in the grammar [YamlNode.Select](/api/yaml/officeimo-yaml-yamlnode/) reads, relative to where the query ran: Select(Path) on that node or document returns [YamlQueryMatch.Node](/api/yaml/officeimo-yaml-yamlquerymatch/). The root is $.

<!-- PowerForge markdown artifact sha256:287C2DFE5BA202B17C738E3F9B528C7392CB4251BB9C1FB913F4E9541D61CCEF -->
