Ejemplo n.º 1
0
            public SeparatedSyntaxListCodeActionComputer(
                AbstractSeparatedSyntaxListWrapper <TListSyntax, TListItemSyntax> service,
                Document document, SourceText sourceText, DocumentOptionSet options,
                TListSyntax listSyntax, SeparatedSyntaxList <TListItemSyntax> listItems,
                CancellationToken cancellationToken)
                : base(service, document, sourceText, options, cancellationToken)
            {
                _listSyntax = listSyntax;
                _listItems  = listItems;

                var generator = SyntaxGenerator.GetGenerator(this.OriginalDocument);

                _afterOpenTokenIndentationTrivia = generator.Whitespace(GetAfterOpenTokenIdentation());
                _singleIndentationTrivia         = generator.Whitespace(GetSingleIdentation());
            }
            public SeparatedSyntaxListCodeActionComputer(
                AbstractSeparatedSyntaxListWrapper <TListSyntax, TListItemSyntax> service,
                Document document,
                SourceText sourceText,
                SyntaxWrappingOptions options,
                TListSyntax listSyntax,
                SeparatedSyntaxList <TListItemSyntax> listItems,
                CancellationToken cancellationToken)
                : base(service, document, sourceText, options, cancellationToken)
            {
                _listSyntax = listSyntax;
                _listItems  = listItems;

                _shouldMoveOpenBraceToNewLine  = service.ShouldMoveOpenBraceToNewLine(options);
                _shouldMoveCloseBraceToNewLine = service.ShouldMoveCloseBraceToNewLine;

                var generator = SyntaxGenerator.GetGenerator(OriginalDocument);

                _afterOpenTokenIndentationTrivia = generator.Whitespace(GetAfterOpenTokenIdentation());
                _singleIndentationTrivia         = generator.Whitespace(GetSingleIdentation());
                _braceIndentationTrivia          = generator.Whitespace(GetBraceTokenIndentation());
            }