IniSectionSyntax Class

A section header such as [database].

public sealed class IniSectionSyntax : IniEntrySyntax
Inheritance
IniEntrySyntax IniSectionSyntax

Properties

NameDescription
CloseBracketToken
NameGets the section name, without the whitespace around it.
NameToken
OpenBracketToken
PropertiesGets the properties under this header: the ones that follow it, up to the next header.

CloseBracketToken

IniSectionSyntax.cs
public SyntaxToken CloseBracketToken { get; }

Property value

SyntaxToken

No documentation is available.

Gets the section name, without the whitespace around it.

public string Name { get; }

Property value

string

public SyntaxToken NameToken { get; }

Property value

SyntaxToken

No documentation is available.

OpenBracketToken

IniSectionSyntax.cs
public SyntaxToken OpenBracketToken { get; }

Property value

SyntaxToken

No documentation is available.

Gets the properties under this header: the ones that follow it, up to the next header.

public IReadOnlyList<IniPropertySyntax> Properties { get; }

Property value

IReadOnlyList<IniPropertySyntax>

Remarks

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

Methods

NameDescription
Accept(IniSyntaxVisitor)
Accept<TResult>(IniSyntaxVisitor<TResult>)
Update(SyntaxToken, SyntaxToken, SyntaxToken)Returns this section with the given parts, or itself when nothing changed.
WithCloseBracketToken(SyntaxToken)
WithName(string)Returns this section with a new name.
WithNameToken(SyntaxToken)
WithOpenBracketToken(SyntaxToken)

Accept overloads

Accept(IniSyntaxVisitor)

IniSectionSyntax.cs
public override void Accept(IniSyntaxVisitor visitor)
Parameters
visitor IniSyntaxVisitor

No documentation is available.

Accept<TResult>(IniSyntaxVisitor<TResult>)

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

TResult?

No documentation is available.

Update(SyntaxToken, SyntaxToken, SyntaxToken)

IniSectionSyntax.cs

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

public IniSectionSyntax Update(SyntaxToken openBracketToken, SyntaxToken nameToken, SyntaxToken closeBracketToken)

Parameters

openBracketToken SyntaxToken
nameToken SyntaxToken
closeBracketToken SyntaxToken

Returns

IniSectionSyntax

WithCloseBracketToken(SyntaxToken)

IniSectionSyntax.cs
public IniSectionSyntax WithCloseBracketToken(SyntaxToken closeBracketToken)

Parameters

closeBracketToken SyntaxToken

Returns

IniSectionSyntax

No documentation is available.

WithName(string)

IniSectionSyntax.cs

Returns this section with a new name.

public IniSectionSyntax WithName(string name)

Parameters

name string

Returns

IniSectionSyntax

Exceptions

ArgumentNullException
name is null.
ArgumentException
name cannot be written as a section name.

Remarks

In a document, the name is checked the way the document reads it (see IniDocumentSyntax.Options), as SyntaxFactory.SectionName checks it. Otherwise it is checked as SyntaxFactory.SectionName checks it.

WithNameToken(SyntaxToken)

IniSectionSyntax.cs
public IniSectionSyntax WithNameToken(SyntaxToken nameToken)

Parameters

nameToken SyntaxToken

Returns

IniSectionSyntax

No documentation is available.

WithOpenBracketToken(SyntaxToken)

IniSectionSyntax.cs
public IniSectionSyntax WithOpenBracketToken(SyntaxToken openBracketToken)

Parameters

openBracketToken SyntaxToken

Returns

IniSectionSyntax

No documentation is available.