# YamlFormatOptions

Layout settings for YamlFormatter.

Class 

`OfficeIMO.Yaml`

**Namespace**

`OfficeIMO.Yaml`

**Assembly**

`OfficeIMO.Yaml`

**Source revision**

`ba882f6b0d07` with working tree changes

**Source**

[YamlFormatOptions.cs:68](https://github.com/EvotecIT/OfficeIMO/blob/ba882f6b0d07acddd884b5e7d3086b0cfff0a05a/OfficeIMO.Yaml/Lint/YamlFormatOptions.cs#L68)

**Modifiers**

sealed

Layout settings for [YamlFormatter](/api/yaml/officeimo-yaml-yamlformatter/). Every setting left at its default follows the document's own conventions, so formatting with default options only removes inconsistencies.

## Inheritance

- object
- YamlFormatOptions

## Usage

Explore 1 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.

### Accepted by parameters 1

- Method [YamlFormatter.Format](/api/yaml/officeimo-yaml-yamlformatter/#method-format-string-officeimo-yaml-yamlformatoptions-officeimo-yaml-yamlloadoptions) parameter `options`

Filter members 

Show inherited

## Constructors

`public YamlFormatOptions()` [#](#constructor-ctor)

[YamlFormatOptions.cs:68](https://github.com/EvotecIT/OfficeIMO/blob/ba882f6b0d07acddd884b5e7d3086b0cfff0a05a/OfficeIMO.Yaml/Lint/YamlFormatOptions.cs#L68)

## 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`

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

Inherited from object

Returns

`string?`

## Properties

`public int? IndentWidth { get; set; }` [#](#property-indentwidth)

[YamlFormatOptions.cs:45](https://github.com/EvotecIT/OfficeIMO/blob/ba882f6b0d07acddd884b5e7d3086b0cfff0a05a/OfficeIMO.Yaml/Lint/YamlFormatOptions.cs#L45)

Gets or sets how far nested mapping keys are indented from their parent key, or null (the default) for the width the document uses. 1 to 9.

`public YamlSequenceIndentation SequenceIndentation { get; set; }` [#](#property-sequenceindentation)

[YamlFormatOptions.cs:53](https://github.com/EvotecIT/OfficeIMO/blob/ba882f6b0d07acddd884b5e7d3086b0cfff0a05a/OfficeIMO.Yaml/Lint/YamlFormatOptions.cs#L53)

Gets or sets how sequences under a key are indented. Defaults to [YamlSequenceIndentation.Preserve](/api/yaml/officeimo-yaml-yamlsequenceindentation/).

`public YamlQuoteStyle Quotes { get; set; }` [#](#property-quotes)

[YamlFormatOptions.cs:59](https://github.com/EvotecIT/OfficeIMO/blob/ba882f6b0d07acddd884b5e7d3086b0cfff0a05a/OfficeIMO.Yaml/Lint/YamlFormatOptions.cs#L59)

Gets or sets the quotes of quoted strings. Defaults to [YamlQuoteStyle.Preserve](/api/yaml/officeimo-yaml-yamlquotestyle/). Plain scalars stay plain, and strings that would read as another type stay quoted.

`public YamlLineEnding LineEnding { get; set; }` [#](#property-lineending)

[YamlFormatOptions.cs:62](https://github.com/EvotecIT/OfficeIMO/blob/ba882f6b0d07acddd884b5e7d3086b0cfff0a05a/OfficeIMO.Yaml/Lint/YamlFormatOptions.cs#L62)

Gets or sets the line break. Defaults to [YamlLineEnding.Preserve](/api/yaml/officeimo-yaml-yamllineending/).

`public bool FinalNewline { get; set; }` [#](#property-finalnewline)

[YamlFormatOptions.cs:68](https://github.com/EvotecIT/OfficeIMO/blob/ba882f6b0d07acddd884b5e7d3086b0cfff0a05a/OfficeIMO.Yaml/Lint/YamlFormatOptions.cs#L68)

Gets or sets whether the text ends with a line break. Defaults to true. With false the final break is left out unless a block scalar at the end needs it for its value.

<!-- PowerForge markdown artifact sha256:67FD0326077B315CD0B3D1DB6B83A6F4A1DFA0185C25DA5FD56D2CC415DC4D8F -->
