TomlArraySyntax Class

An array: brackets around a comma-separated list of values.

public sealed class TomlArraySyntax : TomlValueSyntax
Inheritance
TomlValueSyntax TomlArraySyntax

Properties

NameDescription
CloseBracketToken
ElementsGets the values in the array. The commas between them are the separators of the list.
OpenBracketToken

CloseBracketToken

TomlArraySyntax.cs
public SyntaxToken CloseBracketToken { get; }

Property value

SyntaxToken

No documentation is available.

Gets the values in the array. The commas between them are the separators of the list.

public SeparatedSyntaxList<TomlValueSyntax> Elements { get; }

OpenBracketToken

TomlArraySyntax.cs
public SyntaxToken OpenBracketToken { get; }

Property value

SyntaxToken

No documentation is available.

Methods

NameDescription
Accept(TomlSyntaxVisitor)
Accept<TResult>(TomlSyntaxVisitor<TResult>)
AddElements(TomlValueSyntax[])Returns this array with items added at the end, laid out the way the array already is.
Update(SyntaxToken, SeparatedSyntaxList<TomlValueSyntax>, SyntaxToken)Returns this array with the given parts, or itself when nothing changed.
WithCloseBracketToken(SyntaxToken)
WithElements(SeparatedSyntaxList<TomlValueSyntax>)
WithOpenBracketToken(SyntaxToken)

Accept overloads

Accept(TomlSyntaxVisitor)

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

No documentation is available.

Accept<TResult>(TomlSyntaxVisitor<TResult>)

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

TResult?

No documentation is available.

AddElements(TomlValueSyntax[])

TomlArraySyntax.cs

Returns this array with items added at the end, laid out the way the array already is.

public TomlArraySyntax AddElements(params TomlValueSyntax[] items)

Parameters

items TomlValueSyntax[]

Returns

TomlArraySyntax

Exceptions

ArgumentNullException
items or one of its items is null.

Remarks

In an array written on one line, each new element follows a comma and a space. In one written an element per line, each goes on a line of its own, indented as the last one is, and a comment after the last element stays on its line. An element that ends with a comment gets a line break after it, or the comment would hide what follows it.

Update(SyntaxToken, SeparatedSyntaxList<TomlValueSyntax>, SyntaxToken)

TomlArraySyntax.cs

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

public TomlArraySyntax Update(SyntaxToken openBracketToken, SeparatedSyntaxList<TomlValueSyntax> elements, SyntaxToken closeBracketToken)

Parameters

openBracketToken SyntaxToken
elements SeparatedSyntaxList<TomlValueSyntax>
closeBracketToken SyntaxToken

Returns

TomlArraySyntax

WithCloseBracketToken(SyntaxToken)

TomlArraySyntax.cs
public TomlArraySyntax WithCloseBracketToken(SyntaxToken closeBracketToken)

Parameters

closeBracketToken SyntaxToken

Returns

TomlArraySyntax

No documentation is available.

WithElements(SeparatedSyntaxList<TomlValueSyntax>)

TomlArraySyntax.cs
public TomlArraySyntax WithElements(SeparatedSyntaxList<TomlValueSyntax> elements)

No documentation is available.

WithOpenBracketToken(SyntaxToken)

TomlArraySyntax.cs
public TomlArraySyntax WithOpenBracketToken(SyntaxToken openBracketToken)

Parameters

openBracketToken SyntaxToken

Returns

TomlArraySyntax

No documentation is available.