363 references to SpanStart
Microsoft.CodeAnalysis.VisualBasic (36)
Binding\Binder_Expressions.vb (1)
2990
node.
SpanStart
< localSymbol.IdentifierToken.SpanStart Then
Binding\Binder_Imports.vb (3)
140
data.AddAlias(binder.GetSyntaxReference(aliasImportSyntax), aliasText, aliasSymbol, aliasImportSyntax.
SpanStart
, dependenciesBag)
209
data.AddMember(binder.GetSyntaxReference(importsName), importedSymbol, membersImportsSyntax.
SpanStart
, dependenciesBag, binder.BindingLocation = BindingLocation.ProjectImportsDeclaration)
246
data.XmlNamespaces.Add(prefix, New XmlNamespaceAndImportsClausePosition(namespaceName, syntax.
SpanStart
, reference))
Binding\BinderFactory.vb (6)
65
Return GetBinderForNodeAndUsage(node, NodeUsage.NamespaceBlockInterior, node.Parent, node.
SpanStart
)
73
Return GetBinderForNodeAndUsage(node, NodeUsage.TypeBlockFull, parentForEnclosingBinder, node.
SpanStart
)
81
Return GetBinderForNodeAndUsage(node, NodeUsage.EnumBlockFull, parentForEnclosingBinder, node.
SpanStart
)
86
Return GetBinderForNodeAndUsage(node, NodeUsage.DelegateDeclaration, node.Parent, node.
SpanStart
)
509
Return GetBinderAtOrAbove(parent, parent.
SpanStart
)
512
Dim containingBinder As Binder = GetBinderAtOrAbove(nodeForOuterBinder, parent.
SpanStart
)
Binding\ExecutableCodeBinder.vb (1)
216
Dim position = node.
SpanStart
Binding\MemberSemanticModel.vb (2)
1527
If SyntaxFacts.InSpanOrEffectiveTrailingOfNode(item, position) OrElse position < item.
SpanStart
Then
1561
If SyntaxFacts.InSpanOrEffectiveTrailingOfNode(item, position) OrElse position < item.
SpanStart
Then
Compilation\DocumentationComments\DocumentationCommentCompiler.Common.vb (2)
268
Return If(Me.Node.
SpanStart
> other.Node.
SpanStart
, 1, -1)
Compilation\SemanticModel.vb (3)
2384
Dim binder As Binder = Me.GetEnclosingBinder(identifierSyntax.
SpanStart
)
2526
Dim binder = TryCast(StripSemanticModelBinder(Me.GetEnclosingBinder(declarationSyntax.
SpanStart
)), BlockBaseBinder)
2710
Dim enclosingBinder = StripSemanticModelBinder(Me.GetEnclosingBinder(declarationSyntax.
SpanStart
))
Compilation\SyntaxTreeSemanticModel.vb (9)
271
Dim binder As Binder = GetEnclosingBinder(node.
SpanStart
)
459
Dim binder As Binder = GetEnclosingBinder(expression.
SpanStart
)
597
Dim docCommentBinder = Me._binderFactory.GetBinderForPosition(node, node.
SpanStart
)
707
Dim binder As Binder = GetEnclosingBinder(memberName.
SpanStart
)
763
Dim binder As Binder = GetEnclosingBinder(handlesClause.
SpanStart
)
1337
Dim binder As Binder = GetEnclosingBinder(declarationSyntax.
SpanStart
)
1786
If firstStatement.
SpanStart
> lastStatement.
SpanStart
Then
1907
Dim region As TextSpan = TextSpan.FromBounds(firstStatement.
SpanStart
, lastStatement.Span.End)
Lowering\Instrumentation\DebugInfoInjector.vb (2)
125
sequencePointSpan = TextSpan.FromBounds(aggregateClause.
SpanStart
,
128
sequencePointSpan = TextSpan.FromBounds(aggregateClause.
SpanStart
,
Symbols\LexicalSortKey.vb (1)
139
Me.New(node.SyntaxTree, node.
SpanStart
, compilation)
Symbols\Source\SourceMethodSymbol.vb (1)
1210
If localPosition = block.BlockStatement.
SpanStart
Then
Syntax\LambdaUtilities.vb (2)
290
If rangeVariable.
SpanStart
< groupByClause.ByKeyword.SpanStart OrElse
291
(rangeVariable.
SpanStart
= groupByClause.ByKeyword.SpanStart AndAlso rangeVariable Is groupByClause.Items.Last) Then
Syntax\SyntaxFacts.vb (1)
269
beforeEnd = (position < multiLineLambda.EndSubOrFunctionStatement.
SpanStart
)
Syntax\VisualBasicLineDirectiveMap.vb (1)
34
Dim directiveLineNumber As Integer = sourceText.Lines.IndexOf(directive.
SpanStart
) + 1
Syntax\VisualBasicSyntaxTree.ConditionalSymbolsMap.vb (1)
132
ProcessConditionalSymbolDefinition(name, newPreprocessorSymbols(name), directive.
SpanStart
)
Microsoft.CodeAnalysis.VisualBasic.CodeStyle (23)
CastAnalyzer.vb (4)
213
castExpressionType = _semanticModel.GetSpeculativeTypeInfo(_castExpressionNode.
SpanStart
, _castExpressionNode, SpeculativeBindingOption.BindAsExpression).ConvertedType
239
Dim expressionToCastType = _semanticModel.ClassifyConversion(_castNode.
SpanStart
, _castExpressionNode, castType)
254
Dim castToOuterType As Conversion = _semanticModel.ClassifyConversion(_castNode.
SpanStart
, _castNode, outerType)
277
expressionToOuterType = _semanticModel.ClassifyConversion(_castNode.
SpanStart
, _castExpressionNode, outerType)
DirectiveSyntaxEqualityComparer.vb (3)
17
Return x.
SpanStart
= y.
SpanStart
21
Return obj.
SpanStart
DirectiveWalker.vb (2)
86
condDirectives.Sort(Function(n1, n2) n1.
SpanStart
.CompareTo(n2.
SpanStart
))
SemanticModelExtensions.vb (3)
67
semanticModel.LookupNamespacesAndTypes(expr.
SpanStart
, container:=symbol, name:=name),
68
semanticModel.LookupSymbols(expr.
SpanStart
, container:=symbol, name:=name))
116
Dim containingType = semanticModel.GetEnclosingNamedType(type.
SpanStart
, cancellationToken)
StatementSyntaxExtensions.vb (4)
692
Dim outerStatement = statement.GetAncestors(Of StatementSyntax)().Where(Function(s) s.
SpanStart
<> statement.
SpanStart
).FirstOrDefault()
715
Dim outerStatement = statement.GetAncestors(Of StatementSyntax)().Where(Function(s) s.
SpanStart
<> statement.
SpanStart
).FirstOrDefault()
SyntaxNodeExtensions.vb (3)
424
If Not textSpan.Contains(directives(0).
SpanStart
) OrElse
425
Not textSpan.Contains(directives(directives.Count - 1).
SpanStart
) Then
914
Dim blockSpan = TextSpan.FromBounds(block.BlockStatement.Span.End, block.EndBlockStatement.
SpanStart
)
SyntaxTreeExtensions.vb (1)
363
syntaxTree.GetText(cancellationToken).Lines.IndexOf(statement.
SpanStart
) = lineNumber Then
VisualBasicSyntaxFacts.vb (1)
817
Return TextSpan.FromBounds(spanStart, method.EndBlockStatement.
SpanStart
)
VisualBasicUseInferredMemberNameDiagnosticAnalyzer.vb (2)
52
Dim fadeSpan = TextSpan.FromBounds(nameColonEquals.Name.
SpanStart
, nameColonEquals.ColonEqualsToken.Span.End)
72
Dim fadeSpan = TextSpan.FromBounds(fieldInitializer.Name.
SpanStart
, fieldInitializer.EqualsToken.Span.End)
Microsoft.CodeAnalysis.VisualBasic.CodeStyle.Fixes (3)
CompilationUnitSyntaxExtensions.vb (1)
29
Dim start = root.Imports.First.
SpanStart
SpecialFormattingOperation.vb (1)
131
Dim lineNumber = sourceText.Lines.GetLineFromPosition(argument.
SpanStart
).LineNumber
TypeBlockSyntaxExtensions.vb (1)
20
Dim [end] = destination.EndBlockStatement.
SpanStart
Microsoft.CodeAnalysis.VisualBasic.EditorFeatures (38)
EndConstructGeneration\EndConstructStatementVisitor.vb (18)
38
Dim aligningWhitespace = _subjectBuffer.CurrentSnapshot.GetAligningWhitespace(node.
SpanStart
)
49
Dim aligningWhitespace = _subjectBuffer.CurrentSnapshot.GetAligningWhitespace(node.
SpanStart
)
82
Dim aligningWhitespace = _subjectBuffer.CurrentSnapshot.GetAligningWhitespace(forStatement.
SpanStart
)
96
Dim aligningWhitespace = _subjectBuffer.CurrentSnapshot.GetAligningWhitespace(methodBlock.BlockStatement.
SpanStart
)
108
Dim aligningWhitespace = _subjectBuffer.CurrentSnapshot.GetAligningWhitespace(methodBlock.BlockStatement.
SpanStart
)
150
Dim aligningWhitespace = _subjectBuffer.CurrentSnapshot.GetAligningWhitespace(node.
SpanStart
)
161
Dim aligningWhitespace = _subjectBuffer.CurrentSnapshot.GetAligningWhitespace(node.
SpanStart
)
180
Dim aligningWhitespace = _subjectBuffer.CurrentSnapshot.GetAligningWhitespace(node.
SpanStart
)
191
Dim aligningWhitespace = _subjectBuffer.CurrentSnapshot.GetAligningWhitespace(node.
SpanStart
)
202
Dim aligningWhitespace = _subjectBuffer.CurrentSnapshot.GetAligningWhitespace(node.
SpanStart
)
213
Dim aligningWhitespace = _subjectBuffer.CurrentSnapshot.GetAligningWhitespace(node.
SpanStart
)
224
Dim aligningWhitespace = _subjectBuffer.CurrentSnapshot.GetAligningWhitespace(node.
SpanStart
)
235
Dim aligningWhitespace = _subjectBuffer.CurrentSnapshot.GetAligningWhitespace(node.
SpanStart
)
246
Dim aligningWhitespace = _subjectBuffer.CurrentSnapshot.GetAligningWhitespace(node.
SpanStart
)
257
Dim aligningWhitespace = _subjectBuffer.CurrentSnapshot.GetAligningWhitespace(node.
SpanStart
)
268
Dim aligningWhitespace = _subjectBuffer.CurrentSnapshot.GetAligningWhitespace(node.
SpanStart
)
289
Where(Function(d) d.
SpanStart
<= directive.
SpanStart
)
EndConstructGeneration\EndConstructStatementVisitor_CustomEvents.vb (4)
33
Dim aligningWhitespace = _subjectBuffer.CurrentSnapshot.GetAligningWhitespace(node.
SpanStart
)
41
Dim position As Integer = eventStatement.
SpanStart
54
Function(p) p.ToMinimalDisplayString(_state.SemanticModel, eventStatement.
SpanStart
))
58
Dim aligningWhitespace = _subjectBuffer.CurrentSnapshot.GetAligningWhitespace(eventStatement.
SpanStart
) & " "
EndConstructGeneration\EndConstructStatementVisitor_IfStatement.vb (3)
15
Dim aligningWhitespace = _subjectBuffer.CurrentSnapshot.GetAligningWhitespace(node.
SpanStart
)
23
Dim aligningWhitespace = _subjectBuffer.CurrentSnapshot.GetAligningWhitespace(node.
SpanStart
)
48
Dim position = If(ifBlock.Statements.Any(), ifBlock.Statements(0).
SpanStart
, ifBlock.IfStatement.Span.End + _state.NewLineCharacter.Length)
EndConstructGeneration\EndConstructStatementVisitor_LambdaHeader.vb (4)
28
Dim aligningWhitespace = _subjectBuffer.CurrentSnapshot.GetAligningWhitespace(originalNode.
SpanStart
)
71
If(newBodyHasCode, CType(newExpression.Statements.First().
SpanStart
, Integer?), Nothing))
80
Return CreateSpitLinesForLambdaHeader(node.SubOrFunctionHeader, isNextToXmlEmbeddedExpression, originalNode.
SpanStart
)
135
Dim spanStart As Integer = If(originalNodeSpanStart.HasValue, originalNodeSpanStart.Value, node.
SpanStart
)
EndConstructGeneration\EndConstructStatementVisitor_Properties.vb (5)
54
Dim aligningWhitespace = _subjectBuffer.CurrentSnapshot.GetAligningWhitespace(node.
SpanStart
)
74
Dim accessorAligningWhitespace = _subjectBuffer.CurrentSnapshot.GetAligningWhitespace(node.
SpanStart
)
111
lines.Add(_subjectBuffer.CurrentSnapshot.GetAligningWhitespace(propertyBlock.
SpanStart
) & "End Property")
151
Dim aligningWhitespace = snapshot.GetAligningWhitespace(propertyDeclaration.
SpanStart
) & " "
183
Dim aligningWhitespace = snapshot.GetAligningWhitespace(propertyDeclaration.
SpanStart
) & " "
EndConstructGeneration\VisualBasicEndConstructGenerationService.vb (1)
205
element.EndTag IsNot Nothing AndAlso element.EndTag.
SpanStart
= state.CaretPosition Then
LineCommit\CommitBufferManager.vb (2)
195
formattingInfo.UseSemantics = finalSpanStart <= startingStatementInfo.MatchingBlockConstruct.
SpanStart
197
finalSpanStart = Math.Min(finalSpanStart, startingStatementInfo.MatchingBlockConstruct.
SpanStart
)
Utilities\NavigationPointHelpers.vb (1)
38
Return eventBlock.EventStatement.
SpanStart
Microsoft.CodeAnalysis.VisualBasic.EditorFeatures.UnitTests (4)
EditAndContinue\SyntaxUtilitiesTests.vb (2)
67
Dim leftPosition = leftRoot.DescendantNodes().OfType(Of LiteralExpressionSyntax).ElementAt(2).
SpanStart
'0 within Console.WriteLine(0)
108
Dim leftPosition = leftRoot.DescendantNodes().OfType(Of LiteralExpressionSyntax).ElementAt(5).
SpanStart
'3 within Console.WriteLine(3)
TypeInferrer\TypeInferrerTests.vb (2)
25
typeInference.InferType(Await document.ReuseExistingSpeculativeModelAsync(node.
SpanStart
, CancellationToken.None), node.
SpanStart
, objectAsDefault:=True, cancellationToken:=CancellationToken.None),
Microsoft.CodeAnalysis.VisualBasic.Emit.UnitTests (3)
CodeGen\CodeGenTuples.vb (3)
16261
Dim m1Tuple = DirectCast(model.LookupSymbols(node.
SpanStart
, name:="v1").OfType(Of LocalSymbol)().Single().Type, NamedTypeSymbol)
16262
Dim m2Tuple = DirectCast(model.LookupSymbols(node.
SpanStart
, name:="v2").OfType(Of LocalSymbol)().Single().Type, NamedTypeSymbol)
16263
Dim m6Tuple = DirectCast(model.LookupSymbols(node.
SpanStart
, name:="v6").OfType(Of LocalSymbol)().Single().Type, NamedTypeSymbol)
Microsoft.CodeAnalysis.VisualBasic.Features (74)
CodeFixes\GenerateEvent\GenerateEventCodeFixProvider.vb (3)
92
Dim containingSymbol = semanticModel.GetEnclosingNamedType(handlerStatement.
SpanStart
, cancellationToken)
333
Dim containingSymbol = semanticModel.GetEnclosingNamedType(handlesClauseItem.
SpanStart
, cancellationToken)
370
If semanticModel.LookupSymbols(handlesClauseItem.
SpanStart
, container:=targetType, name:=handlesClauseItem.EventMember.Identifier.ValueText).
CodeFixes\IncorrectExitContinue\IncorrectExitContinueCodeFixProvider.vb (2)
113
If tokenAfterContinueToken.IsSkipped() AndAlso text.Lines.IndexOf(tokenAfterContinueToken.SpanStart) = text.Lines.IndexOf(continueStatement.
SpanStart
) Then
145
If tokenAfterExitToken.IsSkipped() AndAlso text.Lines.IndexOf(tokenAfterExitToken.SpanStart) = text.Lines.IndexOf(exitStatement.
SpanStart
) Then
CodeFixes\MoveToTopOfFile\MoveToTopOfFileCodeFixProvider.vb (3)
68
If DeclarationsExistAfterImports(node, compilationUnit) OrElse compilationUnit.Attributes.Any(Function(a) a.
SpanStart
< node.
SpanStart
) Then
97
node.Span.End > m.
SpanStart
)
CodeRefactorings\InlineTemporary\VisualBasicInlineTemporaryCodeRefactoringProvider.vb (3)
76
If identifier.
SpanStart
< definition.
SpanStart
Then
396
modifiedIdentifier.
SpanStart
,
CodeRefactorings\VisualBasicRefactoringHelpersService.vb (1)
50
If position < member.
SpanStart
Then
Completion\KeywordRecommenders\Declarations\ImportsKeywordRecommender.vb (1)
33
If context.Position <= compilationUnit.Options.First().
SpanStart
Then
Completion\KeywordRecommenders\Declarations\OfKeywordRecommender.vb (1)
108
position:=type.
SpanStart
,
Completion\KeywordRecommenders\Expressions\BinaryOperatorKeywordRecommender.vb (1)
149
If context.SyntaxTree.IsExpressionContext(e.
SpanStart
, cancellationToken, context.SemanticModel) Then
Completion\KeywordRecommenders\Statements\CaseKeywordRecommender.vb (2)
41
If caseElseBlock Is Nothing OrElse targetToken.SpanStart < caseElseBlock.
SpanStart
Then
48
If caseElseBlock Is Nothing AndAlso (lastBlock Is Nothing OrElse targetToken.SpanStart > lastBlock.
SpanStart
) Then
Completion\KeywordRecommenders\Statements\FinallyKeywordRecommender.vb (2)
43
If TextSpan.FromBounds(tryBlock.CatchBlocks.Last().
SpanStart
, tryBlock.EndTryStatement.
SpanStart
).Contains(context.Position) Then
Completion\KeywordRecommenders\Statements\IsKeywordRecommender.vb (1)
33
If caseElseBlock Is Nothing OrElse targetToken.SpanStart < caseElseBlock.
SpanStart
Then
Debugging\DataTipInfoGetter.vb (1)
54
span = TextSpan.FromBounds(conditionalAccess.
SpanStart
, span.End)
Debugging\LocationInfoGetter.vb (1)
44
Dim memberLine = text.Lines.GetLineFromPosition(memberDeclaration.GetMemberBlockBegin().
SpanStart
).LineNumber
Debugging\ProximityExpressionsGetter.vb (1)
83
If statement IsNot Nothing AndAlso position < statement.
SpanStart
Then
Debugging\ProximityExpressionsGetter.Worker.vb (1)
89
While nextStatement IsNot Nothing AndAlso _syntaxTree.GetText(cancellationToken).Lines.IndexOf(nextStatement.
SpanStart
) = line
Debugging\VisualBasicBreakpointService.vb (1)
57
position = item.
SpanStart
EditAndContinue\BreakpointSpans.vb (2)
409
If position >= clause.Keys.First.
SpanStart
AndAlso position < clause.IntoKeyword.SpanStart Then
417
Return TextSpan.FromBounds(clause.Keys.First.
SpanStart
, clause.Span.End)
EditAndContinue\VisualBasicEditAndContinueAnalyzer.vb (3)
625
If leftDeclarator.AsClause IsNot Nothing AndAlso leftNode.SpanStart >= leftDeclarator.AsClause.
SpanStart
Then
2613
Return TextSpan.FromBounds(tryBlock.FinallyBlock.
SpanStart
, tryBlock.EndTryStatement.Span.End)
2616
Return TextSpan.FromBounds(tryBlock.CatchBlocks.First().
SpanStart
, tryBlock.EndTryStatement.Span.End)
ExtractMethod\Extensions.vb (2)
252
Dim withBlockSpan = TextSpan.FromBounds(withBlock.WithStatement.Span.End, withBlock.EndWithStatement.
SpanStart
)
320
Dim blockSpan = TextSpan.FromBounds(block.BlockStatement.Span.End, block.EndBlockStatement.
SpanStart
)
GenerateConstructor\VisualBasicGenerateConstructorService.vb (1)
69
Dim containingType = semanticModel.GetEnclosingNamedType(simpleName.
SpanStart
, cancellationToken)
GenerateMember\GenerateEnumMember\VisualBasicGenerateEnumMemberService.vb (1)
47
Dim position = simpleNameOrMemberAccessExpression.
SpanStart
GenerateMember\GenerateParameterizedMember\VisualBasicGenerateMethodService.vb (1)
148
Dim position = expression.
SpanStart
GenerateMember\GenerateVariable\VisualBasicGenerateVariableService.vb (1)
110
Dim position = expression.
SpanStart
GenerateType\VisualBasicGenerateTypeService.vb (4)
125
Dim position = nameOrMemberAccessExpression.
SpanStart
398
FirstOrDefault(Function(t) simpleName.
SpanStart
>= t.Members.First().
SpanStart
AndAlso
671
If Await IsWithinTheImportingNamespaceAsync(document, simpleName.
SpanStart
, includeUsingsOrImports, cancellationToken).ConfigureAwait(False) Then
IntroduceVariable\VisualBasicIntroduceVariableService.vb (2)
164
Return block.OverlapsHiddenPosition(TextSpan.FromBounds(first.
SpanStart
, last.
SpanStart
), cancellationToken)
LambdaUtilities.vb (2)
290
If rangeVariable.
SpanStart
< groupByClause.ByKeyword.SpanStart OrElse
291
(rangeVariable.
SpanStart
= groupByClause.ByKeyword.SpanStart AndAlso rangeVariable Is groupByClause.Items.Last) Then
SignatureHelp\AttributeSignatureHelpProvider.vb (2)
76
Sort(semanticModel, attribute.
SpanStart
)
112
Dim position = attribute.
SpanStart
SignatureHelp\FunctionAggregationSignatureHelpProvider.vb (5)
36
functionAggregation.
SpanStart
= currentSpan.Start Then
66
functionAggregation.
SpanStart
,
79
Sort(semanticModel, functionAggregation.
SpanStart
)
87
Dim textSpan = CommonSignatureHelpUtilities.GetSignatureHelpSpan(functionAggregation, functionAggregation.
SpanStart
, Function(n) n.CloseParenToken)
100
Dim position = functionAggregation.
SpanStart
SignatureHelp\GenericNameSignatureHelpProvider.vb (2)
101
Sort(semanticModel, genericName.
SpanStart
)
118
Dim position = genericName.
SpanStart
SignatureHelp\InvocationExpressionSignatureHelpProvider.DelegateInvoke.vb (1)
26
Dim position = invocationExpression.
SpanStart
SignatureHelp\InvocationExpressionSignatureHelpProvider.ElementAccess.vb (1)
33
Function(s) ConvertIndexer(s, leftExpression.
SpanStart
, semanticModel, structuralTypeDisplayService, documentationCommentFormattingService))
SignatureHelp\InvocationExpressionSignatureHelpProvider.MemberGroup.vb (1)
47
Function(s) ConvertMemberGroupMember(document, s, invocationExpression.
SpanStart
, semanticModel))
SignatureHelp\InvocationExpressionSignatureHelpProvider.vb (2)
101
memberGroup = memberGroup.Sort(semanticModel, invocationExpression.
SpanStart
)
113
Sort(semanticModel, invocationExpression.
SpanStart
))
SignatureHelp\ObjectCreationExpressionSignatureHelpProvider.DelegateType.vb (1)
24
Dim position = objectCreationExpression.
SpanStart
SignatureHelp\ObjectCreationExpressionSignatureHelpProvider.NormalType.vb (2)
28
Sort(semanticModel, objectCreationExpression.
SpanStart
)
48
Dim position = objectCreationExpression.
SpanStart
SignatureHelp\RaiseEventStatementSignatureHelpProvider.vb (6)
35
currentSpan.Start = statement.Name.
SpanStart
Then
84
semanticModel.LookupStaticMembers(raiseEventStatement.
SpanStart
, containingType, raiseEventStatement.Name.Identifier.ValueText),
85
semanticModel.LookupSymbols(raiseEventStatement.
SpanStart
, containingType, raiseEventStatement.Name.Identifier.ValueText))
91
Sort(semanticModel, raiseEventStatement.
SpanStart
)
95
Dim textSpan = SignatureHelpUtilities.GetSignatureHelpSpan(raiseEventStatement.ArgumentList, raiseEventStatement.Name.
SpanStart
)
111
Dim position = raiseEventStatement.
SpanStart
SignatureHelp\SignatureHelpUtilities.vb (1)
64
Return CommonSignatureHelpUtilities.GetSignatureHelpSpan(initializer, initializer.
SpanStart
, s_getCollectionInitializerCloseToken)
Structure\Providers\CollectionInitializerStructureProvider.vb (2)
44
textSpan:=TextSpan.FromBounds(node.
SpanStart
, endPos),
45
hintSpan:=TextSpan.FromBounds(node.
SpanStart
, endPos),
Structure\Providers\CompilationUnitStructureProvider.vb (1)
23
Dim startPos = compilationUnit.Imports.First().
SpanStart
Structure\Providers\RegionDirectiveStructureProvider.vb (1)
42
Dim span = TextSpan.FromBounds(regionDirective.
SpanStart
, matchingDirective.Span.End)
VisualBasicUseInferredMemberNameDiagnosticAnalyzer.vb (2)
52
Dim fadeSpan = TextSpan.FromBounds(nameColonEquals.Name.
SpanStart
, nameColonEquals.ColonEqualsToken.Span.End)
72
Dim fadeSpan = TextSpan.FromBounds(fieldInitializer.Name.
SpanStart
, fieldInitializer.EqualsToken.Span.End)
Microsoft.CodeAnalysis.VisualBasic.Semantic.UnitTests (76)
Binding\ImplicitVariableTests.vb (2)
1014
Dim position = main1.Statements.First.
SpanStart
1056
Dim position = main1.Statements.First.
SpanStart
Compilation\SemanticModelAPITests.vb (24)
548
Dim speculativeSymbolInfo = semanticModel.GetSpeculativeSymbolInfo(crefSyntax.
SpanStart
, speculatedName, SpeculativeBindingOption.BindAsTypeOrNamespace)
757
Dim position1 = originalStatement.
SpanStart
819
Dim position1 = originalStatement.
SpanStart
892
Dim position1 = originalStatement.
SpanStart
1006
Dim position1 = endStatement.
SpanStart
1041
Dim position1 = rangeArg.
SpanStart
1080
Dim position1 = rangeArg.
SpanStart
1129
Assert.Throws(Of ArgumentNullException)(Function() model.TryGetSpeculativeSemanticModel(statement.
SpanStart
, initializer:=Nothing, speculativeModel:=speculativeModel))
1130
Assert.Throws(Of ArgumentNullException)(Function() model.TryGetSpeculativeSemanticModel(statement.
SpanStart
, statement:=Nothing, speculativeModel:=speculativeModel))
1131
Assert.Throws(Of ArgumentNullException)(Function() model.TryGetSpeculativeSemanticModel(statement.
SpanStart
, attribute:=Nothing, speculativeModel:=speculativeModel))
1134
Assert.Throws(Of ArgumentException)(Function() model.TryGetSpeculativeSemanticModel(statement.
SpanStart
, initializer:=initializer, speculativeModel:=speculativeModel))
1135
Assert.Throws(Of ArgumentException)(Function() model.TryGetSpeculativeSemanticModel(statement.
SpanStart
, statement:=statement, speculativeModel:=speculativeModel))
1136
Assert.Throws(Of ArgumentException)(Function() model.TryGetSpeculativeSemanticModel(attribute.
SpanStart
, attribute:=attribute, speculativeModel:=speculativeModel))
1140
model.TryGetSpeculativeSemanticModel(statement.
SpanStart
, speculatedStatement, speculativeModel)
1143
Assert.Throws(Of InvalidOperationException)(Function() speculativeModel.TryGetSpeculativeSemanticModel(speculatedStatement.
SpanStart
, speculatedStatement, newSpeculativeModel))
1174
Dim success = model.TryGetSpeculativeSemanticModel(statement.
SpanStart
, speculatedStatement, speculativeModel)
1182
Assert.Throws(Of InvalidOperationException)(Sub() speculativeModel.TryGetSpeculativeSemanticModel(speculatedStatement.
SpanStart
, statement:=newSpeculatedStatement, speculativeModel:=newSpeculativeModel))
1186
Assert.Throws(Of InvalidOperationException)(Sub() speculativeModel.TryGetSpeculativeSemanticModel(speculatedStatement.
SpanStart
, newSpeculatedStatement, newSpeculativeModel))
1423
Dim position1 = originalStatement.
SpanStart
1493
Dim position1 = originalStatement.
SpanStart
1542
Dim position1 = originalStatement.
SpanStart
1582
Dim position1 = originalStatement.
SpanStart
1983
Dim position = statementSyntax.
SpanStart
2018
Dim position = statementSyntax.
SpanStart
Compilation\SemanticModelGetDeclaredSymbolAPITests.vb (34)
1257
Assert.Equal(syntax.
SpanStart
,
1265
Assert.Equal(syntax.
SpanStart
,
1273
Assert.Equal(syntax.
SpanStart
,
1281
Assert.Equal(syntax.
SpanStart
,
1289
Assert.Equal(syntax.
SpanStart
,
1369
Assert.Equal(syntax.
SpanStart
+ 6, paramSymbol1.Locations.Single().SourceSpan.Start)
1374
Assert.Equal(syntax.
SpanStart
+ 6, paramSymbol2.Locations.Single().SourceSpan.Start)
1379
Assert.Equal(syntax.
SpanStart
, paramSymbol3.Locations.Single().SourceSpan.Start)
1384
Assert.Equal(syntax.
SpanStart
+ 6, paramSymbol4.Locations.Single().SourceSpan.Start)
1849
Assert.True(syntax.
SpanStart
= tpSymbol1.Locations.Item(0).SourceSpan.Start OrElse
1850
syntax.
SpanStart
= tpSymbol1.Locations.Item(1).SourceSpan.Start,
1858
Assert.True(syntax.
SpanStart
= tpSymbol2.Locations.Item(0).SourceSpan.Start OrElse
1859
syntax.
SpanStart
= tpSymbol2.Locations.Item(1).SourceSpan.Start,
1867
Assert.True(syntax.
SpanStart
= tpSymbol3.Locations.Item(0).SourceSpan.Start OrElse
1868
syntax.
SpanStart
= tpSymbol3.Locations.Item(1).SourceSpan.Start,
1876
Assert.True(syntax.
SpanStart
= tpSymbol4.Locations.Item(0).SourceSpan.Start OrElse
1877
syntax.
SpanStart
= tpSymbol4.Locations.Item(1).SourceSpan.Start,
1885
Assert.Equal(syntax.
SpanStart
, tpSymbol5.Locations.Single().SourceSpan.Start)
2022
Assert.True(syntax.
SpanStart
= varSymbol1.Locations.Item(0).SourceSpan.Start OrElse
2023
syntax.
SpanStart
= varSymbol1.Locations.Item(1).SourceSpan.Start,
2032
Assert.True(syntax.
SpanStart
= varSymbol2.Locations.Item(0).SourceSpan.Start OrElse
2033
syntax.
SpanStart
= varSymbol2.Locations.Item(1).SourceSpan.Start,
2042
Assert.True(syntax.
SpanStart
= varSymbol3.Locations.Item(0).SourceSpan.Start OrElse
2043
syntax.
SpanStart
= varSymbol3.Locations.Item(1).SourceSpan.Start,
2052
Assert.True(syntax.
SpanStart
= varSymbol4.Locations.Item(0).SourceSpan.Start OrElse
2053
syntax.
SpanStart
= varSymbol4.Locations.Item(1).SourceSpan.Start,
2062
Assert.True(syntax.
SpanStart
= varSymbol5.Locations.Item(0).SourceSpan.Start OrElse
2063
syntax.
SpanStart
= varSymbol5.Locations.Item(1).SourceSpan.Start,
2072
Assert.True(syntax.
SpanStart
= varSymbol6.Locations.Item(0).SourceSpan.Start OrElse
2073
syntax.
SpanStart
= varSymbol6.Locations.Item(1).SourceSpan.Start,
2083
Assert.True(syntax.
SpanStart
= varSymbol7.Locations.Item(0).SourceSpan.Start OrElse
2084
syntax.
SpanStart
= varSymbol7.Locations.Item(1).SourceSpan.Start,
2093
Assert.True(syntax.
SpanStart
= varSymbol8.Locations.Item(0).SourceSpan.Start OrElse
2094
syntax.
SpanStart
= varSymbol8.Locations.Item(1).SourceSpan.Start,
Compilation\SuppressAccessibilityChecksTests.vb (2)
121
Dim symbolInfo = model.GetSpeculativeSymbolInfo(expr.
SpanStart
, SyntaxFactory.ParseExpression("a._p"), SpeculativeBindingOption.BindAsExpression)
250
methodDecl.Statements(0).
SpanStart
, speculatedMethod.Accessors(0), speculativeModel)
Semantics\GetExtendedSemanticInfoTests.vb (2)
8643
Dim containingType = DirectCast(model, SemanticModel).GetEnclosingSymbol(SLDeclaration.
SpanStart
)
8652
Dim lus1 = DirectCast(model, SemanticModel).LookupSymbols(SLDeclaration.
SpanStart
, name:="i")
Semantics\GetSemanticInfoTests.vb (7)
809
Dim lookupSymbols = model.LookupSymbols(expressionSyntax.
SpanStart
, name:="x")
846
Dim lookupSymbols = model.LookupSymbols(expressionSyntax.
SpanStart
, name:="Value")
915
Dim lookupSymbols = model.LookupSymbols(expressionSyntax.
SpanStart
, name:="x")
3824
Dim speculativeConstantValue = semanticModel.GetSpeculativeConstantValue(syntaxNode.
SpanStart
, syntaxNode)
3847
Dim speculativeTypeInfo = semanticModel.GetSpeculativeConstantValue(syntaxNode.
SpanStart
, syntaxNode)
4525
Dim info2 = model.GetSpeculativeSymbolInfo(originalSyntax.
SpanStart
, speculativeSyntax, SpeculativeBindingOption.BindAsExpression)
4572
Dim info2 = model.GetSpeculativeSymbolInfo(originalSyntax.
SpanStart
, speculativeSyntax, SpeculativeBindingOption.BindAsExpression)
Semantics\QueryExpressions_SemanticModel.vb (1)
3920
Dim containingSymbol = DirectCast(semanticModel, SemanticModel).GetEnclosingSymbol(node.
SpanStart
)
Semantics\UsingStatementTest.vb (1)
376
Dim ActualSymbol = model.LookupSymbols(usingStatements(index - 1).
SpanStart
, name:=symbol.Name).[Single]()
Semantics\WithBlockSemanticModelTests.vb (3)
319
Assert.Equal("Sub WithAliasedStaticField.Test(parameter As ClassWithField)", modelA.GetEnclosingSymbol(parameter.
SpanStart
).ToTestDisplayString())
325
Assert.True(modelA.TryGetSpeculativeSemanticModel(parameter.Parent.Parent.
SpanStart
, withBlockB, modelAB))
327
Assert.Equal("Sub WithAliasedStaticField.Test(parameter As ClassWithField)", modelAB.GetEnclosingSymbol(withBlockB.WithStatement.Expression.
SpanStart
).ToTestDisplayString())
Microsoft.CodeAnalysis.VisualBasic.Symbol.UnitTests (5)
DocumentationComments\DocCommentTests.vb (2)
1115
Assert.Equal("Public Sub Main()", TryCast(model, SemanticModel).GetEnclosingSymbol(names(0).
SpanStart
).ToDisplayString())
12439
Assert.Empty(model.LookupSymbols(name.
SpanStart
, typeParameter, "GetAwaiter"))
SymbolDisplay\SymbolDisplayTests.vb (2)
5455
Dim position = methodDecl.Statements(0).
SpanStart
5465
position = methodDecl.Statements(0).
SpanStart
SymbolsTests\Source\BindingsTests.vb (1)
468
Dim sysCollectionsSymInfo = bindingsA.GetSpeculativeSymbolInfo(importSystemCollectionsTypeSyntax.
SpanStart
, importSystemCollectionsTypeSyntax, SpeculativeBindingOption.BindAsTypeOrNamespace)
Microsoft.CodeAnalysis.VisualBasic.Syntax.UnitTests (7)
TestSyntaxNodes.vb (7)
594
Assert.Equal(start, seplist(0).
SpanStart
)
638
Assert.Equal(0, sepList(0).
SpanStart
)
640
Assert.Equal(6, sepList(1).
SpanStart
)
642
Assert.Equal(12, sepList(2).
SpanStart
)
662
Assert.Equal(9 + 0, sepList(0).
SpanStart
)
664
Assert.Equal(9 + 6, sepList(1).
SpanStart
)
666
Assert.Equal(9 + 12, sepList(2).
SpanStart
)
Microsoft.CodeAnalysis.VisualBasic.Workspaces (45)
CastAnalyzer.vb (4)
213
castExpressionType = _semanticModel.GetSpeculativeTypeInfo(_castExpressionNode.
SpanStart
, _castExpressionNode, SpeculativeBindingOption.BindAsExpression).ConvertedType
239
Dim expressionToCastType = _semanticModel.ClassifyConversion(_castNode.
SpanStart
, _castExpressionNode, castType)
254
Dim castToOuterType As Conversion = _semanticModel.ClassifyConversion(_castNode.
SpanStart
, _castNode, outerType)
277
expressionToOuterType = _semanticModel.ClassifyConversion(_castNode.
SpanStart
, _castExpressionNode, outerType)
CodeCleanup\AsyncOrIteratorFunctionReturnTypeFixer.vb (2)
22
Dim position = If(oldFunc.ParameterList IsNot Nothing, oldFunc.ParameterList.
SpanStart
, oldFunc.Identifier.SpanStart)
44
If RewriteFunctionStatement(lambdaHeader.Modifiers, oldLambdaHeader.AsClause, parameterList, asClause, semanticModel, oldLambdaHeader.AsClause.
SpanStart
, cancellationToken) Then
CodeGeneration\VisualBasicCodeGenerationService.vb (1)
74
indices.Add(Not destination.OverlapsHiddenPosition(TextSpan.FromBounds(0, destination.Members.First.
SpanStart
), cancellationToken))
CompilationUnitSyntaxExtensions.vb (1)
29
Dim start = root.Imports.First.
SpanStart
DirectiveSyntaxEqualityComparer.vb (3)
17
Return x.
SpanStart
= y.
SpanStart
21
Return obj.
SpanStart
DirectiveWalker.vb (2)
86
condDirectives.Sort(Function(n1, n2) n1.
SpanStart
.CompareTo(n2.
SpanStart
))
J\s\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\VisualBasic\Extensions\SyntaxTreeExtensions.vb\SyntaxTreeExtensions.vb (1)
363
syntaxTree.GetText(cancellationToken).Lines.IndexOf(statement.
SpanStart
) = lineNumber Then
Recommendations\VisualBasicRecommendationServiceRunner.vb (4)
176
.SelectMany(Function(n) _context.SemanticModel.LookupNamespacesAndTypes(node.
SpanStart
, n)) _
180
.LookupNamespacesAndTypes(position:=node.
SpanStart
, container:=leftHandSymbol)
303
Dim position = node.
SpanStart
372
Dim symbol = _context.SemanticModel.GetEnclosingSymbol(node.
SpanStart
, _cancellationToken)
SemanticModelExtensions.vb (3)
67
semanticModel.LookupNamespacesAndTypes(expr.
SpanStart
, container:=symbol, name:=name),
68
semanticModel.LookupSymbols(expr.
SpanStart
, container:=symbol, name:=name))
116
Dim containingType = semanticModel.GetEnclosingNamedType(type.
SpanStart
, cancellationToken)
Simplification\Reducers\VisualBasicExtensionMethodReducer.vb (1)
58
invocationExpression.
SpanStart
,
Simplification\Reducers\VisualBasicVariableDeclaratorReducer.vb (1)
94
initializerType = semanticModel.GetSpeculativeTypeInfo(variableDeclarator.Initializer.Value.
SpanStart
, variableDeclarator.Initializer.Value, SpeculativeBindingOption.BindAsExpression).ConvertedType
Simplification\Simplifiers\AbstractVisualBasicSimplifier.vb (2)
86
Dim aliasTypeInfo = semanticModel.GetSpeculativeAliasInfo(node.
SpanStart
, aliasIdentifier, SpeculativeBindingOption.BindAsTypeOrNamespace)
167
Dim boundSymbols = semanticModel.LookupNamespacesAndTypes(node.
SpanStart
, name:=aliasName)
Simplification\Simplifiers\ExpressionSimplifier.vb (1)
313
Dim enclosingNamedType = semanticModel.GetEnclosingNamedType(memberAccess.
SpanStart
, cancellationToken)
Simplification\VisualBasicSimplificationService.Expander.vb (8)
65
Dim result = expression.CastIfPossible(targetType, expression.
SpanStart
, semanticModel, wasCastAdded, _cancellationToken)
236
Dim binding = _semanticModel.GetSpeculativeSymbolInfo(originalNode.
SpanStart
, expression, SpeculativeBindingOption.BindAsExpression)
436
If symbolForQualifiedName.Equals(_semanticModel.GetSpeculativeSymbolInfo(node.
SpanStart
, qualifiedNameWithModuleName, SpeculativeBindingOption.BindAsExpression).Symbol) Then
471
If symbolForMemberAccess.Equals(_semanticModel.GetSpeculativeSymbolInfo(node.
SpanStart
, memberAccessWithModuleName, SpeculativeBindingOption.BindAsExpression).Symbol) Then
650
_semanticModel.SyntaxTree.IsNameOfContext(originalSimpleName.
SpanStart
, _cancellationToken) Then
659
If Not Equals(_semanticModel.GetEnclosingNamedType(originalSimpleName.
SpanStart
, _cancellationToken), symbol.ContainingType) Then
730
Dim newSymbol = _semanticModel.GetSpeculativeSymbolInfo(originalNode.
SpanStart
, left, SpeculativeBindingOption.BindAsExpression).Symbol
744
symbol.Equals(_semanticModel.GetSpeculativeSymbolInfo(originalNode.
SpanStart
, result, SpeculativeBindingOption.BindAsExpression).Symbol))
Simplification\VisualBasicSimplificationService.vb (1)
106
position = originalMethod.Statements.First.
SpanStart
SpecialFormattingOperation.vb (1)
131
Dim lineNumber = sourceText.Lines.GetLineFromPosition(argument.
SpanStart
).LineNumber
StatementSyntaxExtensions.vb (4)
692
Dim outerStatement = statement.GetAncestors(Of StatementSyntax)().Where(Function(s) s.
SpanStart
<> statement.
SpanStart
).FirstOrDefault()
715
Dim outerStatement = statement.GetAncestors(Of StatementSyntax)().Where(Function(s) s.
SpanStart
<> statement.
SpanStart
).FirstOrDefault()
SyntaxNodeExtensions.vb (3)
424
If Not textSpan.Contains(directives(0).
SpanStart
) OrElse
425
Not textSpan.Contains(directives(directives.Count - 1).
SpanStart
) Then
914
Dim blockSpan = TextSpan.FromBounds(block.BlockStatement.Span.End, block.EndBlockStatement.
SpanStart
)
TypeBlockSyntaxExtensions.vb (1)
20
Dim [end] = destination.EndBlockStatement.
SpanStart
VisualBasicSyntaxFacts.vb (1)
817
Return TextSpan.FromBounds(spanStart, method.EndBlockStatement.
SpanStart
)
Microsoft.VisualStudio.LanguageServices.VisualBasic (49)
CodeModel\VisualBasicCodeModelService.NodeLocator.vb (44)
311
startPosition = typeBlock.
SpanStart
334
Dim statementLine = text.Lines.GetLineFromPosition(statement.
SpanStart
)
338
Dim nextStatementLine As Nullable(Of TextLine) = If(nextStatement IsNot Nothing, text.Lines.GetLineFromPosition(nextStatement.
SpanStart
), Nothing)
378
startPosition = typeBlock.EndBlockStatement.
SpanStart
397
startPosition = enumBlock.
SpanStart
406
Dim statementLine = text.Lines.GetLineFromPosition(statement.
SpanStart
)
409
Dim nextStatementLine As Nullable(Of TextLine) = If(nextStatement IsNot Nothing, text.Lines.GetLineFromPosition(nextStatement.
SpanStart
), Nothing)
449
startPosition = enumBlock.EndEnumStatement.
SpanStart
497
startPosition = methodBlock.
SpanStart
537
startPosition = declareStatement.
SpanStart
543
startPosition = declareStatement.
SpanStart
602
startPosition = methodStatement.
SpanStart
608
startPosition = methodStatement.
SpanStart
664
startPosition = methodBlock.EndBlockStatement.
SpanStart
719
startPosition = propertyStatement.
SpanStart
723
startPosition = propertyStatement.
SpanStart
775
DirectCast(propertyStatement.Parent, PropertyBlockSyntax).EndPropertyStatement.
SpanStart
,
801
startPosition = eventBlock.
SpanStart
847
startPosition = eventStatement.
SpanStart
853
startPosition = eventStatement.
SpanStart
897
DirectCast(eventStatement.Parent, EventBlockSyntax).EndEventStatement.
SpanStart
,
928
startPosition = delegateStatement.
SpanStart
934
startPosition = delegateStatement.
SpanStart
987
startPosition = namespaceBlock.NamespaceStatement.Name.
SpanStart
997
startPosition = namespaceBlock.NamespaceStatement.
SpanStart
1002
Dim beginLine = text.Lines.IndexOf(beginStatement.
SpanStart
)
1026
Dim beginLine = text.Lines.IndexOf(beginStatement.
SpanStart
)
1061
endPosition = namespaceBlock.EndNamespaceStatement.
SpanStart
1077
startPosition = variable.
SpanStart
1083
startPosition = fieldDeclaration.
SpanStart
1092
startPosition = fieldDeclaration.Declarators.First().
SpanStart
1112
startPosition = enumMember.
SpanStart
1182
startPosition = parameter.Identifier.
SpanStart
1188
startPosition = parameter.
SpanStart
1198
startPosition = parameter.Identifier.
SpanStart
1248
startPosition = importsStatement.
SpanStart
1300
startPosition = optionStatement.
SpanStart
1352
startPosition = inheritsStatement.
SpanStart
1404
startPosition = implementsStatement.
SpanStart
1448
startPosition = attribute.Name.
SpanStart
1459
startPosition = attribute.
SpanStart
1509
startPosition = DirectCast(argument, SimpleArgumentSyntax).NameColonEquals.Name.
SpanStart
1521
argument.
SpanStart
- 1,
1522
argument.
SpanStart
)
CodeModel\VisualBasicCodeModelService.vb (4)
1355
Dim spanStart = attributeList.
SpanStart
4133
text = text.Replace(TextSpan.FromBounds(clauseItemToRemove.
SpanStart
, methodStatement.HandlesClause.Events.GetSeparator(0).Span.End), String.Empty)
4267
Dim typeBlockPosition = typeBlock.
SpanStart
4339
Dim typeBlockPosition = typeBlock.
SpanStart
LanguageService\VisualBasicDebuggerIntelliSenseContext.vb (1)
80
Return DirectCast(containingNode, MethodBlockBaseSyntax).EndBlockStatement.
SpanStart