3rdparty/NRefactory/ICSharpCode.NRefactory.CSharp/IndentEngine/IndentState.cs
/// <summary>
///     Pushes a new level of indentation depending on the given
///     <paramref name="body"/>.
/// </summary>
Pushes a new level of indentation depending on the given
.
Pushes a new level of indentation depending on the given .
void AddIndentation(Body body)
		{
			var isExpression = Parent is ParenthesesBodyState || Parent is SquareBracketsBodyState ||
				(Parent is BracesBodyState && ((BracesBodyState)Parent).IsRightHandExpression);
			if (isExpression && Engine.formattingOptions.IndentBlocksInsideExpressions && Engine.isLineStart)
			{
				AddIndentation(BraceStyle.NextLineShifted);
			}
			BraceStyle style;
			if (TryGetBraceStyle(body, out style))
			{
				AddIndentation(style);
			} else {
				NextLineIndent.Push(IndentType.Empty);
			}
		}
void AddIndentation ( Body body ) { var isExpression = Parent is ParenthesesBodyState || Parent is SquareBracketsBodyState || ( Parent is BracesBodyState && ( ( BracesBodyState ) Parent ) . IsRightHandExpression ) ; if ( isExpression && Engine . formattingOptions . IndentBlocksInsideExpressions && Engine . isLineStart ) { AddIndentation ( BraceStyle . NextLineShifted ) ; } BraceStyle style ; if ( TryGetBraceStyle ( body , out style ) ) { AddIndentation ( style ) ; } else { NextLineIndent . Push ( IndentType . Empty ) ; } }
Pushes a new level of indentation depending on the given
.
Pushes a new level of indentation depending on the given .
body
Body