66 references to SpanStart
Microsoft.CodeAnalysis.CodeStyle (2)
src\Analyzers\Core\Analyzers\NewLines\MultipleBlankLines\AbstractMultipleBlankLinesDiagnosticAnalyzer.cs (1)
79Location.Create(badTrivia.SyntaxTree!, new TextSpan(badTrivia.SpanStart, 0)),
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Formatting\TriviaEngine\AbstractTriviaFormatter.cs (1)
576LineColumnRule.IndentationOperations.Default => this.Context.GetBaseIndentation(trivia2.RawKind == 0 ? this.EndPosition : trivia2.SpanStart),
Microsoft.CodeAnalysis.CSharp (2)
Syntax\DirectiveTriviaSyntax.cs (2)
85else if (tr.UnderlyingNode == this.Green && tr.SpanStart == this.SpanStart && (object)d == this) 116else if (tr.UnderlyingNode == this.Green && tr.SpanStart == this.SpanStart && (object)d == this)
Microsoft.CodeAnalysis.CSharp.CodeStyle (2)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Formatting\Engine\Trivia\TriviaDataFactory.CodeShapeAnalyzer.cs (2)
197if (this.UseIndentation && _indentation != _context.GetBaseIndentation(trivia.SpanStart)) 237if (_indentation != _context.GetBaseIndentation(trivia.SpanStart))
Microsoft.CodeAnalysis.CSharp.CodeStyle.Fixes (1)
src\Analyzers\CSharp\CodeFixes\UseCollectionExpression\CSharpCollectionExpressionRewriter.cs (1)
627preferredIndentation, firstTokenOnLineIndentationString, nextTrivia.SpanStart));
Microsoft.CodeAnalysis.CSharp.Features (6)
BraceCompletion\AbstractCurlyBraceOrBracketCompletionService.cs (1)
129newLineEdit = new TextChange(new TextSpan(annotatedNewline.SpanStart, 0), annotatedNewline.ToString());
BraceMatching\BlockCommentBraceMatcher.cs (1)
50return new BraceMatchingResult(new TextSpan(trivia.SpanStart, "/*".Length), TextSpan.FromBounds(trivia.Span.End - "*/".Length, trivia.Span.End));
QuickInfo\CSharpSyntacticQuickInfoProvider.cs (1)
105spanStart = nearbyComment.SpanStart;
src\Analyzers\CSharp\CodeFixes\UseCollectionExpression\CSharpCollectionExpressionRewriter.cs (1)
627preferredIndentation, firstTokenOnLineIndentationString, nextTrivia.SpanStart));
Structure\CSharpStructureHelpers.cs (2)
69end = trivia.SpanStart; 153var span = TextSpan.FromBounds(startComment.SpanStart, endComment.Span.End);
Microsoft.CodeAnalysis.CSharp.Symbol.UnitTests (1)
DocumentationComments\CrefTests.cs (1)
6333var nonCrefPosition = tree.GetRoot().DescendantTrivia().Single(t => t.IsKind(SyntaxKind.SingleLineDocumentationCommentTrivia)).SpanStart;
Microsoft.CodeAnalysis.CSharp.Syntax.UnitTests (4)
LexicalAndXml\LexicalTests.cs (1)
3878Assert.True(trivia.SpanStart == 3);
Syntax\SyntaxAnnotationTests.cs (2)
366var annotatedTrivia = newRoot.GetAnnotatedTrivia(annotation).OrderBy(t => t.SpanStart); 367var actualTrivia = GetAllTrivia(oldRoot).OrderBy(t => t.SpanStart);
Syntax\SyntaxNodeTests.cs (1)
792Assert.Equal(0, trivia.SpanStart);
Microsoft.CodeAnalysis.CSharp.Workspaces (4)
Classification\Worker.cs (2)
194if (trivia.SpanStart >= _textSpan.End) 285foreach (var token in SyntaxFactory.ParseTokens(text: trivia.ToFullString(), initialTokenPosition: trivia.SpanStart))
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Formatting\Engine\Trivia\TriviaDataFactory.CodeShapeAnalyzer.cs (2)
197if (this.UseIndentation && _indentation != _context.GetBaseIndentation(trivia.SpanStart)) 237if (_indentation != _context.GetBaseIndentation(trivia.SpanStart))
Microsoft.CodeAnalysis.EditorFeatures (4)
SplitComment\SplitCommentCommandHandler.cs (4)
194var commentStartColumn = triviaLine.GetColumnFromLineOffset(trivia.SpanStart - triviaLine.Start, textView.Options); 210var triviaPrefixStart = trivia.SpanStart; 213var triviaStartChar = snapshot[trivia.SpanStart]; 222var startIndex = trivia.SpanStart + commentPrefix.Length;
Microsoft.CodeAnalysis.Features (1)
src\Analyzers\Core\Analyzers\NewLines\MultipleBlankLines\AbstractMultipleBlankLinesDiagnosticAnalyzer.cs (1)
79Location.Create(badTrivia.SyntaxTree!, new TextSpan(badTrivia.SpanStart, 0)),
Microsoft.CodeAnalysis.VisualBasic.CodeStyle (6)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\VisualBasic\Extensions\SyntaxTreeExtensions.vb (3)
134If (trivia.SpanStart < position) AndAlso (position <= child.FullSpan.End) Then 140If (trivia.SpanStart < position) AndAlso (position <= child.FullSpan.End) Then 180If trivia.IsKind(SyntaxKind.CommentTrivia, SyntaxKind.DocumentationCommentTrivia) AndAlso trivia.SpanStart <> position Then
src\Workspaces\VisualBasic\Portable\Formatting\Engine\Trivia\TriviaDataFactory.CodeShapeAnalyzer.vb (2)
215If Me.UseIndentation AndAlso Me._indentation <> Me._context.GetBaseIndentation(trivia.SpanStart) Then 247If Me._indentation <> Me._context.GetBaseIndentation(trivia.SpanStart) Then
src\Workspaces\VisualBasic\Portable\Formatting\Engine\Trivia\VisualBasicTriviaFormatter.vb (1)
265Dim indentation = Me.Context.GetBaseIndentation(trivia.SpanStart)
Microsoft.CodeAnalysis.VisualBasic.CodeStyle.Fixes (3)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\VisualBasic\Indentation\VisualBasicIndentationService.Indenter.vb (3)
103If token.Span.End <= trivia.SpanStart AndAlso Not token.IsMissing Then 271Dim baseLine = sourceText.Lines.GetLineFromPosition(trivia.SpanStart) 298Dim triviaLine = sourceText.Lines.GetLineFromPosition(trivia.SpanStart)
Microsoft.CodeAnalysis.VisualBasic.EditorFeatures (4)
LineCommit\ContainingStatementInfo.vb (2)
76Dim lineNumberOfContinuation = snapshot.GetLineNumberFromPosition(trivia.SpanStart) 87trivia = syntaxTree.FindTriviaToLeft(trivia.SpanStart, cancellationToken)
SplitComment\VisualBasicSplitCommentService.vb (2)
30While currentTrivia <> Nothing AndAlso currentTrivia.SpanStart > 0 31Dim previousTrivia = root.FindTrivia(currentTrivia.SpanStart - 1)
Microsoft.CodeAnalysis.VisualBasic.Features (1)
Structure\VisualBasicStructureHelpers.vb (1)
29Dim span = TextSpan.FromBounds(startComment.SpanStart, endComment.Span.End)
Microsoft.CodeAnalysis.VisualBasic.Syntax.UnitTests (9)
Syntax\SyntaxAnnotationTests.vb (2)
340Dim annotatedTrivia = newRoot.GetAnnotatedTrivia(annotation).OrderBy(Function(x) x.SpanStart) 341Dim actualTrivia = GetAllTrivia(oldRoot).OrderBy(Function(x) x.SpanStart)
TestSyntaxNodes.vb (7)
708Assert.Equal(1, follTrivia(0).SpanStart) 714Assert.Equal(4, follTrivia(1).SpanStart) 739Assert.Equal(0, precTrivia(0).SpanStart) 745Assert.Equal(4, precTrivia(1).SpanStart) 751Assert.Equal(6, precTrivia(2).SpanStart) 760Assert.Equal(10, follTrivia(0).SpanStart) 2354Assert.Equal(23, trivia.SpanStart)
Microsoft.CodeAnalysis.VisualBasic.Workspaces (11)
Classification\Worker.vb (2)
147AddClassification(New TextSpan(trivia.SpanStart, 1), ClassificationTypeNames.Punctuation) 163For Each token In SyntaxFactory.ParseTokens(trivia.ToFullString(), initialTokenPosition:=trivia.SpanStart)
Formatting\Engine\Trivia\TriviaDataFactory.CodeShapeAnalyzer.vb (2)
215If Me.UseIndentation AndAlso Me._indentation <> Me._context.GetBaseIndentation(trivia.SpanStart) Then 247If Me._indentation <> Me._context.GetBaseIndentation(trivia.SpanStart) Then
Formatting\Engine\Trivia\VisualBasicTriviaFormatter.vb (1)
265Dim indentation = Me.Context.GetBaseIndentation(trivia.SpanStart)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\VisualBasic\Extensions\SyntaxTreeExtensions.vb (3)
134If (trivia.SpanStart < position) AndAlso (position <= child.FullSpan.End) Then 140If (trivia.SpanStart < position) AndAlso (position <= child.FullSpan.End) Then 180If trivia.IsKind(SyntaxKind.CommentTrivia, SyntaxKind.DocumentationCommentTrivia) AndAlso trivia.SpanStart <> position Then
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\VisualBasic\Indentation\VisualBasicIndentationService.Indenter.vb (3)
103If token.Span.End <= trivia.SpanStart AndAlso Not token.IsMissing Then 271Dim baseLine = sourceText.Lines.GetLineFromPosition(trivia.SpanStart) 298Dim triviaLine = sourceText.Lines.GetLineFromPosition(trivia.SpanStart)
Microsoft.CodeAnalysis.Workspaces (1)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Formatting\TriviaEngine\AbstractTriviaFormatter.cs (1)
576LineColumnRule.IndentationOperations.Default => this.Context.GetBaseIndentation(trivia2.RawKind == 0 ? this.EndPosition : trivia2.SpanStart),
Microsoft.VisualStudio.LanguageServices.CSharp (2)
CodeModel\MethodXml\MethodXmlBuilder.cs (2)
45var line = Text.Lines.GetLineFromPosition(trivia.SpanStart); 47if (firstNonWhitespacePosition == trivia.SpanStart)
Microsoft.VisualStudio.LanguageServices.VisualBasic (2)
CodeModel\VisualBasicCodeModelService.NodeLocator.vb (2)
1008lineNumber = text.Lines.IndexOf(colonTrivia.Value.SpanStart) 1022startPosition = colonTrivia.Value.SpanStart