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