ICSharpCode.NRefactory.CSharp.CSharpOutputVisitor.WriteBlock C# (CSharp) Method

WriteBlock() protected method

Writes a block statement. Similar to VisitBlockStatement() except that: 1) it allows customizing the BraceStyle 2) it does not write a trailing newline after the '}' (this job is left to the caller)
protected WriteBlock ( BlockStatement blockStatement, BraceStyle style ) : void
blockStatement BlockStatement
style BraceStyle
return void
		protected virtual void WriteBlock(BlockStatement blockStatement, BraceStyle style)
		{
			StartNode(blockStatement);
			OpenBrace(style);
			foreach (var node in blockStatement.Statements) {
				node.AcceptVisitor(this);
			}
			EndNode(blockStatement);
			CloseBrace(style);
		}
		
CSharpOutputVisitor