private void ApplyBeginningOfTreeTriviaOperation( FormattingContext context, TokenStream tokenStream, CancellationToken cancellationToken) { if (!tokenStream.FormatBeginningOfTree) { return; } Action <int, TriviaData> beginningOfTreeTriviaInfoApplier = (i, info) => { tokenStream.ApplyBeginningOfTreeChange(info); }; // remove all leading indentation var triviaInfo = tokenStream.GetTriviaDataAtBeginningOfTree().WithIndentation(0, context, this.formattingRules, cancellationToken); triviaInfo.Format(context, this.formattingRules, beginningOfTreeTriviaInfoApplier, cancellationToken); }