49 references to LookupPosition
Microsoft.CodeAnalysis.CSharp (49)
Binder\BinderFactory.BinderFactoryVisitor.cs (25)
137
if (!
LookupPosition
.IsInMethodDeclaration(_position, methodDecl))
143
if (
LookupPosition
.IsInBody(_position, methodDecl))
147
else if (
LookupPosition
.IsInMethodTypeParameterScope(_position, methodDecl))
199
if (!
LookupPosition
.IsInMethodDeclaration(_position, parent))
204
bool inBodyOrInitializer =
LookupPosition
.IsInConstructorParameterScope(_position, parent);
238
if (!
LookupPosition
.IsInBody(_position, parent))
265
if (!
LookupPosition
.IsInMethodDeclaration(_position, parent))
270
bool inBody =
LookupPosition
.IsInBody(_position, parent);
333
if (!
LookupPosition
.IsInMethodDeclaration(_position, parent))
338
bool inBody =
LookupPosition
.IsInBody(_position, parent);
390
if (!
LookupPosition
.IsInBody(_position, parent))
400
if (!
LookupPosition
.IsInBody(_position, parent))
664
if (!
LookupPosition
.IsInDelegateDeclaration(_position, parent))
697
bool inBody =
LookupPosition
.IsBetweenTokens(_position, parent.OpenBraceToken, parent.CloseBraceToken) ||
698
LookupPosition
.IsInAttributeSpecification(_position, parent.AttributeLists);
727
if (!
LookupPosition
.IsInTypeDeclaration(_position, parent))
738
LookupPosition
.IsBetweenTokens(_position, parent.OpenBraceToken, parent.CloseBraceToken))
742
else if (
LookupPosition
.IsInAttributeSpecification(_position, parent.AttributeLists))
746
else if (
LookupPosition
.IsInTypeParameterList(_position, parent))
750
else if (
LookupPosition
.IsBetweenTokens(_position, parent.Keyword, parent.OpenBraceToken))
824
if (!
LookupPosition
.IsInNamespaceDeclaration(_position, parent))
831
bool inBody =
LookupPosition
.IsBetweenTokens(_position, parent.OpenBraceToken, parent.CloseBraceToken);
840
if (!
LookupPosition
.IsInNamespaceDeclaration(_position, parent))
1132
if (!
LookupPosition
.IsInXmlAttributeValue(_position, parent))
1168
if (!
LookupPosition
.IsInXmlAttributeValue(_position, parent))
Compilation\CSharpSemanticModel.cs (1)
880
var binder = memberModel.GetEnclosingBinder(
LookupPosition
.IsBetweenTokens(position, argumentList.OpenParenToken, argumentList.CloseParenToken) ? position : argumentList.OpenParenToken.SpanStart);
Compilation\MemberSemanticModel.cs (16)
243
if (
LookupPosition
.IsInStatementScope(position, stmt))
255
if (
LookupPosition
.IsInLocalFunctionTypeParameterScope(position, localFunction))
264
if (
LookupPosition
.IsInCatchBlockScope(position, (CatchClauseSyntax)current))
271
if (
LookupPosition
.IsInCatchFilterScope(position, (CatchFilterClauseSyntax)current))
278
if (
LookupPosition
.IsInAnonymousFunctionOrQuery(position, current))
286
LookupPosition
.IsBetweenTokens(
295
if (
LookupPosition
.IsInSwitchSectionScope(position, (SwitchSectionSyntax)current))
304
if (
LookupPosition
.IsBetweenTokens(position, argList.OpenParenToken, argList.CloseParenToken))
347
if (
LookupPosition
.IsBetweenTokens(position, checkedExpression.OpenParenToken, checkedExpression.CloseParenToken))
391
if (
LookupPosition
.IsBetweenTokens(position, switchStmt.SwitchKeyword, switchStmt.OpenBraceToken))
400
if (
LookupPosition
.IsBetweenTokens(position, forStmt.SecondSemicolonToken, forStmt.CloseParenToken) &&
406
else if (
LookupPosition
.IsBetweenTokens(position, forStmt.FirstSemicolonToken,
LookupPosition
.GetFirstExcludedToken(forStmt)) &&
418
if (
LookupPosition
.IsBetweenTokens(position, start, foreachStmt.Statement.GetFirstToken()))
1387
if (!
LookupPosition
.IsInAnonymousFunctionOrQuery(position, current))
1900
Debug.Assert(
LookupPosition
.IsInAnonymousFunctionOrQuery(position, containingLambda));
Compilation\SyntaxTreeSemanticModel.cs (6)
794
outsideMemberDecl = !
LookupPosition
.IsInBody(position, (AccessorDeclarationSyntax)memberDecl);
799
!
LookupPosition
.IsInConstructorParameterScope(position, constructorDecl) &&
800
!
LookupPosition
.IsInParameterList(position, constructorDecl);
814
outsideMemberDecl = argumentList is null || !
LookupPosition
.IsBetweenTokens(position, argumentList.OpenParenToken, argumentList.CloseParenToken);
824
!
LookupPosition
.IsInBody(position, methodDecl) &&
825
!
LookupPosition
.IsInParameterList(position, methodDecl);
Syntax\CSharpSyntaxNode.cs (1)
402
return
LookupPosition
.IsInXmlAttributeValue(position, (XmlAttributeSyntax)curr)