129 references to IsEmpty
Microsoft.AspNetCore.App.Analyzers (1)
Infrastructure\VirtualChars\VirtualChar.cs (1)
77if (span.IsEmpty)
Microsoft.CodeAnalysis (2)
Text\CompositeText.cs (1)
515(nextSegment.Lines.Count == 2 && nextSegment.Lines[1].SpanIncludingLineBreak.IsEmpty));
Text\SourceText.cs (1)
780where !c.Span.IsEmpty || c.NewText?.Length > 0
Microsoft.CodeAnalysis.CodeStyle (22)
src\Analyzers\Core\Analyzers\FileHeaders\AbstractFileHeaderDiagnosticAnalyzer.cs (1)
51if (root.FullSpan.IsEmpty)
src\Analyzers\Core\Analyzers\Formatting\AbstractFormattingAnalyzer.cs (2)
64if (change.NewText.Length > 0 && !change.Span.IsEmpty) 90if (change.NewText.Length == 0 && change.Span.IsEmpty)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\EmbeddedLanguages\VirtualChars\VirtualChar.cs (1)
75if (span.IsEmpty)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\TextSpanExtensions.cs (1)
69if (except.IsEmpty)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Formatting\AbstractSyntaxFormatting.cs (2)
21private static readonly Func<TextSpan, bool> s_notEmpty = s => !s.IsEmpty; 38spansToFormat = node.FullSpan.IsEmpty ? [] : [node.FullSpan];
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Formatting\BottomUpBaseIndentationFinder.cs (1)
337if (operation.TextSpan.IsEmpty && operation.TextSpan.Start == position)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Formatting\Context\FormattingContext.cs (6)
184if (intervalTreeSpan.IsEmpty || 267if (operation.TextSpan.IsEmpty) 303if (operation.TextSpan.IsEmpty) 330if (operation.TextSpan.IsEmpty) 351if (operation.TextSpan.IsEmpty) 380if (operation.TextSpan.IsEmpty ||
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Formatting\Engine\TokenStream.cs (4)
511if (!token.FullSpan.IsEmpty) 519Debug.Assert(token.FullSpan.IsEmpty); 522if (!_tokens[i].FullSpan.IsEmpty) 537if (!_tokens[i].FullSpan.IsEmpty)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Services\SelectedMembers\AbstractSelectedMembers.cs (2)
65var token = textSpan.IsEmpty 117if (textSpan.IsEmpty)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\CommonFormattingHelpers.cs (1)
85Contract.ThrowIfTrue(textSpan.IsEmpty);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\StringBreaker.cs (1)
27if (span.IsEmpty)
Microsoft.CodeAnalysis.CodeStyle.Fixes (10)
src\Analyzers\Core\CodeFixes\GenerateDefaultConstructors\AbstractGenerateDefaultConstructorsService.cs (1)
36if (textSpan.IsEmpty)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeRefactorings\AbstractRefactoringHelpersService.cs (5)
28if (!allowEmptyNodes && node.Span.IsEmpty) 53if (selectionTrimmed.IsEmpty && !selectionRaw.IsEmpty) 72if (!selectionTrimmed.IsEmpty) 294tokenToLeft = tokenToLeft.Span.IsEmpty
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeRefactorings\CodeRefactoringHelpers.cs (4)
51if (selection.IsEmpty || node.Span.IsEmpty) 103/// Returns unchanged <paramref name="span"/> in case <see cref="TextSpan.IsEmpty"/>. 108if (span.IsEmpty)
Microsoft.CodeAnalysis.CSharp (2)
Compilation\CSharpSemanticModel.cs (1)
1328if (fullSpan.IsEmpty)
Symbols\Symbol.cs (1)
456wasZeroWidthMatch = loc.SourceSpan.IsEmpty && loc.SourceSpan.End == declarationSpan.Start;
Microsoft.CodeAnalysis.CSharp.CodeStyle (1)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Services\SyntaxFacts\CSharpSyntaxFacts.cs (1)
956if (node.Span.IsEmpty)
Microsoft.CodeAnalysis.CSharp.CodeStyle.Fixes (1)
src\Analyzers\CSharp\CodeFixes\UseCollectionExpression\CSharpCollectionExpressionRewriter.cs (1)
848return lineBreakSpan.IsEmpty
Microsoft.CodeAnalysis.CSharp.EditorFeatures (1)
StringCopyPaste\StringCopyPasteHelpers.cs (1)
547if (spans is [{ IsEmpty: true }])
Microsoft.CodeAnalysis.CSharp.EditorFeatures.UnitTests (3)
AddMissingImports\CSharpAddMissingImportsRefactoringProviderTests.cs (1)
34if (!pastedTextSpan.IsEmpty)
Classification\SemanticClassifierTests_TestMarkup.cs (1)
78if (!current.IsEmpty)
SplitStringLiteral\SplitStringLiteralCommandHandlerTests.cs (1)
82if (originalSelections.All(selection => selection.IsEmpty))
Microsoft.CodeAnalysis.CSharp.Features (10)
CodeRefactorings\SyncNamespace\CSharpChangeNamespaceService.cs (1)
348if (span.IsEmpty)
CodeRefactorings\SyncNamespace\CSharpSyncNamespaceCodeRefactoringProvider.cs (1)
31if (!span.IsEmpty)
EmbeddedLanguages\CSharpTestEmbeddedLanguageClassifier.cs (1)
240if (classifiedSpan.TextSpan.IsEmpty)
EncapsulateField\CSharpEncapsulateFieldService.cs (1)
136if (span.IsEmpty)
ExtractMethod\CSharpMethodExtractor.CSharpCodeGenerator.cs (2)
332if (statement is not LocalDeclarationStatementSyntax declarationStatement || declarationStatement.Declaration.Variables.FullSpan.IsEmpty) 654var usingKeyword = originalIdentifierToken.Parent?.Parent?.Parent is LocalDeclarationStatementSyntax { UsingKeyword.FullSpan.IsEmpty: false }
ExtractMethod\CSharpSelectionValidator.cs (1)
532if (textSpan.IsEmpty || textSpan.End == 0)
IntroduceVariable\CSharpIntroduceLocalForExpressionCodeRefactoringProvider.cs (1)
46if (span.IsEmpty &&
SignatureHelp\LightweightOverloadResolution.cs (1)
236=> expression.Span.IsEmpty;
src\Analyzers\CSharp\CodeFixes\UseCollectionExpression\CSharpCollectionExpressionRewriter.cs (1)
848return lineBreakSpan.IsEmpty
Microsoft.CodeAnalysis.CSharp.Semantic.UnitTests (1)
SourceGeneration\GeneratorDriverTests.cs (1)
1265if (l.IsEmpty)
Microsoft.CodeAnalysis.CSharp.Workspaces (2)
Classification\SyntaxClassification\OperatorOverloadSyntaxClassifier.cs (1)
42if (operatorSpan.IsEmpty || !operatorSpan.IntersectsWith(textSpan))
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Services\SyntaxFacts\CSharpSyntaxFacts.cs (1)
956if (node.Span.IsEmpty)
Microsoft.CodeAnalysis.EditorFeatures (3)
BracePairs\BracePairsTaggerProvider.cs (1)
76=> span.IsEmpty ? null : span.ToSnapshotSpan(snapshot);
CommentSelection\AbstractToggleBlockCommentBase.cs (2)
137if (blockCommentSelection.SelectedSpan.IsEmpty 175if (spanToAdd.IsEmpty)
Microsoft.CodeAnalysis.EditorFeatures.Test.Utilities (2)
AbstractCommandHandlerTestState.cs (2)
77var cursorDocument = Workspace.Documents.First(d => d.CursorPosition.HasValue || d.SelectedSpans.Any(ss => ss.IsEmpty)); 81var cursorPosition = cursorDocument.CursorPosition ?? cursorDocument.SelectedSpans.First(ss => ss.IsEmpty).Start;
Microsoft.CodeAnalysis.EditorFeatures2.UnitTests (1)
PasteTracking\PasteTrackingTestState.vb (1)
89If (textSpan.IsEmpty) Then
Microsoft.CodeAnalysis.Features (17)
CodeRefactorings\AddMissingImports\AbstractAddMissingImportsFeatureService.cs (1)
135var orderedTextInserts = allTextChanges.Where(change => change.Span.IsEmpty)
Diagnostics\Analyzers\UnboundIdentifiersDiagnosticAnalyzerBase.cs (1)
69var typeNames = member.DescendantNodes().Where(n => IsQualifiedOrSimpleName(n) && !n.Span.IsEmpty);
EditAndContinue\AbstractEditAndContinueAnalyzer.cs (2)
2221if (rudeEditSpan.IsEmpty) 4963span ??= diagnosticSpan.IsEmpty
EncapsulateField\AbstractEncapsulateFieldService.cs (1)
70if (span.IsEmpty)
ExtractMethod\AbstractSyntaxTriviaService.cs (1)
30Contract.ThrowIfTrue(textSpan.IsEmpty);
GenerateConstructors\AbstractGenerateConstructorsCodeRefactoringProvider.cs (1)
172else if (textSpan.IsEmpty)
IntroduceVariable\AbstractIntroduceVariableService.State.cs (1)
113if (!CanIntroduceVariable(textSpan.IsEmpty, cancellationToken))
SolutionCrawler\AbstractDocumentDifferenceService.cs (1)
163if (oldMember.Span.IsEmpty)
src\Analyzers\Core\Analyzers\FileHeaders\AbstractFileHeaderDiagnosticAnalyzer.cs (1)
51if (root.FullSpan.IsEmpty)
src\Analyzers\Core\Analyzers\Formatting\AbstractFormattingAnalyzer.cs (2)
64if (change.NewText.Length > 0 && !change.Span.IsEmpty) 90if (change.NewText.Length == 0 && change.Span.IsEmpty)
src\Analyzers\Core\CodeFixes\GenerateDefaultConstructors\AbstractGenerateDefaultConstructorsService.cs (1)
36if (textSpan.IsEmpty)
Wrapping\AbstractWrapper.cs (1)
49if (item == null || item.Span.IsEmpty || item.IsMissing)
Wrapping\SeparatedSyntaxList\AbstractSeparatedSyntaxListWrapper.cs (3)
56if (listSyntax == null || listSyntax.Span.IsEmpty) 62if (firstToken.IsMissing || lastToken.IsMissing || firstToken.Span.IsEmpty || lastToken.Span.IsEmpty)
Microsoft.CodeAnalysis.UnitTests (2)
Text\TextSpanTest.cs (2)
94Assert.True(span.IsEmpty); 105Assert.False(span.IsEmpty);
Microsoft.CodeAnalysis.VisualBasic (2)
CommandLine\CommandLineDiagnosticFormatter.vb (2)
66If sourceSpan.IsEmpty AndAlso line.Start = sourceSpanEnd AndAlso linenumber > 0 Then 90If sourceSpan.IsEmpty Then
Microsoft.CodeAnalysis.VisualBasic.CodeStyle (1)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\VisualBasic\Services\SyntaxFacts\VisualBasicSyntaxFacts.vb (1)
877If innerSpan.IsEmpty Then
Microsoft.CodeAnalysis.VisualBasic.Features (5)
CodeRefactorings\NodeSelectionHelpers.vb (1)
18If span.IsEmpty Then
EncapsulateField\VisualBasicEncapsulateFieldService.vb (1)
79If span.IsEmpty Then
ExtractMethod\VisualBasicSelectionValidator.vb (1)
636If textSpan.IsEmpty OrElse textSpan.End = 0 Then
Highlighting\KeywordHighlightingHelpers.vb (1)
87If Not previousToken.Span.IsEmpty Then
IntroduceVariable\VisualBasicIntroduceLocalForExpressionCodeRefactoringProvider.vb (1)
32If span.IsEmpty AndAlso expressionStatement.Expression.IsKind(SyntaxKind.IdentifierName) Then
Microsoft.CodeAnalysis.VisualBasic.Semantic.UnitTests (1)
SourceGeneration\GeneratorDriverTests.vb (1)
672If location.IsEmpty Then
Microsoft.CodeAnalysis.VisualBasic.Syntax.UnitTests (1)
Parser\ParseExpression.vb (1)
250Assert.True(exp.TypeArgumentList.CloseParenToken.Span.IsEmpty)
Microsoft.CodeAnalysis.VisualBasic.Workspaces (2)
Classification\SyntaxClassification\OperatorOverloadSyntaxClassifier.vb (1)
36If operatorSpan.IsEmpty OrElse Not operatorSpan.IntersectsWith(textSpan) Then
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\VisualBasic\Services\SyntaxFacts\VisualBasicSyntaxFacts.vb (1)
877If innerSpan.IsEmpty Then
Microsoft.CodeAnalysis.Workspaces (35)
Classification\ClassifierHelper.cs (2)
247if (!getSpan(part).IsEmpty) 263if (syntacticPartSpan.IsEmpty)
CodeFixes\FixAllOccurrences\TextChangeMerger.cs (1)
148=> change.Span.IsEmpty;
LanguageServices\FixAllSpanMappingService\AbstractFixAllSpanMappingService.cs (1)
90if (span.IsEmpty)
ObsoleteSymbol\AbstractObsoleteSymbolService.cs (3)
114if (!aliasToken.Span.IsEmpty) 127if (!creationKeyword.Span.IsEmpty) 143if (!creationKeyword.Span.IsEmpty)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\EmbeddedLanguages\VirtualChars\VirtualChar.cs (1)
75if (span.IsEmpty)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\TextSpanExtensions.cs (1)
69if (except.IsEmpty)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Formatting\AbstractSyntaxFormatting.cs (2)
21private static readonly Func<TextSpan, bool> s_notEmpty = s => !s.IsEmpty; 38spansToFormat = node.FullSpan.IsEmpty ? [] : [node.FullSpan];
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Formatting\BottomUpBaseIndentationFinder.cs (1)
337if (operation.TextSpan.IsEmpty && operation.TextSpan.Start == position)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Formatting\Context\FormattingContext.cs (6)
184if (intervalTreeSpan.IsEmpty || 267if (operation.TextSpan.IsEmpty) 303if (operation.TextSpan.IsEmpty) 330if (operation.TextSpan.IsEmpty) 351if (operation.TextSpan.IsEmpty) 380if (operation.TextSpan.IsEmpty ||
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Formatting\Engine\TokenStream.cs (4)
511if (!token.FullSpan.IsEmpty) 519Debug.Assert(token.FullSpan.IsEmpty); 522if (!_tokens[i].FullSpan.IsEmpty) 537if (!_tokens[i].FullSpan.IsEmpty)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Services\SelectedMembers\AbstractSelectedMembers.cs (2)
65var token = textSpan.IsEmpty 117if (textSpan.IsEmpty)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\CommonFormattingHelpers.cs (1)
85Contract.ThrowIfTrue(textSpan.IsEmpty);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\StringBreaker.cs (1)
27if (span.IsEmpty)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeRefactorings\AbstractRefactoringHelpersService.cs (5)
28if (!allowEmptyNodes && node.Span.IsEmpty) 53if (selectionTrimmed.IsEmpty && !selectionRaw.IsEmpty) 72if (!selectionTrimmed.IsEmpty) 294tokenToLeft = tokenToLeft.Span.IsEmpty
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeRefactorings\CodeRefactoringHelpers.cs (4)
51if (selection.IsEmpty || node.Span.IsEmpty) 103/// Returns unchanged <paramref name="span"/> in case <see cref="TextSpan.IsEmpty"/>. 108if (span.IsEmpty)
Microsoft.VisualStudio.LanguageServices (1)
Venus\ContainedDocument.cs (1)
877if (visibleTextSpan.IsEmpty)