4 types derived from MethodBlockBaseSyntax
Microsoft.CodeAnalysis.VisualBasic (4)
Generated\Syntax.xml.Syntax.Generated.vb (4)
5365
Inherits
MethodBlockBaseSyntax
5530
Inherits
MethodBlockBaseSyntax
5692
Inherits
MethodBlockBaseSyntax
5859
Inherits
MethodBlockBaseSyntax
4 instantiations of MethodBlockBaseSyntax
Microsoft.CodeAnalysis.VisualBasic (4)
Generated\Syntax.xml.Syntax.Generated.vb (4)
5371
MyBase.
New
(green, parent, startLocation)
5536
MyBase.
New
(green, parent, startLocation)
5698
MyBase.
New
(green, parent, startLocation)
5865
MyBase.
New
(green, parent, startLocation)
287 references to MethodBlockBaseSyntax
Microsoft.CodeAnalysis.EditorFeatures2.UnitTests (2)
Simplification\TypeNameSimplifierTest.vb (2)
4254
If TypeOf node Is
MethodBlockBaseSyntax
Then
4255
node = DirectCast(node,
MethodBlockBaseSyntax
).Statements.Single()
Microsoft.CodeAnalysis.VisualBasic (61)
Binding\AttributeSemanticModel.vb (1)
85
Friend Overrides Function TryGetSpeculativeSemanticModelForMethodBodyCore(parentModel As SyntaxTreeSemanticModel, position As Integer, method As
MethodBlockBaseSyntax
, <Out> ByRef speculativeModel As PublicSemanticModel) As Boolean
Binding\Binder_Statements.vb (3)
148
Return BindMethodBlock(DirectCast(node,
MethodBlockBaseSyntax
), diagnostics)
291
Private Function BindMethodBlock(methodBlock As
MethodBlockBaseSyntax
, diagnostics As BindingDiagnosticBag) As BoundBlock
5168
If TypeOf curSyntax Is
MethodBlockBaseSyntax
Then
Binding\Binder_Utils.vb (1)
1279
If TypeOf containingSyntax.Parent Is
MethodBlockBaseSyntax
OrElse TypeOf containingSyntax.Parent Is PropertyBlockSyntax Then
Binding\BinderFactory.BinderFactoryVisitor.vb (2)
79
Dim possibleParentBlock = TryCast(methodBaseSyntax.Parent,
MethodBlockBaseSyntax
)
209
Private Function VisitMethodBlockBase(methodBlockSyntax As
MethodBlockBaseSyntax
, begin As MethodBaseSyntax) As Binder
Binding\BinderFactory.vb (1)
477
If nodeForOuterBinder IsNot Nothing AndAlso TypeOf (nodeForOuterBinder) Is
MethodBlockBaseSyntax
Then
Binding\InitializerSemanticModel.vb (1)
224
Friend Overrides Function TryGetSpeculativeSemanticModelForMethodBodyCore(parentModel As SyntaxTreeSemanticModel, position As Integer, body As
MethodBlockBaseSyntax
, <Out> ByRef speculativeModel As PublicSemanticModel) As Boolean
Binding\LocalBinderBuilder.vb (1)
110
Private Sub VisitMethodBlockBase(methodBlock As
MethodBlockBaseSyntax
)
Binding\MethodBodyBinder.vb (1)
46
Dim methodBlock = TryCast(root,
MethodBlockBaseSyntax
)
Binding\MethodBodySemanticModel.vb (1)
35
Friend Overrides Function TryGetSpeculativeSemanticModelForMethodBodyCore(parentModel As SyntaxTreeSemanticModel, position As Integer, method As
MethodBlockBaseSyntax
, <Out> ByRef speculativeModel As PublicSemanticModel) As Boolean
Binding\SpeculativeMemberSemanticModel.vb (1)
26
Friend Overrides Function TryGetSpeculativeSemanticModelForMethodBodyCore(parentModel As SyntaxTreeSemanticModel, position As Integer, method As
MethodBlockBaseSyntax
, <Out> ByRef speculativeModel As PublicSemanticModel) As Boolean
Compilation\DocumentationComments\UnprocessedDocumentationCommentFinder.vb (1)
70
Private Sub VisitMethodBlockBase(node As Syntax.
MethodBlockBaseSyntax
)
Compilation\SemanticModel.vb (5)
2150
Public Function TryGetSpeculativeSemanticModelForMethodBody(position As Integer, method As
MethodBlockBaseSyntax
, <Out> ByRef speculativeModel As SemanticModel) As Boolean
2161
Friend MustOverride Function TryGetSpeculativeSemanticModelForMethodBodyCore(parentModel As SyntaxTreeSemanticModel, position As Integer, method As
MethodBlockBaseSyntax
, <Out> ByRef speculativeModel As PublicSemanticModel) As Boolean
2664
Public Overloads Function GetDeclaredSymbol(declarationSyntax As
MethodBlockBaseSyntax
, Optional cancellationToken As CancellationToken = Nothing) As IMethodSymbol
3316
Return Me.GetDeclaredSymbol(DirectCast(node,
MethodBlockBaseSyntax
), cancellationToken)
3539
If declaringSyntax.Parent IsNot Nothing AndAlso TypeOf declaringSyntax.Parent Is
MethodBlockBaseSyntax
Then
Compilation\SpeculativeSemanticModelWithMemberModel.vb (1)
301
Friend Overrides Function TryGetSpeculativeSemanticModelForMethodBodyCore(parentModel As SyntaxTreeSemanticModel, position As Integer, method As
MethodBlockBaseSyntax
, <Out> ByRef speculativeModel As PublicSemanticModel) As Boolean
Compilation\SyntaxTreeSemanticModel.vb (2)
358
Dim methodBlock = TryCast(node,
MethodBlockBaseSyntax
)
1425
Friend Overrides Function TryGetSpeculativeSemanticModelForMethodBodyCore(parentModel As SyntaxTreeSemanticModel, position As Integer, method As
MethodBlockBaseSyntax
, <Out> ByRef speculativeModel As PublicSemanticModel) As Boolean
Declarations\DeclarationTreeBuilder.vb (1)
638
Dim methodDecl = DirectCast(statement,
MethodBlockBaseSyntax
).BlockStatement
Generated\Syntax.xml.Syntax.Generated.vb (12)
5342
Public Function WithStatements(statements As SyntaxList(Of StatementSyntax)) As
MethodBlockBaseSyntax
5345
Friend MustOverride Function WithStatementsCore(statements As SyntaxList(Of StatementSyntax)) As
MethodBlockBaseSyntax
5347
Public Shadows Function AddStatements(ParamArray items As StatementSyntax()) As
MethodBlockBaseSyntax
5350
Friend MustOverride Function AddStatementsCore(ParamArray items As StatementSyntax()) As
MethodBlockBaseSyntax
5415
Friend Overrides Function WithStatementsCore(statements As SyntaxList(Of StatementSyntax)) As
MethodBlockBaseSyntax
5432
Friend Overrides Function AddStatementsCore(ParamArray items As StatementSyntax()) As
MethodBlockBaseSyntax
5580
Friend Overrides Function WithStatementsCore(statements As SyntaxList(Of StatementSyntax)) As
MethodBlockBaseSyntax
5597
Friend Overrides Function AddStatementsCore(ParamArray items As StatementSyntax()) As
MethodBlockBaseSyntax
5742
Friend Overrides Function WithStatementsCore(statements As SyntaxList(Of StatementSyntax)) As
MethodBlockBaseSyntax
5759
Friend Overrides Function AddStatementsCore(ParamArray items As StatementSyntax()) As
MethodBlockBaseSyntax
5910
Friend Overrides Function WithStatementsCore(statements As SyntaxList(Of StatementSyntax)) As
MethodBlockBaseSyntax
5927
Friend Overrides Function AddStatementsCore(ParamArray items As StatementSyntax()) As
MethodBlockBaseSyntax
Lowering\Instrumentation\DebugInfoInjector_SequencePoints.vb (1)
88
Dim asMethod = TryCast(node.Syntax,
MethodBlockBaseSyntax
)
Operations\VisualBasicOperationFactory.vb (1)
1329
Return TryCast(syntax.Parent,
MethodBlockBaseSyntax
)?.EndBlockStatement Is syntax OrElse
Symbols\Source\SourceMemberContainerTypeSymbol.vb (1)
2553
Dim methodDecl = DirectCast(memberSyntax,
MethodBlockBaseSyntax
).BlockStatement
Symbols\Source\SourceMethodSymbol.vb (3)
745
Friend ReadOnly Property BlockSyntax As
MethodBlockBaseSyntax
752
Return TryCast(decl.Parent,
MethodBlockBaseSyntax
)
1181
Dim methodBlock As
MethodBlockBaseSyntax
= Me.BlockSyntax
Symbols\SynthesizedSymbols\SynthesizedMethod.vb (1)
187
Dim asMethod = TryCast(node,
MethodBlockBaseSyntax
)
Syntax\MethodBlockBaseSyntax.vb (14)
25
''' Returns a copy of this <see cref="
MethodBlockBaseSyntax
"/> with the <see cref="BlockStatement"/> property changed to the
28
Public MustOverride Function WithBlockStatement(blockStatement As MethodBaseSyntax) As
MethodBlockBaseSyntax
31
''' Returns a copy of this <see cref="
MethodBlockBaseSyntax
"/> with the <see cref="EndBlockStatement"/> property changed to the
34
Public MustOverride Function WithEndBlockStatement(endBlockStatement As EndBlockStatementSyntax) As
MethodBlockBaseSyntax
46
Public Function WithBegin(begin As MethodBaseSyntax) As
MethodBlockBaseSyntax
60
Public Function WithEnd([end] As EndBlockStatementSyntax) As
MethodBlockBaseSyntax
80
Public Overrides Function WithBlockStatement(blockStatement As MethodBaseSyntax) As
MethodBlockBaseSyntax
84
Public Overrides Function WithEndBlockStatement(endBlockStatement As EndBlockStatementSyntax) As
MethodBlockBaseSyntax
132
Public Overrides Function WithBlockStatement(blockStatement As MethodBaseSyntax) As
MethodBlockBaseSyntax
136
Public Overrides Function WithEndBlockStatement(endBlockStatement As EndBlockStatementSyntax) As
MethodBlockBaseSyntax
184
Public Overrides Function WithBlockStatement(blockStatement As MethodBaseSyntax) As
MethodBlockBaseSyntax
188
Public Overrides Function WithEndBlockStatement(endBlockStatement As EndBlockStatementSyntax) As
MethodBlockBaseSyntax
236
Public Overrides Function WithBlockStatement(blockStatement As MethodBaseSyntax) As
MethodBlockBaseSyntax
240
Public Overrides Function WithEndBlockStatement(endBlockStatement As EndBlockStatementSyntax) As
MethodBlockBaseSyntax
Syntax\SyntaxFacts.vb (1)
363
Dim methodBlock = DirectCast(possibleBlock,
MethodBlockBaseSyntax
)
Syntax\VisualBasicSyntaxNode.vb (1)
486
Return TypeOf Me Is
MethodBlockBaseSyntax
VisualBasicDeclarationComputer.vb (1)
155
Dim methodBlock = TryCast(node,
MethodBlockBaseSyntax
)
VisualBasicExtensions.vb (2)
1136
Public Function GetDeclaredSymbol(semanticModel As SemanticModel, declarationSyntax As
MethodBlockBaseSyntax
, Optional cancellationToken As CancellationToken = Nothing) As IMethodSymbol
1823
Public Function TryGetSpeculativeSemanticModelForMethodBody(semanticModel As SemanticModel, position As Integer, method As
MethodBlockBaseSyntax
, <Out> ByRef speculativeModel As SemanticModel) As Boolean
Microsoft.CodeAnalysis.VisualBasic.CodeStyle (28)
NodeBasedFormattingRule.vb (1)
353
Dim [method] = TryCast(node,
MethodBlockBaseSyntax
)
StatementSyntaxExtensions.vb (6)
52
Return DirectCast(member,
MethodBlockBaseSyntax
).BlockStatement.AttributeLists
123
Dim methodBlock = DirectCast(member,
MethodBlockBaseSyntax
)
195
Return DirectCast(member,
MethodBlockBaseSyntax
).BlockStatement.Modifiers
433
Return DirectCast(member,
MethodBlockBaseSyntax
).BlockStatement.ParameterList
583
Return DirectCast(statement,
MethodBlockBaseSyntax
).BlockStatement
669
Return DirectCast(statement,
MethodBlockBaseSyntax
).BlockStatement
SyntaxNodeExtensions.vb (10)
117
Dim methodBlock = TryCast(node,
MethodBlockBaseSyntax
)
474
If TypeOf node Is
MethodBlockBaseSyntax
OrElse
533
If TypeOf node Is
MethodBlockBaseSyntax
Then
534
Return DirectCast(node,
MethodBlockBaseSyntax
).Statements
886
Dim block = TryCast(node,
MethodBlockBaseSyntax
)
909
Public Function ContainsInMethodBlockBody(block As
MethodBlockBaseSyntax
, textSpan As TextSpan) As Boolean
945
Dim method = TryCast(node,
MethodBlockBaseSyntax
)
1207
Return DirectCast(node,
MethodBlockBaseSyntax
).BlockStatement.AttributeLists
1267
begin = DirectCast(parent,
MethodBlockBaseSyntax
).BlockStatement
1308
begin = DirectCast(parent,
MethodBlockBaseSyntax
).BlockStatement
VisualBasicRemoveUnusedParametersAndValuesDiagnosticAnalyzer.vb (1)
53
Dim methodSyntax = TryCast(node.Parent,
MethodBlockBaseSyntax
)
VisualBasicSemanticFacts.vb (2)
116
Dim oldMethod = TryCast(oldNode,
MethodBlockBaseSyntax
)
117
Dim newMethod = TryCast(newNode,
MethodBlockBaseSyntax
)
VisualBasicSyntaxFacts.vb (8)
241
Return TypeOf node Is
MethodBlockBaseSyntax
722
If TypeOf node Is
MethodBlockBaseSyntax
AndAlso Not TypeOf node.Parent Is PropertyBlockSyntax Then
726
If TypeOf node Is MethodBaseSyntax AndAlso Not TypeOf node.Parent Is
MethodBlockBaseSyntax
Then
761
If TypeOf node Is MethodStatementSyntax AndAlso Not TypeOf node.Parent Is
MethodBlockBaseSyntax
Then
765
If TypeOf node Is SubNewStatementSyntax AndAlso Not TypeOf node.Parent Is
MethodBlockBaseSyntax
Then
769
If TypeOf node Is OperatorStatementSyntax AndAlso Not TypeOf node.Parent Is
MethodBlockBaseSyntax
Then
801
Dim method = TryCast(member,
MethodBlockBaseSyntax
)
824
Dim method = TryCast(node,
MethodBlockBaseSyntax
)
Microsoft.CodeAnalysis.VisualBasic.CodeStyle.Fixes (7)
IsStatementTerminatingTokenVisitor.vb (1)
105
Dim methodBlock = node.ReturnKeyword.GetAncestor(Of
MethodBlockBaseSyntax
)
SyntaxTreeExtensions.vb (1)
135
Dim method = targetToken.GetAncestor(Of
MethodBlockBaseSyntax
)()
VisualBasicSyntaxContext.vb (1)
151
Dim enclosingMethod = targetToken.GetAncestor(Of
MethodBlockBaseSyntax
)()
VisualBasicTypeInferenceService.TypeInferrer.vb (4)
732
If returnStatement.GetAncestorOrThis(Of
MethodBlockBaseSyntax
) Is Nothing Then
736
Dim memberSymbol = GetDeclaredMemberSymbolFromOriginalSemanticModel(SemanticModel, returnStatement.GetAncestor(Of
MethodBlockBaseSyntax
).BlockStatement)
763
If yieldStatement.GetAncestorOrThis(Of
MethodBlockBaseSyntax
) Is Nothing Then
767
Dim memberSymbol = GetDeclaredMemberSymbolFromOriginalSemanticModel(SemanticModel, yieldStatement.GetAncestor(Of
MethodBlockBaseSyntax
).BlockStatement)
Microsoft.CodeAnalysis.VisualBasic.EditorFeatures (9)
AutomaticEndConstructCorrection\AutomaticEndConstructCorrector.vb (2)
208
Function(context As
MethodBlockBaseSyntax
) context.BlockStatement,
243
Function(context As
MethodBlockBaseSyntax
) context.EndBlockStatement.BlockKeyword,
EndConstructGeneration\EndConstructStatementVisitor.vb (2)
89
Private Function HandleMethodBlockSyntax(methodBlock As
MethodBlockBaseSyntax
) As AbstractEndConstructResult
103
Private Function TryGenerateResultForConstructorSpitWithInitializeComponent(methodBlock As
MethodBlockBaseSyntax
) As AbstractEndConstructResult
EndConstructGeneration\EndConstructStatementVisitor_LambdaHeader.vb (1)
119
Dim containingMethodBlock = node.GetAncestor(Of
MethodBlockBaseSyntax
)()
NavigationBar\VisualBasicEditorNavigationBarItemService.vb (1)
57
Dim methodBlock = root.FindToken(navigationLocation.position).GetAncestor(Of
MethodBlockBaseSyntax
)()
NavigationBar\VisualBasicEditorNavigationBarItemService_CodeGeneration.vb (1)
31
Dim generatedNode = generatedTree.GetAnnotatedNodes(GeneratedSymbolAnnotation).Single().FirstAncestorOrSelf(Of
MethodBlockBaseSyntax
)
Utilities\NavigationPointHelpers.vb (2)
23
Public Function GetNavigationPoint(text As SourceText, indentSize As Integer, methodBlock As
MethodBlockBaseSyntax
) As VirtualTreePoint
42
Public Function GetHeaderStartPosition(methodBlock As
MethodBlockBaseSyntax
) As Integer
Microsoft.CodeAnalysis.VisualBasic.Features (52)
CodeFixes\GenerateEndConstruct\GenerateEndConstructCodeFixProvider.vb (2)
143
(Function(n As
MethodBlockBaseSyntax
) n.BlockStatement),
163
(Function(n As
MethodBlockBaseSyntax
) n.EndBlockStatement),
CodeRefactorings\AddAwait\VisualBasicAddAwaitCodeRefactoringProvider.vb (1)
39
Return DirectCast(current,
MethodBlockBaseSyntax
).BlockStatement.Modifiers.Any(SyntaxKind.AsyncKeyword)
Completion\CompletionProviders\OverrideCompletionProvider.vb (2)
47
Dim methodBlock = token.GetAncestor(Of
MethodBlockBaseSyntax
)()
209
Dim methodBlock = TryCast(node,
MethodBlockBaseSyntax
)
Completion\KeywordRecommenders\Declarations\EndBlockKeywordRecommender.vb (1)
158
Private Shared Function VisitMethodBlockBase(node As
MethodBlockBaseSyntax
) As SyntaxKind?
Completion\KeywordRecommenders\Declarations\EventKeywordRecommender.vb (1)
37
If targetToken.GetAncestor(Of
MethodBlockBaseSyntax
)() Is Nothing AndAlso
Completion\KeywordRecommenders\Expressions\MyClassKeywordRecommender.vb (1)
27
Dim methodBlock = targetToken.GetAncestor(Of
MethodBlockBaseSyntax
)()
Debugging\BreakpointResolver.vb (1)
33
Dim methodBlock = token.GetAncestor(Of
MethodBlockBaseSyntax
)()
Debugging\ProximityExpressionsGetter.Worker.vb (3)
103
If TypeOf _parentStatement.Parent Is
MethodBlockBaseSyntax
Then
104
Dim methodBlock = DirectCast(_parentStatement.Parent,
MethodBlockBaseSyntax
)
136
Dim methodBlock = Me._parentStatement.GetAncestorOrThis(Of
MethodBlockBaseSyntax
)()
EditAndContinue\SyntaxUtilities.vb (2)
21
If TypeOf syntax Is
MethodBlockBaseSyntax
Then
164
Return DirectCast(declarationOrBody,
MethodBlockBaseSyntax
).BlockStatement.Modifiers
EditAndContinue\VisualBasicEditAndContinueAnalyzer.vb (6)
110
''' - <see cref="
MethodBlockBaseSyntax
"/> for methods, constructors, operators and accessors.
214
Dim methodBlock = TryCast(memberBody,
MethodBlockBaseSyntax
)
713
Debug.Assert((TypeOf oldBody Is
MethodBlockBaseSyntax
) = (TypeOf newBody Is
MethodBlockBaseSyntax
))
721
If TypeOf oldBody Is
MethodBlockBaseSyntax
Then
1559
Return GetDiagnosticSpan(DirectCast(node,
MethodBlockBaseSyntax
).BlockStatement)
ExtractMethod\Extensions.vb (3)
315
Public Function ContainsInMethodBlockBody(block As
MethodBlockBaseSyntax
, textSpan As TextSpan) As Boolean
330
If TypeOf n Is
MethodBlockBaseSyntax
OrElse
352
Return TypeOf node Is
MethodBlockBaseSyntax
OrElse
ExtractMethod\VisualBasicMethodExtractor.Analyzer.vb (1)
104
Dim methodBlock = Me.SelectionResult.GetContainingScopeOf(Of
MethodBlockBaseSyntax
)()
ExtractMethod\VisualBasicMethodExtractor.TriviaResult.vb (4)
30
Dim methodDefinition = TryCast(method,
MethodBlockBaseSyntax
)
39
Dim methodDefinition = TryCast(method,
MethodBlockBaseSyntax
)
52
method As
MethodBlockBaseSyntax
) As SyntaxToken
77
method As
MethodBlockBaseSyntax
) As IEnumerable(Of SyntaxTrivia)
ExtractMethod\VisualBasicMethodExtractor.vb (1)
43
enclosingTopLevelNode = basePosition.GetAncestor(Of
MethodBlockBaseSyntax
)()
ExtractMethod\VisualBasicMethodExtractor.VisualBasicCodeGenerator.vb (1)
421
Dim methodDefinition = root.GetAnnotatedNodes(Of
MethodBlockBaseSyntax
)(Me.MethodDefinitionAnnotation).First()
ExtractMethod\VisualBasicSelectionResult.vb (4)
100
If TypeOf node Is
MethodBlockBaseSyntax
Then
101
Dim methodBlock = DirectCast(node,
MethodBlockBaseSyntax
)
131
Return first.GetAncestors(Of SyntaxNode).FirstOrDefault(Function(n) TypeOf n Is
MethodBlockBaseSyntax
OrElse TypeOf n Is LambdaExpressionSyntax)
153
Dim methodBlock = TryCast(node,
MethodBlockBaseSyntax
)
ExtractMethod\VisualBasicSelectionValidator.vb (2)
624
Dim match = If(TryCast(container,
MethodBlockBaseSyntax
)?.EndBlockStatement.EndKeyword = nextToken, False) OrElse
631
If TryCast(container,
MethodBlockBaseSyntax
)?.BlockStatement.Kind = SyntaxKind.SubStatement Then
Highlighting\KeywordHighlighters\AccessorDeclarationHighlighter.vb (1)
23
Dim methodBlock = node.GetAncestor(Of
MethodBlockBaseSyntax
)()
Highlighting\KeywordHighlighters\ConstructorDeclarationHighlighter.vb (1)
23
Dim methodBlock = node.GetAncestor(Of
MethodBlockBaseSyntax
)()
Highlighting\KeywordHighlighters\MethodDeclarationHighlighter.vb (1)
23
Dim methodBlock = node.GetAncestor(Of
MethodBlockBaseSyntax
)()
Highlighting\KeywordHighlighters\OperatorDeclarationHighlighter.vb (1)
23
Dim methodBlock = node.GetAncestor(Of
MethodBlockBaseSyntax
)()
InitializeParameter\InitializeParameterHelpers.vb (3)
13
Return TypeOf node Is
MethodBlockBaseSyntax
OrElse
22
If TypeOf functionDeclaration Is
MethodBlockBaseSyntax
Then
23
Dim methodBlock = DirectCast(functionDeclaration,
MethodBlockBaseSyntax
)
InvertIf\VisualBasicInvertIfCodeRefactoringProvider.vb (2)
22
Return TypeOf node IsNot
MethodBlockBaseSyntax
AndAlso
31
If TypeOf node Is
MethodBlockBaseSyntax
OrElse
LineSeparators\VisualBasicLineSeparatorService.vb (1)
33
TypeOf (node) Is
MethodBlockBaseSyntax
OrElse
NavigationBar\VisualBasicNavigationBarItemService.vb (1)
80
If TypeOf node Is
MethodBlockBaseSyntax
OrElse
ReplaceMethodWithProperty\VisualBasicReplaceMethodWithPropertyService.vb (3)
89
DirectCast(getAndSetMethods.GetMethodDeclaration.Parent,
MethodBlockBaseSyntax
).Statements)
105
DirectCast(getAndSetMethods.GetMethodDeclaration.Parent,
MethodBlockBaseSyntax
).Statements)
115
DirectCast(getAndSetMethods.SetMethodDeclaration.Parent,
MethodBlockBaseSyntax
).Statements)
VisualBasicDeclarationComputer.vb (1)
155
Dim methodBlock = TryCast(node,
MethodBlockBaseSyntax
)
VisualBasicRemoveUnusedParametersAndValuesDiagnosticAnalyzer.vb (1)
53
Dim methodSyntax = TryCast(node.Parent,
MethodBlockBaseSyntax
)
Microsoft.CodeAnalysis.VisualBasic.Semantic.UnitTests (8)
Binding\ImplicitVariableTests.vb (4)
1013
Dim main1 = tree.GetRoot().DescendantNodes().OfType(Of
MethodBlockBaseSyntax
)().Single()
1017
Dim main2 = compilation2.SyntaxTrees.Single().GetRoot().DescendantNodes().OfType(Of
MethodBlockBaseSyntax
)().Single()
1055
Dim main1 = tree.GetRoot().DescendantNodes().OfType(Of
MethodBlockBaseSyntax
)().Single()
1059
Dim main2 = compilation2.SyntaxTrees.Single().GetRoot().DescendantNodes().OfType(Of
MethodBlockBaseSyntax
)().Single()
Compilation\SemanticModelAPITests.vb (3)
1443
Private Shared Sub VerifySpeculativeSemanticModelForMethodBody(speculatedMethod As
MethodBlockBaseSyntax
, speculativeModel As SemanticModel)
1859
Dim methodBlock = DirectCast(typeBlock.Members(1),
MethodBlockBaseSyntax
)
1901
Dim methodBlock = DirectCast(typeBlock.Members(0),
MethodBlockBaseSyntax
)
Diagnostics\GetDiagnosticsTests.vb (1)
665
Dim methodBlock = node.FirstAncestorOrSelf(Of
MethodBlockBaseSyntax
)
Microsoft.CodeAnalysis.VisualBasic.Symbol.UnitTests (3)
SymbolDisplay\SymbolDisplayTests.vb (3)
5454
Dim methodDecl = tree.GetCompilationUnitRoot().DescendantNodes().OfType(Of
MethodBlockBaseSyntax
)().First()
5462
methodDecl = tree.GetCompilationUnitRoot().DescendantNodes().OfType(Of
MethodBlockBaseSyntax
)().First()
6007
Dim member = token.Parent.FirstAncestorOrSelf(Of
MethodBlockBaseSyntax
)()
Microsoft.CodeAnalysis.VisualBasic.Syntax.UnitTests (11)
Parser\ParseAsyncTests.vb (8)
106
Dim firstStatementOfM = tree.GetRoot().DescendantNodes.OfType(Of
MethodBlockBaseSyntax
).First.Statements.First
111
Dim firstStatementOfM2 = tree.GetRoot().DescendantNodes.OfType(Of
MethodBlockBaseSyntax
)()(1).Statements.First
116
Dim firstStatementOfN = tree.GetRoot().DescendantNodes.OfType(Of
MethodBlockBaseSyntax
)()(2).Statements.First
121
Dim firstStatementOfN2 = tree.GetRoot().DescendantNodes.OfType(Of
MethodBlockBaseSyntax
)()(3).Statements.First
217
Dim firstStatementOfM = tree.GetRoot().DescendantNodes.OfType(Of
MethodBlockBaseSyntax
).First.Statements.First
222
Dim firstStatementOfM2 = tree.GetRoot().DescendantNodes.OfType(Of
MethodBlockBaseSyntax
)()(1).Statements.First
227
Dim firstStatementOfN = tree.GetRoot().DescendantNodes.OfType(Of
MethodBlockBaseSyntax
)()(2).Statements.First
232
Dim firstStatementOfN2 = tree.GetRoot().DescendantNodes.OfType(Of
MethodBlockBaseSyntax
)()(3).Statements.First
Parser\ParseIteratorTests.vb (3)
156
Dim methodSyntaxList = tree.GetRoot().DescendantNodes.OfType(Of
MethodBlockBaseSyntax
)().ToArray()
418
Private Shared Function IsIteratorMethod(methodSyntax As
MethodBlockBaseSyntax
) As Boolean
423
Return IsIteratorMethod(DirectCast(yieldStatement.Parent,
MethodBlockBaseSyntax
))
Microsoft.CodeAnalysis.VisualBasic.Workspaces (62)
CodeGeneration\VisualBasicCodeGenerationHelpers.vb (2)
96
Return members.LastOrDefault(Function(m) TypeOf m Is
MethodBlockBaseSyntax
OrElse TypeOf m Is MethodStatementSyntax)
108
Return members.LastOrDefault(Function(m) TypeOf m Is
MethodBlockBaseSyntax
OrElse TypeOf m Is MethodStatementSyntax)
CodeGeneration\VisualBasicCodeGenerationService.vb (3)
214
Dim methodBlock = TryCast(destinationMember,
MethodBlockBaseSyntax
)
252
methodBlock As
MethodBlockBaseSyntax
,
466
Dim methodBlock = TryCast(destinationMember,
MethodBlockBaseSyntax
)
CodeGeneration\VisualBasicDeclarationComparer.vb (1)
138
Return DirectCast(node,
MethodBlockBaseSyntax
).BlockStatement
CodeGeneration\VisualBasicSyntaxGenerator.vb (1)
3234
Return DirectCast(declaration,
MethodBlockBaseSyntax
).Statements
FindSymbols\VisualBasicDeclaredSymbolInfoFactoryService.vb (3)
211
ElseIf TypeOf node Is
MethodBlockBaseSyntax
Then
212
node = DirectCast(node,
MethodBlockBaseSyntax
).BlockStatement
542
node = If(TryCast(node,
MethodBlockBaseSyntax
)?.BlockStatement, node)
Formatting\Rules\NodeBasedFormattingRule.vb (1)
353
Dim [method] = TryCast(node,
MethodBlockBaseSyntax
)
IsStatementTerminatingTokenVisitor.vb (1)
105
Dim methodBlock = node.ReturnKeyword.GetAncestor(Of
MethodBlockBaseSyntax
)
J\s\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\VisualBasic\Extensions\ContextQuery\SyntaxTreeExtensions.vb\SyntaxTreeExtensions.vb (1)
135
Dim method = targetToken.GetAncestor(Of
MethodBlockBaseSyntax
)()
Rename\LocalConflictVisitor.vb (1)
29
Private Sub VisitMethodBlockBase(node As
MethodBlockBaseSyntax
)
Rename\VisualBasicRenameRewriterLanguageService.vb (2)
703
Dim methodBase = token.Parent.AncestorsAndSelf.Where(Function(s) TypeOf s Is
MethodBlockBaseSyntax
OrElse TypeOf s Is VariableDeclaratorSyntax) _
748
Function(s) TypeOf s Is
MethodBlockBaseSyntax
OrElse
SemanticModelReuse\VisualBasicSemanticModelReuseLanguageService.vb (3)
44
Dim methodBlock = TryCast(node,
MethodBlockBaseSyntax
)
58
Dim previousMethodBlockBaseNode = TryCast(previousBodyNode,
MethodBlockBaseSyntax
)
65
If previousSemanticModel.TryGetSpeculativeSemanticModelForMethodBody(previousMethodBlockBaseNode.BlockStatement.FullSpan.End, DirectCast(currentBodyNode,
MethodBlockBaseSyntax
), speculativeModel) Then
Simplification\Reducers\AbstractVisualBasicReducer.AbstractReductionRewriter.vb (3)
203
Private Function VisitMethodBlockBase(node As
MethodBlockBaseSyntax
, updateFunc As Func(Of SyntaxList(Of StatementSyntax),
MethodBlockBaseSyntax
)) As
MethodBlockBaseSyntax
Simplification\Reducers\VisualBasicEscapingReducer.vb (1)
74
Dim enclosingMethodBlock = parent.GetAncestor(Of
MethodBlockBaseSyntax
)()
Simplification\VisualBasicSimplificationService.NodesAndTokensToReduceComputer.vb (4)
151
Private Function VisitMethodBlockBaseSyntax(node As
MethodBlockBaseSyntax
, updateFunc As Func(Of
MethodBlockBaseSyntax
, MethodBaseSyntax, SyntaxList(Of StatementSyntax), EndBlockStatementSyntax,
MethodBlockBaseSyntax
)) As
MethodBlockBaseSyntax
Simplification\VisualBasicSimplificationService.vb (4)
82
Dim methodBlockBase = TryCast(nodeToSpeculate,
MethodBlockBaseSyntax
)
95
Dim originalMethod = DirectCast(originalNode,
MethodBlockBaseSyntax
)
141
Dim originalMethod = TryCast(originalNode,
MethodBlockBaseSyntax
)
143
Dim reducedMethod = DirectCast(reducedNode,
MethodBlockBaseSyntax
)
StatementSyntaxExtensions.vb (6)
52
Return DirectCast(member,
MethodBlockBaseSyntax
).BlockStatement.AttributeLists
123
Dim methodBlock = DirectCast(member,
MethodBlockBaseSyntax
)
195
Return DirectCast(member,
MethodBlockBaseSyntax
).BlockStatement.Modifiers
433
Return DirectCast(member,
MethodBlockBaseSyntax
).BlockStatement.ParameterList
583
Return DirectCast(statement,
MethodBlockBaseSyntax
).BlockStatement
669
Return DirectCast(statement,
MethodBlockBaseSyntax
).BlockStatement
SyntaxNodeExtensions.vb (10)
117
Dim methodBlock = TryCast(node,
MethodBlockBaseSyntax
)
474
If TypeOf node Is
MethodBlockBaseSyntax
OrElse
533
If TypeOf node Is
MethodBlockBaseSyntax
Then
534
Return DirectCast(node,
MethodBlockBaseSyntax
).Statements
886
Dim block = TryCast(node,
MethodBlockBaseSyntax
)
909
Public Function ContainsInMethodBlockBody(block As
MethodBlockBaseSyntax
, textSpan As TextSpan) As Boolean
945
Dim method = TryCast(node,
MethodBlockBaseSyntax
)
1207
Return DirectCast(node,
MethodBlockBaseSyntax
).BlockStatement.AttributeLists
1267
begin = DirectCast(parent,
MethodBlockBaseSyntax
).BlockStatement
1308
begin = DirectCast(parent,
MethodBlockBaseSyntax
).BlockStatement
VisualBasicSemanticFacts.vb (2)
116
Dim oldMethod = TryCast(oldNode,
MethodBlockBaseSyntax
)
117
Dim newMethod = TryCast(newNode,
MethodBlockBaseSyntax
)
VisualBasicSyntaxContext.vb (1)
151
Dim enclosingMethod = targetToken.GetAncestor(Of
MethodBlockBaseSyntax
)()
VisualBasicSyntaxFacts.vb (8)
241
Return TypeOf node Is
MethodBlockBaseSyntax
722
If TypeOf node Is
MethodBlockBaseSyntax
AndAlso Not TypeOf node.Parent Is PropertyBlockSyntax Then
726
If TypeOf node Is MethodBaseSyntax AndAlso Not TypeOf node.Parent Is
MethodBlockBaseSyntax
Then
761
If TypeOf node Is MethodStatementSyntax AndAlso Not TypeOf node.Parent Is
MethodBlockBaseSyntax
Then
765
If TypeOf node Is SubNewStatementSyntax AndAlso Not TypeOf node.Parent Is
MethodBlockBaseSyntax
Then
769
If TypeOf node Is OperatorStatementSyntax AndAlso Not TypeOf node.Parent Is
MethodBlockBaseSyntax
Then
801
Dim method = TryCast(member,
MethodBlockBaseSyntax
)
824
Dim method = TryCast(node,
MethodBlockBaseSyntax
)
VisualBasicTypeInferenceService.TypeInferrer.vb (4)
732
If returnStatement.GetAncestorOrThis(Of
MethodBlockBaseSyntax
) Is Nothing Then
736
Dim memberSymbol = GetDeclaredMemberSymbolFromOriginalSemanticModel(SemanticModel, returnStatement.GetAncestor(Of
MethodBlockBaseSyntax
).BlockStatement)
763
If yieldStatement.GetAncestorOrThis(Of
MethodBlockBaseSyntax
) Is Nothing Then
767
Dim memberSymbol = GetDeclaredMemberSymbolFromOriginalSemanticModel(SemanticModel, yieldStatement.GetAncestor(Of
MethodBlockBaseSyntax
).BlockStatement)
Microsoft.CodeAnalysis.VisualBasic.Workspaces.UnitTests (9)
CodeGeneration\SyntaxGeneratorTests.vb (9)
816
Dim declarations = syntaxTree.GetRoot().DescendantNodes().OfType(Of
MethodBlockBaseSyntax
)
1736
VerifySyntax(Of
MethodBlockBaseSyntax
)(
1743
VerifySyntax(Of
MethodBlockBaseSyntax
)(
1791
VerifySyntax(Of
MethodBlockBaseSyntax
)(
1796
VerifySyntax(Of
MethodBlockBaseSyntax
)(
1804
VerifySyntax(Of
MethodBlockBaseSyntax
)(
1811
VerifySyntax(Of
MethodBlockBaseSyntax
)(
1847
VerifySyntax(Of
MethodBlockBaseSyntax
)(
1852
VerifySyntax(Of
MethodBlockBaseSyntax
)(
Microsoft.VisualStudio.LanguageServices.VisualBasic (35)
CodeModel\MethodXML\MethodXmlBuilder.vb (1)
692
Public Shared Function Generate(methodBlock As
MethodBlockBaseSyntax
, semanticModel As SemanticModel) As String
CodeModel\VisualBasicCodeModelService.CodeModelEventCollector.vb (6)
569
ElseIf TypeOf oldMember Is
MethodBlockBaseSyntax
OrElse
572
If(TypeOf oldMember Is
MethodBlockBaseSyntax
, DirectCast(oldMember,
MethodBlockBaseSyntax
).BlockStatement, DirectCast(oldMember, MethodBaseSyntax)),
573
If(TypeOf newMember Is
MethodBlockBaseSyntax
, DirectCast(newMember,
MethodBlockBaseSyntax
).BlockStatement, DirectCast(newMember, MethodBaseSyntax)),
1121
TypeOf node.Parent Is
MethodBlockBaseSyntax
Then
CodeModel\VisualBasicCodeModelService.NodeLocator.vb (10)
63
Return GetMethodBlockStartPoint(text, options, DirectCast(node,
MethodBlockBaseSyntax
), part)
71
Return GetMethodBlockStartPoint(text, options, DirectCast(node.Parent,
MethodBlockBaseSyntax
), part)
74
If TypeOf node.Parent Is
MethodBlockBaseSyntax
Then
75
Return GetMethodBlockStartPoint(text, options, DirectCast(node.Parent,
MethodBlockBaseSyntax
), part)
153
Return GetMethodBlockEndPoint(text, DirectCast(node,
MethodBlockBaseSyntax
), part)
161
Return GetMethodBlockEndPoint(text, DirectCast(node.Parent,
MethodBlockBaseSyntax
), part)
164
If TypeOf node.Parent Is
MethodBlockBaseSyntax
Then
165
Return GetMethodBlockEndPoint(text, DirectCast(node.Parent,
MethodBlockBaseSyntax
), part)
457
Private Shared Function GetMethodBlockStartPoint(text As SourceText, options As LineFormattingOptions, methodBlock As
MethodBlockBaseSyntax
, part As EnvDTE.vsCMPart) As VirtualTreePoint?
617
Private Shared Function GetMethodBlockEndPoint(text As SourceText, methodBlock As
MethodBlockBaseSyntax
, part As EnvDTE.vsCMPart) As VirtualTreePoint?
CodeModel\VisualBasicCodeModelService.vb (16)
385
ElseIf TypeOf node Is
MethodBlockBaseSyntax
Then
386
Return GetAttributeNodes(DirectCast(node,
MethodBlockBaseSyntax
).BlockStatement.AttributeLists)
1038
Return DirectCast(node,
MethodBlockBaseSyntax
).BlockStatement
1176
ElseIf TypeOf parent Is
MethodBlockBaseSyntax
Then
1177
Return GetParameterNodes(DirectCast(parent,
MethodBlockBaseSyntax
).BlockStatement)
1577
ElseIf (TypeOf node Is
MethodBlockBaseSyntax
OrElse
2752
If TypeOf resultMember Is
MethodBlockBaseSyntax
Then
2753
resultMember = DirectCast(resultMember,
MethodBlockBaseSyntax
).BlockStatement
3423
TypeOf node Is
MethodBlockBaseSyntax
OrElse
3875
ElseIf TypeOf container Is
MethodBlockBaseSyntax
Then
3876
Dim method = DirectCast(container,
MethodBlockBaseSyntax
)
3953
ElseIf TypeOf container Is
MethodBlockBaseSyntax
Then
3954
Dim methodBlock = DirectCast(container,
MethodBlockBaseSyntax
)
3990
Dim methodBlock = TryCast(node,
MethodBlockBaseSyntax
)
3999
Dim methodBlock = TryCast(method,
MethodBlockBaseSyntax
)
4166
If Not TypeOf node Is
MethodBlockBaseSyntax
AndAlso
LanguageService\VisualBasicDebuggerIntelliSenseContext.vb (2)
76
ElseIf TypeOf containingNode Is
MethodBlockBaseSyntax
80
Return DirectCast(containingNode,
MethodBlockBaseSyntax
).EndBlockStatement.SpanStart