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

An indentation block. Tracks the state of the indentation.
ファイルを表示 Open project: VitalElement/AvalonStudio

Public Properties

Property Type Description
Bracket char
Continuation bool
InnerIndent string
LastWord string
OneLineBlock int
OuterIndent string
PreviousOneLineBlock int
StartLine int

Public Methods

Method Description
Indent ( IndentationSettings set ) : void
Indent ( string indentationString ) : void
ResetOneLineBlock ( ) : void
ToString ( ) : string

Method Details

Indent() public method

public Indent ( IndentationSettings set ) : void
set IndentationSettings
return void

Indent() public method

public Indent ( string indentationString ) : void
indentationString string
return void

ResetOneLineBlock() public method

public ResetOneLineBlock ( ) : void
return void

ToString() public method

public ToString ( ) : string
return string

Property Details

Bracket public_oe property

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

Continuation public_oe property

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

InnerIndent public_oe property

The indentation inside the block.
public string InnerIndent
return 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
return 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
return int

OuterIndent public_oe property

The indentation outside of the block.
public string OuterIndent
return 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
return int

StartLine public_oe property

Gets the line number where this block started.
public int StartLine
return int