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