Compilation\SyntaxTreeSemanticModel.cs (10)
769return ((CSharpSyntaxTree)speculativeSyntax.SyntaxTree).IsNullableAnalysisEnabled(speculativeSyntax.Span) ??
844var span = node.Span;
1344var symbol = (NamespaceSymbol)GetDeclaredMember(container, declarationSyntax.Span, declarationSyntax.Name);
1407return GetDeclaredMember(container, declarationSyntax.Span, name) as NamedTypeSymbol;
1596return (this.GetDeclaredMember(container, declarationSyntax.Span) as MethodSymbol).GetPublicSymbol();
1619return (this.GetDeclaredMember(container, declarationSyntax.Span) as MethodSymbol).GetPublicSymbol();
1830var result = this.GetDeclaredMember(container, declarationSyntax.Span, declarationSyntax.Identifier.ValueText);
1923if (alias.Alias.Locations[0].SourceSpan == declarationSyntax.Alias.Name.Span)
2175if (location.SourceTree == this.SyntaxTree && parameter.Span.Contains(location.SourceSpan))
2346return this.GetDeclaredMember(container, declarationSyntax.Span, name);
CodeRefactorings\ConvertLocalFunctionToMethod\CSharpConvertLocalFunctionToMethodCodeRefactoringProvider.cs (1)
73localFunction.Span);
CodeRefactorings\UseExplicitOrImplicitType\AbstractUseTypeCodeRefactoringProvider.cs (1)
73declaredType.Span);
EditAndContinue\CSharpEditAndContinueAnalyzer.cs (34)
442Debug.Assert(position == switchExpression.Span.Start);
498ForEachPart.Expression => node.Expression.Span,
506ForEachPart.VariableDeclaration => TextSpan.FromBounds(node.Variable.SpanStart, node.Variable.Span.End),
508ForEachPart.Expression => node.Expression.Span,
515SwitchExpressionPart.WholeExpression => node.Span,
794return unit.Members.OfType<GlobalStatementSyntax>().LastOrDefault()?.Span ?? default;
902span = ((SwitchExpressionArmSyntax)node).Expression.Span;
1589=> TryGetDiagnosticSpanImpl(node, editKind) ?? node.Span;
1603return node.Span;
1607return node.Span;
1612return TextSpan.FromBounds(ns.NamespaceKeyword.SpanStart, ns.Name.Span.End);
1643return node.Span;
1678return node.Span;
1691return TextSpan.FromBounds(constraint.WhereKeyword.SpanStart, constraint.Constraints.Last().Span.End);
1707return node.Span;
1718return attributeList.Span;
1721return node.Span;
1758return node.Span;
1773(switchStatement.CloseParenToken != default) ? switchStatement.CloseParenToken.Span.End : switchStatement.Expression.Span.End);
1776return ((SwitchSectionSyntax)node).Labels.Last().Span;
1821return node.Span;
1825return CombineSpans(localDeclarationStatement.AwaitKeyword.Span, localDeclarationStatement.UsingKeyword.Span, node.Span);
1834return ((ParenthesizedLambdaExpressionSyntax)node).ParameterList.Span;
1837return ((SimpleLambdaExpressionSyntax)node).Parameter.Span;
1872return node.Span;
1891return node.Span;
1928return lambda.Span;
2657return tryStatement.Finally.Span;
2663? tryStatement.Finally.Span.End
2664: tryStatement.Catches.Last().Span.End);
2668return node.Span;
2673return tryStatement.Span;
2715diagnostics.Add(new RudeEditDiagnostic(RudeEditKind.AwaitStatementUpdate, newContainingStatementPart.Span));
3001AddAroundActiveStatementRudeDiagnostic(diagnostics, oldCheckedStatement, newCheckedStatement, newActiveStatement.Span);
InvokeDelegateWithConditionalAccessAnalyzer.cs (7)
134Location.Create(tree, ifStatement.Span),
135Location.Create(tree, expressionStatement.Span));
200if (nextToken.Span.Start < ifStatement.Span.End)
202fadeLocation = Location.Create(tree, TextSpan.FromBounds(nextToken.Span.Start, ifStatement.Span.End));
321Location.Create(tree, localDeclarationStatement.Span),
322Location.Create(tree, ifStatement.Span),
323Location.Create(tree, expressionStatement.Span));
Workspace\LanguageServices\CSharpSyntaxTreeFactoryService.NodeSyntaxReference.cs (1)
26=> _node.Span;
ConvertAutoPropertyToFullProperty\AbstractConvertAutoPropertyToFullPropertyCodeRefactoringProvider.cs (1)
54property.Span);
ConvertCast\AbstractConvertCastCodeRefactoringProvider.cs (1)
64from.Span);
ConvertToInterpolatedString\AbstractConvertConcatenationToInterpolatedStringRefactoringProvider.cs (1)
113top.Span);
ConvertToInterpolatedString\AbstractConvertPlaceholderToInterpolatedStringRefactoringProvider.cs (1)
111invocation.Span);
EditAndContinue\AbstractEditAndContinueAnalyzer.cs (15)
163Debug.Assert(root.Span.Contains(bodyOrMatchRoot.Span));
300=> TryGetDiagnosticSpan(node, editKind) ?? node.Span;
309return node.Span;
1325if (!bodyMatch.NewRoot.Span.Contains(newStatementSyntaxSpan.Start))
1493ReportMemberBodyUpdateRudeEdits(diagnostics, match.NewRoot, match.NewRoot.Span);
1630if (TryGetActiveSpan(statement, statementPart, minLength: statement.Span.Length, out var span))
1641return node.Span;
1652return statement.Span;
2214triviaEdits.Add((segment.oldNode, segment.newNode, segment.newNode.Span));
4715syntax.Span,
4970(accumulate, node) => (node.SpanStart < accumulate.min) ? (node.SpanStart, node.Span) : accumulate).span;
5279diagnostics.Add(new RudeEditDiagnostic(rudeEdit, useSite.Span, null, arguments));
5454errorSpan = GetVariableUseSites(GetLambdaBodyExpressionsAndStatements(lambdaBody), captures[i], model, cancellationToken).First().Span;
5813newCaptureNode.Span,
MoveDeclarationNearReference\AbstractMoveDeclarationNearReferenceCodeRefactoringProvider.cs (1)
51declaration.Span);
NameTupleElement\AbstractNameTupleElementCodeRefactoringProvider.cs (1)
38argument.Span);
EditAndContinue\VisualBasicEditAndContinueAnalyzer.vb (38)
390Return (declaration.Span, Nothing)
397Return (TextSpan.FromBounds(propertyStatement.Identifier.Span.Start, propertyStatement.Initializer.Span.End), Nothing)
401Return (TextSpan.FromBounds(propertyStatement.Identifier.Span.Start, propertyStatement.AsClause.Span.End), Nothing)
420Return (variableDeclarator.Span, Nothing)
425Return (variableDeclarator.Span, Nothing)
431Return (variableDeclarator.Span, Nothing)
445Return (envelope:=TextSpan.FromBounds(declaration.Span.Start, asNewClause.NewExpression.Span.End),
446hole:=TextSpan.FromBounds(declaration.Span.End, asNewClause.NewExpression.Span.Start))
453Return (declaration.Span, Nothing)
588While node.Span.Length < span.Length AndAlso node.Parent.SpanStart = position
1434Return DirectCast(model.GetEnclosingSymbol(lambdaExpressionSyntax.SubOrFunctionHeader.Span.End, cancellationToken), IMethodSymbol)
1504Return If(TryGetDiagnosticSpanImpl(node, editKind), node.Span)
1523Return node.Span
1599Return node.Span
1611Return node.Span
1616Return node.Span
1653Return DirectCast(node, SyncLockBlockSyntax).SyncLockStatement.Span
1656Return DirectCast(node, WithBlockSyntax).WithStatement.Span
1659Return DirectCast(node, UsingBlockSyntax).UsingStatement.Span
1666Return DirectCast(node, DoLoopBlockSyntax).DoStatement.Span
1669Return DirectCast(node, WhileBlockSyntax).WhileStatement.Span
1673Return DirectCast(node, ForOrForEachBlockSyntax).ForOrForEachStatement.Span
1687Return DirectCast(node, LambdaExpressionSyntax).SubOrFunctionHeader.Span
1718Return node.Span
1731Return node.Span
1737Return node.Span
1743If(thenKeywordOpt.RawKind <> 0, thenKeywordOpt.Span.End, condition.Span.End))
1747Return TextSpan.FromBounds(node.NamespaceKeyword.SpanStart, node.Name.Span.End)
1844Return DirectCast(lambda, LambdaExpressionSyntax).SubOrFunctionHeader.ParameterList.Parameters(ordinal).Identifier.Span
1847Return lambda.Span
2613Return TextSpan.FromBounds(tryBlock.FinallyBlock.SpanStart, tryBlock.EndTryStatement.Span.End)
2616Return TextSpan.FromBounds(tryBlock.CatchBlocks.First().SpanStart, tryBlock.EndTryStatement.Span.End)
2620Return node.Span
2624Return DirectCast(node.Parent, TryBlockSyntax).Span
2664diagnostics.Add(New RudeEditDiagnostic(RudeEditKind.AwaitStatementUpdate, newContainingStatementPart.Span))
2773AddAroundActiveStatementRudeDiagnostic(diagnostics, oldActiveStatement, onErrorOrResumeStatement, newActiveStatement.Span)
Structure\Providers\CollectionInitializerStructureProvider.vb (1)
40node.Span.End)
LanguageServices\DeclaredSymbolFactoryService\AbstractDeclaredSymbolInfoFactoryService.cs (1)
317nameSyntax.Span,