C# Класс AvalonStudio.TextEditor.Indentation.CSharp.IndentationReformatter.Block

An indentation block. Tracks the state of the indentation.
Показать файл Открыть проект

Открытые свойства

Свойство Тип Описание
Bracket char
Continuation bool
InnerIndent string
LastWord string
OneLineBlock int
OuterIndent string
PreviousOneLineBlock int
StartLine int

Открытые методы

Метод Описание
Indent ( IndentationSettings set ) : void
Indent ( string indentationString ) : void
ResetOneLineBlock ( ) : void
ToString ( ) : string

Описание методов

Indent() публичный Метод

public Indent ( IndentationSettings set ) : void
set IndentationSettings
Результат void

Indent() публичный Метод

public Indent ( string indentationString ) : void
indentationString string
Результат void

ResetOneLineBlock() публичный Метод

public ResetOneLineBlock ( ) : void
Результат void

ToString() публичный Метод

public ToString ( ) : string
Результат string

Описание свойств

Bracket публичное свойство

The type of bracket that opened this block (, [ or {
public char Bracket
Результат char

Continuation публичное свойство

Gets whether there's currently a line continuation going on inside this block.
public bool Continuation
Результат bool

InnerIndent публичное свойство

The indentation inside the block.
public string InnerIndent
Результат string

LastWord публичное свойство

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
Результат string

OneLineBlock публичное свойство

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
Результат int

OuterIndent публичное свойство

The indentation outside of the block.
public string OuterIndent
Результат string

PreviousOneLineBlock публичное свойство

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
Результат int

StartLine публичное свойство

Gets the line number where this block started.
public int StartLine
Результат int