25 references to Span
Microsoft.CodeAnalysis.CodeStyle (2)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Formatting\Engine\TokenStream.cs (2)
392Debug.Assert((token1.IndexInStream >= 0 && token2.IndexInStream >= 0) || token1.Token.Equals(token2.Token.GetPreviousToken(includeZeroWidth: true)) || token2.Token.LeadingTrivia.Span.Contains(token1.Token.Span)); 417Debug.Assert((token1.IndexInStream >= 0 && token2.IndexInStream >= 0) || token1.Token.Equals(token2.Token.GetPreviousToken(includeZeroWidth: true)) || token2.Token.LeadingTrivia.Span.Contains(token1.Token.Span));
Microsoft.CodeAnalysis.CSharp.Features (3)
Snippets\AbstractCSharpTypeSnippetProvider.cs (1)
84var triviaSpan = typeDeclaration.CloseBraceToken.LeadingTrivia.Span;
Snippets\CSharpIntMainSnippetProvider.cs (1)
44var triviaSpan = returnStatement.GetLeadingTrivia().Span;
Snippets\CSharpSnippetHelpers.cs (1)
23var triviaSpan = block.CloseBraceToken.LeadingTrivia.Span;
Microsoft.CodeAnalysis.CSharp.Syntax.UnitTests (16)
Syntax\SyntaxNodeTests.cs (16)
3754Assert.Equal(0, idToken.LeadingTrivia.Span.Length); // zero-width elastic trivia 3757Assert.Equal(0, idToken.TrailingTrivia.Span.Length); // zero-width elastic trivia 3770Assert.Equal(1, idToken.LeadingTrivia.Span.Length); 3773Assert.Equal(2, idToken.TrailingTrivia.Span.Length); 3779Assert.Equal(0, namedNode.GetLeadingTrivia().Span.Length); // zero-width elastic trivia 3782Assert.Equal(0, namedNode.GetTrailingTrivia().Span.Length); // zero-width elastic trivia 3795Assert.Equal(1, namedNode.GetLeadingTrivia().Span.Length); 3798Assert.Equal(2, namedNode.GetTrailingTrivia().Span.Length); 3804Assert.Equal(0, nodeOrToken.GetLeadingTrivia().Span.Length); // zero-width elastic trivia 3807Assert.Equal(0, nodeOrToken.GetTrailingTrivia().Span.Length); // zero-width elastic trivia 3813Assert.Equal(0, nodeOrToken.GetLeadingTrivia().Span.Length); // zero-width elastic trivia 3816Assert.Equal(0, nodeOrToken.GetTrailingTrivia().Span.Length); // zero-width elastic trivia 3836Assert.Equal(1, nodeOrToken.GetLeadingTrivia().Span.Length); // zero-width elastic trivia 3839Assert.Equal(2, nodeOrToken.GetTrailingTrivia().Span.Length); // zero-width elastic trivia 3845Assert.Equal(1, nodeOrToken.GetLeadingTrivia().Span.Length); // zero-width elastic trivia 3848Assert.Equal(2, nodeOrToken.GetTrailingTrivia().Span.Length); // zero-width elastic trivia
Microsoft.CodeAnalysis.VisualBasic.CodeStyle.Fixes (1)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\VisualBasic\Extensions\ContextQuery\SyntaxTokenExtensions.vb (1)
88If Not token.LeadingTrivia.Span.Contains(originalToken.Span) Then
Microsoft.CodeAnalysis.VisualBasic.Workspaces (1)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\VisualBasic\Extensions\ContextQuery\SyntaxTokenExtensions.vb (1)
88If Not token.LeadingTrivia.Span.Contains(originalToken.Span) Then
Microsoft.CodeAnalysis.Workspaces (2)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Formatting\Engine\TokenStream.cs (2)
392Debug.Assert((token1.IndexInStream >= 0 && token2.IndexInStream >= 0) || token1.Token.Equals(token2.Token.GetPreviousToken(includeZeroWidth: true)) || token2.Token.LeadingTrivia.Span.Contains(token1.Token.Span)); 417Debug.Assert((token1.IndexInStream >= 0 && token2.IndexInStream >= 0) || token1.Token.Equals(token2.Token.GetPreviousToken(includeZeroWidth: true)) || token2.Token.LeadingTrivia.Span.Contains(token1.Token.Span));