示例#1
0
 public Task <Document> FormatAsync(Document document, IEnumerable <TextSpan> spans, OptionSet options, CancellationToken cancellationToken)
 => Formatter.FormatAsync(document, spans, options, rules: null, cancellationToken: cancellationToken);
        public Task <Document> FormatAsync(Document document, IEnumerable <TextSpan>?spans, OptionSet options, CancellationToken cancellationToken)
        {
            var formattingOptions = SyntaxFormattingOptions.Create(options, document.Project.Solution.Workspace.Services, document.Project.Language);

            return(Formatter.FormatAsync(document, spans, formattingOptions, rules: null, cancellationToken));
        }
 public Task <Document> FormatAsync(Document document, IEnumerable <TextSpan>?spans, SyntaxFormattingOptions options, CancellationToken cancellationToken)
 => Formatter.FormatAsync(document, spans, options, rules: null, cancellationToken);
示例#4
0
 public Task <Document> FormatAsync(Document document, IEnumerable <TextSpan>?spans, LineFormattingOptions lineFormattingOptions, SyntaxFormattingOptions?syntaxFormattingOptions, CancellationToken cancellationToken)
 {
     Contract.ThrowIfNull(syntaxFormattingOptions);
     return(Formatter.FormatAsync(document, spans, syntaxFormattingOptions, rules: null, cancellationToken));
 }