コード例 #1
0
        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)));
        }
コード例 #2
0
        protected override ImmutableArray <AbstractFormattingRule> GetBraceFormattingIndentationRulesAfterReturn(IndentationOptions options)
        {
            var indentStyle = options.IndentStyle;

            return(ImmutableArray.Create(BraceCompletionFormattingRule.ForIndentStyle(indentStyle)));
        }