private IEnumerable <AbstractFormattingRule> GetFormattingRules(Document document) { var indentStyle = document.GetOptionsAsync(CancellationToken.None).WaitAndGetResult_CanCallOnBackground(CancellationToken.None).GetOption(FormattingOptions.SmartIndent); return(SpecializedCollections.SingletonEnumerable <AbstractFormattingRule>(BraceCompletionFormattingRule.ForIndentStyle(indentStyle)).Concat(Formatter.GetDefaultFormattingRules(document))); }
protected override ImmutableArray <AbstractFormattingRule> GetBraceFormattingIndentationRulesAfterReturn(IndentationOptions options) { var indentStyle = options.IndentStyle; return(ImmutableArray.Create(BraceCompletionFormattingRule.ForIndentStyle(indentStyle))); }