C# Class AvalonStudio.TextEditor.Indentation.CSharp.IndentationReformatter.Block

An indentation block. Tracks the state of the indentation.
Afficher le fichier Open project: VitalElement/AvalonStudio

Méthodes publiques

Свойство Type Description
Bracket char
Continuation bool
InnerIndent string
LastWord string
OneLineBlock int
OuterIndent string
PreviousOneLineBlock int
StartLine int

Méthodes publiques

Méthode Description
Indent ( IndentationSettings set ) : void
Indent ( string indentationString ) : void
ResetOneLineBlock ( ) : void
ToString ( ) : string

Method Details

Indent() public méthode

public Indent ( IndentationSettings set ) : void
set IndentationSettings
Résultat void

Indent() public méthode

public Indent ( string indentationString ) : void
indentationString string
Résultat void

ResetOneLineBlock() public méthode

public ResetOneLineBlock ( ) : void
Résultat void

ToString() public méthode

public ToString ( ) : string
Résultat string

Property Details

Bracket public_oe property

The type of bracket that opened this block (, [ or {
public char Bracket
Résultat char

Continuation public_oe property

Gets whether there's currently a line continuation going on inside this block.
public bool Continuation
Résultat bool

InnerIndent public_oe property

The indentation inside the block.
public string InnerIndent
Résultat string

LastWord public_oe property

The last word that was seen inside this block. Because parenthesis open a sub-block and thus don't change their parent's LastWord, this property can be used to identify the type of block statement (if, while, switch) at the position of the '{'.
public string LastWord
Résultat string

OneLineBlock public_oe property

Gets whether there's currently a 'one-line-block' going on. 'one-line-blocks' occur with if statements that don't use '{}'. They are not represented by a Block instance on the stack, but are instead handled similar to line continuations. This property is an integer because there might be multiple nested one-line-blocks. As soon as there is a finished statement, OneLineBlock is reset to 0.
public int OneLineBlock
Résultat int

OuterIndent public_oe property

The indentation outside of the block.
public string OuterIndent
Résultat string

PreviousOneLineBlock public_oe property

The previous value of one-line-block before it was reset. Used to restore the indentation of 'else' to the correct level.
public int PreviousOneLineBlock
Résultat int

StartLine public_oe property

Gets the line number where this block started.
public int StartLine
Résultat int