TomlTableSyntax Class

A table header such as [database], or an array-of-tables header such as [[products]].

public sealed class TomlTableSyntax : TomlEntrySyntax

Remarks

A header is an entry of the document like any other: the key/value pairs under it are the entries that follow it, up to the next header. TomlTableSyntax.Properties gathers them.

Inheritance
TomlEntrySyntax TomlTableSyntax

Properties

NameDescription
CloseBracketTokenGets ], or ]] for an array of tables.
IsArrayOfTablesGets a value indicating whether this is an array-of-tables header such as [[products]].
KeyGets the name of the table.
OpenBracketTokenGets [, or [[ for an array of tables.
PropertiesGets the key/value pairs under this header: the ones that follow it, up to the next header.

CloseBracketToken

TomlTableSyntax.cs

Gets ], or ]] for an array of tables.

public SyntaxToken CloseBracketToken { get; }

Property value

SyntaxToken

IsArrayOfTables

TomlTableSyntax.cs

Gets a value indicating whether this is an array-of-tables header such as [[products]].

public bool IsArrayOfTables { get; }

Property value

bool

Gets the name of the table.

public TomlKeySyntax Key { get; }

Property value

TomlKeySyntax

OpenBracketToken

TomlTableSyntax.cs

Gets [, or [[ for an array of tables.

public SyntaxToken OpenBracketToken { get; }

Property value

SyntaxToken

Gets the key/value pairs under this header: the ones that follow it, up to the next header.

public IReadOnlyList<TomlPropertySyntax> Properties { get; }

Property value

IReadOnlyList<TomlPropertySyntax>

Remarks

A header that is not part of a document has none.

Methods

NameDescription
Accept(TomlSyntaxVisitor)
Accept<TResult>(TomlSyntaxVisitor<TResult>)
Update(SyntaxToken, TomlKeySyntax, SyntaxToken)Returns this header with the given parts, or itself when nothing changed.
WithCloseBracketToken(SyntaxToken)
WithKey(TomlKeySyntax)
WithOpenBracketToken(SyntaxToken)

Accept overloads

Accept(TomlSyntaxVisitor)

TomlTableSyntax.cs
public override void Accept(TomlSyntaxVisitor visitor)
Parameters
visitor TomlSyntaxVisitor

No documentation is available.

Accept<TResult>(TomlSyntaxVisitor<TResult>)

TomlTableSyntax.cs
public override TResult? Accept<TResult>(TomlSyntaxVisitor<TResult> visitor)
Type parameters
TResult
Parameters
visitor TomlSyntaxVisitor<TResult>
Returns

TResult?

No documentation is available.

Update(SyntaxToken, TomlKeySyntax, SyntaxToken)

TomlTableSyntax.cs

Returns this header with the given parts, or itself when nothing changed.

public TomlTableSyntax Update(SyntaxToken openBracketToken, TomlKeySyntax key, SyntaxToken closeBracketToken)

Parameters

openBracketToken SyntaxToken
key TomlKeySyntax
closeBracketToken SyntaxToken

Returns

TomlTableSyntax

Exceptions

ArgumentNullException
key is null.

Remarks

Whether it is an array-of-tables header follows openBracketToken.

WithCloseBracketToken(SyntaxToken)

TomlTableSyntax.cs
public TomlTableSyntax WithCloseBracketToken(SyntaxToken closeBracketToken)

Parameters

closeBracketToken SyntaxToken

Returns

TomlTableSyntax

No documentation is available.

WithKey(TomlKeySyntax)

TomlTableSyntax.cs
public TomlTableSyntax WithKey(TomlKeySyntax key)

Parameters

key TomlKeySyntax

Returns

TomlTableSyntax

No documentation is available.

WithOpenBracketToken(SyntaxToken)

TomlTableSyntax.cs
public TomlTableSyntax WithOpenBracketToken(SyntaxToken openBracketToken)

Parameters

openBracketToken SyntaxToken

Returns

TomlTableSyntax

No documentation is available.