Gutenberg

Class LayoutOptions

Options for laying out a Document<T>.

Inheritance
Implements
Inherited Members
Declaration
public record LayoutOptions : IEquatable<LayoutOptions>

Constructors

LayoutOptions(LayoutOptions)

Options for laying out a Document<T>.

Declaration
protected LayoutOptions(LayoutOptions original)
Parameters
Type Name Description

LayoutOptions

original

LayoutOptions(PageWidthOptions?, LayoutMode, int, bool)

Options for laying out a Document<T>.

Declaration
public LayoutOptions(PageWidthOptions? PageWidth, LayoutMode LayoutMode, int DefaultNesting, bool StripTrailingWhitespace)
Parameters
Type Name Description

PageWidthOptions

PageWidth

The configured page width. Null for unlimited page width

LayoutMode

LayoutMode

The layout mode

int

DefaultNesting

The default indentation level for calls to Nested()

bool

StripTrailingWhitespace

Whether to strip whitespace from the end of each line

Properties

Default

The default LayoutOptions.

Declaration
public static LayoutOptions Default { get; }
Property Value
Type Description

LayoutOptions

DefaultNesting

The default indentation level for calls to Nested()

Declaration
public int DefaultNesting { get; init; }
Property Value
Type Description

int

EqualityContract

Options for laying out a Document<T>.

Declaration
protected virtual Type EqualityContract { get; }
Property Value
Type Description

Type

LayoutMode

The layout mode

Declaration
public LayoutMode LayoutMode { get; init; }
Property Value
Type Description

LayoutMode

PageWidth

The configured page width. Null for unlimited page width

Declaration
public PageWidthOptions? PageWidth { get; init; }
Property Value
Type Description

PageWidthOptions

StripTrailingWhitespace

Whether to strip whitespace from the end of each line

Declaration
public bool StripTrailingWhitespace { get; init; }
Property Value
Type Description

bool

Methods

Deconstruct(out PageWidthOptions?, out LayoutMode, out int, out bool)

Options for laying out a Document<T>.

Declaration
public void Deconstruct(out PageWidthOptions? PageWidth, out LayoutMode LayoutMode, out int DefaultNesting, out bool StripTrailingWhitespace)
Parameters
Type Name Description

PageWidthOptions

PageWidth

LayoutMode

LayoutMode

int

DefaultNesting

bool

StripTrailingWhitespace

Equals(LayoutOptions?)

Options for laying out a Document<T>.

Declaration
public virtual bool Equals(LayoutOptions? other)
Parameters
Type Name Description

LayoutOptions

other

Returns
Type Description

bool

Equals(object?)

Options for laying out a Document<T>.

Declaration
public override bool Equals(object? obj)
Parameters
Type Name Description

object

obj

Returns
Type Description

bool

Overrides
object.Equals(object)

GetHashCode()

Options for laying out a Document<T>.

Declaration
public override int GetHashCode()
Returns
Type Description

int

Overrides
object.GetHashCode()

PrintMembers(StringBuilder)

Options for laying out a Document<T>.

Declaration
protected virtual bool PrintMembers(StringBuilder builder)
Parameters
Type Name Description

StringBuilder

builder

Returns
Type Description

bool

ToString()

Options for laying out a Document<T>.

Declaration
public override string ToString()
Returns
Type Description

string

Overrides
object.ToString()

<Clone>$()

Options for laying out a Document<T>.

Declaration
public virtual LayoutOptions <Clone>$()
Returns
Type Description

LayoutOptions

Operators

operator ==(LayoutOptions?, LayoutOptions?)

Options for laying out a Document<T>.

Declaration
public static bool operator ==(LayoutOptions? left, LayoutOptions? right)
Parameters
Type Name Description

LayoutOptions

left

LayoutOptions

right

Returns
Type Description

bool

operator !=(LayoutOptions?, LayoutOptions?)

Options for laying out a Document<T>.

Declaration
public static bool operator !=(LayoutOptions? left, LayoutOptions? right)
Parameters
Type Name Description

LayoutOptions

left

LayoutOptions

right

Returns
Type Description

bool

Implements

IEquatable<T>