Table of Contents

Struct ModuleBlock

Namespace
RDCore.SDK.Formatting
Assembly
RDCore.SDK.dll

A block of a module that is open at one of its lines: its opener is at or before the line, and the module has no closer for it.

public readonly record struct ModuleBlock : IEquatable<ModuleBlock>
Implements
Inherited Members

Constructors

ModuleBlock(int, int, string, bool)

A block of a module that is open at one of its lines: its opener is at or before the line, and the module has no closer for it.

public ModuleBlock(int Opener, int Branch, string Closer, bool HasBody)

Parameters

Opener int

The line of the block's opener, from 0: its Sub, Function, Property, Enum or Type line, or its If, Select Case, For, Do, While or With line.

Branch int

The line that starts the block's last branch at or before the line: an ElseIf, an Else, a Case or a Case Else line; Opener when the block has no branch there.

Closer string

The keywords that close the block: End Sub, End Function, End Property, End Enum, End Type, End If, End Select, Next, Loop, Wend or End With.

HasBody bool

Whether the line comes after Branch, so that the block's last branch has a line at or before the line.

Properties

Branch

The line that starts the block's last branch at or before the line: an ElseIf, an Else, a Case or a Case Else line; Opener when the block has no branch there.

public int Branch { get; init; }

Property Value

int

Closer

The keywords that close the block: End Sub, End Function, End Property, End Enum, End Type, End If, End Select, Next, Loop, Wend or End With.

public string Closer { get; init; }

Property Value

string

HasBody

Whether the line comes after Branch, so that the block's last branch has a line at or before the line.

public bool HasBody { get; init; }

Property Value

bool

Opener

The line of the block's opener, from 0: its Sub, Function, Property, Enum or Type line, or its If, Select Case, For, Do, While or With line.

public int Opener { get; init; }

Property Value

int