Class LayoutOptions
Options for laying out a Document<T>.
Inheritance
- object
- LayoutOptions
Implements
Inherited Members
- object.GetType()
- object.MemberwiseClone()
- object.Equals(object, object)
- object.ReferenceEquals(object, object)
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 |
---|---|---|
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 |
---|---|---|
PageWidth |
The configured page width. Null for unlimited page width |
|
LayoutMode |
The layout mode |
|
DefaultNesting |
The default indentation level for calls to Nested() |
|
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 |
---|---|
DefaultNesting
The default indentation level for calls to Nested()
Declaration
public int DefaultNesting { get; init; }
Property Value
Type | Description |
---|---|
EqualityContract
Options for laying out a Document<T>.
Declaration
protected virtual Type EqualityContract { get; }
Property Value
Type | Description |
---|---|
LayoutMode
The layout mode
Declaration
public LayoutMode LayoutMode { get; init; }
Property Value
Type | Description |
---|---|
PageWidth
The configured page width. Null for unlimited page width
Declaration
public PageWidthOptions? PageWidth { get; init; }
Property Value
Type | Description |
---|---|
StripTrailingWhitespace
Whether to strip whitespace from the end of each line
Declaration
public bool StripTrailingWhitespace { get; init; }
Property Value
Type | Description |
---|---|
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 |
---|---|---|
PageWidth |
||
LayoutMode |
||
DefaultNesting |
||
StripTrailingWhitespace |
Equals(LayoutOptions?)
Options for laying out a Document<T>.
Declaration
public virtual bool Equals(LayoutOptions? other)
Parameters
Type | Name | Description |
---|---|---|
other |
Returns
Type | Description |
---|---|
Equals(object?)
Options for laying out a Document<T>.
Declaration
public override bool Equals(object? obj)
Parameters
Type | Name | Description |
---|---|---|
obj |
Returns
Type | Description |
---|---|
Overrides
GetHashCode()
Options for laying out a Document<T>.
Declaration
public override int GetHashCode()
Returns
Type | Description |
---|---|
Overrides
PrintMembers(StringBuilder)
Options for laying out a Document<T>.
Declaration
protected virtual bool PrintMembers(StringBuilder builder)
Parameters
Type | Name | Description |
---|---|---|
builder |
Returns
Type | Description |
---|---|
ToString()
Options for laying out a Document<T>.
Declaration
public override string ToString()
Returns
Type | Description |
---|---|
Overrides
<Clone>$()
Options for laying out a Document<T>.
Declaration
public virtual LayoutOptions <Clone>$()
Returns
Type | Description |
---|---|
Operators
operator ==(LayoutOptions?, LayoutOptions?)
Options for laying out a Document<T>.
Declaration
public static bool operator ==(LayoutOptions? left, LayoutOptions? right)
Parameters
Type | Name | Description |
---|---|---|
left |
||
right |
Returns
Type | Description |
---|---|
operator !=(LayoutOptions?, LayoutOptions?)
Options for laying out a Document<T>.
Declaration
public static bool operator !=(LayoutOptions? left, LayoutOptions? right)
Parameters
Type | Name | Description |
---|---|---|
left |
||
right |
Returns
Type | Description |
---|---|