1 instantiation of LookupResult
Microsoft.CodeAnalysis.CSharp (1)
Binder\LookupResult.cs (1)
304
pool = new ObjectPool<LookupResult>(() => new
LookupResult
(pool), 128); // we rarely need more than 10
168 references to LookupResult
Microsoft.CodeAnalysis.CSharp (164)
Binder\Binder.CapturedParametersFinder.cs (1)
146
protected override bool CheckAndClearLookupResult(Binder enclosingBinder, IdentifierNameSyntax id,
LookupResult
lookupResult)
Binder\Binder.IdentifierUsedAsValueFinder.cs (4)
19
private
LookupResult
? _lookupResult;
197
_lookupResult ??=
LookupResult
.GetInstance();
205
protected abstract bool CheckAndClearLookupResult(Binder enclosingBinder, IdentifierNameSyntax id,
LookupResult
lookupResult);
257
LookupResult
lookupResult)
Binder\Binder.WithQueryLambdaParametersBinder.cs (3)
93
LookupResult
lookupResult =
LookupResult
.GetInstance();
105
LookupResult
result, string name, int arity, ConsList<TypeSymbol> basesBeingResolved, LookupOptions options, Binder originalBinder, bool diagnose, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo)
Binder\Binder_Attributes.cs (2)
597
LookupResult
result =
LookupResult
.GetInstance();
Binder\Binder_Crefs.cs (2)
344
LookupResult
result =
LookupResult
.GetInstance();
Binder\Binder_Expressions.cs (30)
1481
var
lookupResult =
LookupResult
.GetInstance();
1594
var
lookupResult =
LookupResult
.GetInstance();
1728
void reportPrimaryConstructorParameterShadowing(SimpleNameSyntax node, Symbol symbol, string name, bool invoked,
LookupResult
lookupResult, ArrayBuilder<Symbol> members, BindingDiagnosticBag diagnostics)
1789
private void LookupIdentifier(
LookupResult
lookupResult, SimpleNameSyntax node, bool invoked, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo)
1794
private void LookupIdentifier(
LookupResult
lookupResult, string name, int arity, bool invoked, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo)
2007
var
lookupResult =
LookupResult
.GetInstance();
2398
var
result =
LookupResult
.GetInstance();
7652
var
lookupResult =
LookupResult
.GetInstance();
7755
LookupResult
lookupResult,
7829
LookupResult
lookupResult,
7937
var
lookupResult =
LookupResult
.GetInstance();
8002
private void LookupInstanceMember(
LookupResult
lookupResult, TypeSymbol leftType, bool leftIsBaseReference, string rightName, int rightArity, bool invoked, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo)
8227
LookupResult
lookupResult,
8476
var
lookupResult =
LookupResult
.GetInstance();
8496
private void LookupExtensionMethods(
LookupResult
lookupResult, ExtensionMethodScope scope, string rightName, int arity, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo)
8848
private Symbol GetSymbolOrMethodOrPropertyGroup(
LookupResult
result, SyntaxNode node, string plainName, int arity, ArrayBuilder<Symbol> methodOrPropertyGroup, BindingDiagnosticBag diagnostics, out bool wasError, NamespaceOrTypeSymbol qualifierOpt)
9586
LookupResult
lookupResult =
LookupResult
.GetInstance();
10011
var
lookupResult =
LookupResult
.GetInstance();
10145
var
lookupResult =
LookupResult
.GetInstance();
10167
LookupResult
lookupResult,
Binder\Binder_Invocation.cs (2)
2331
var
lookupResult =
LookupResult
.GetInstance();
Binder\Binder_Lookup.cs (62)
28
LookupResult
result,
47
internal void LookupExtensionMethods(
LookupResult
result, string name, int arity, LookupOptions options, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo)
61
private Binder LookupSymbolsWithFallback(
LookupResult
result, string name, int arity, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo, ConsList<TypeSymbol> basesBeingResolved = null, LookupOptions options = LookupOptions.Default)
82
LookupResult
result, string name, int arity, ConsList<TypeSymbol> basesBeingResolved, LookupOptions options, bool diagnose, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo)
92
var
tmp =
LookupResult
.GetInstance();
116
LookupResult
result, string name, int arity, ConsList<TypeSymbol> basesBeingResolved, LookupOptions options, Binder originalBinder, bool diagnose, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo)
126
LookupResult
result,
148
private void LookupMembersWithFallback(
LookupResult
result, NamespaceOrTypeSymbol nsOrType, string name, int arity, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo, ConsList<TypeSymbol> basesBeingResolved = null, LookupOptions options = LookupOptions.Default)
164
protected void LookupMembersInternal(
LookupResult
result, NamespaceOrTypeSymbol nsOrType, string name, int arity, ConsList<TypeSymbol> basesBeingResolved, LookupOptions options, Binder originalBinder, bool diagnose, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo)
180
protected void LookupMembersInType(
LookupResult
result, TypeSymbol type, string name, int arity, ConsList<TypeSymbol> basesBeingResolved, LookupOptions options, Binder originalBinder, bool diagnose, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo)
220
private void LookupMembersInErrorType(
LookupResult
result, ErrorTypeSymbol errorType, string name, int arity, ConsList<TypeSymbol> basesBeingResolved, LookupOptions options, Binder originalBinder, bool diagnose, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo)
255
protected void LookupMembersInSubmissions(
LookupResult
result, TypeSymbol submissionClass, CompilationUnitSyntax declarationSyntax, bool inUsings, string name, int arity, ConsList<TypeSymbol> basesBeingResolved,
258
LookupResult
submissionSymbols =
LookupResult
.GetInstance();
259
LookupResult
nonViable =
LookupResult
.GetInstance();
307
result.SetFrom(
LookupResult
.Good(error)); // force lookup to be done w/ error symbol as result
401
LookupResult
result,
443
private static void LookupMembersInNamespace(
LookupResult
result, NamespaceSymbol ns, string name, int arity, LookupOptions options, Binder originalBinder, bool diagnose, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo)
460
private void LookupExtensionMethodsInSingleBinder(ExtensionMethodScope scope,
LookupResult
result, string name, int arity, LookupOptions options, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo)
488
LookupResult
result,
526
LookupResult
resultWithSuffix = null;
532
resultWithSuffix =
LookupResult
.GetInstance();
587
private bool IsAmbiguousResult(
LookupResult
result, out Symbol resultSymbol)
668
private bool IsSingleViableAttributeType(
LookupResult
result, out Symbol symbol, ref CompoundUseSiteInfo<AssemblySymbol> attributeTypeViabilityUseSiteInfo)
691
return
LookupResult
.NotAnAttributeType(symbol, diagInfo);
763
protected static void LookupMembersWithoutInheritance(
LookupResult
result, TypeSymbol type, string name, int arity,
779
LookupResult
result,
794
LookupResult
result,
810
var
tmp =
LookupResult
.GetInstance();
841
result.SetFrom(
LookupResult
.Good(error)); // force lookup to be done w/ error symbol as result
874
LookupResult
result,
910
var
tmp =
LookupResult
.GetInstance();
1013
LookupResult
current,
1116
LookupResult
current,
1129
var
tmp =
LookupResult
.GetInstance();
1150
private void LookupMembersInInterface(
LookupResult
current, NamedTypeSymbol type, string name, int arity, ConsList<TypeSymbol> basesBeingResolved, LookupOptions options, Binder originalBinder, bool diagnose, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo)
1159
var
tmp =
LookupResult
.GetInstance();
1168
private void LookupMembersInTypeParameter(
LookupResult
current, TypeParameterSymbol typeParameter, string name, int arity, ConsList<TypeSymbol> basesBeingResolved, LookupOptions options, Binder originalBinder, bool diagnose, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo)
1224
private void MergeHidingLookupResults(
LookupResult
resultHiding,
LookupResult
resultHidden, ConsList<TypeSymbol> basesBeingResolved, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo)
1400
return
LookupResult
.Empty();
1404
return
LookupResult
.Empty();
1409
return
LookupResult
.Empty();
1414
return
LookupResult
.Empty();
1418
return
LookupResult
.WrongArity(symbol, diagInfo);
1428
return
LookupResult
.NotReferencable(symbol, diagInfo);
1432
return
LookupResult
.NotTypeOrNamespace(unwrappedSymbol, symbol, diagnose);
1437
return
LookupResult
.NotInvocable(unwrappedSymbol, symbol, diagnose);
1443
return
LookupResult
.Inaccessible(symbol, diagInfo);
1469
return
LookupResult
.Inaccessible(symbol, diagInfo);
1474
return
LookupResult
.NotReferencable(symbol, diagInfo);
1479
return
LookupResult
.StaticInstanceMismatch(symbol, diagInfo);
1484
return
LookupResult
.StaticInstanceMismatch(symbol, diagInfo);
1489
return
LookupResult
.NotTypeOrNamespace(symbol, diagInfo);
1494
return
LookupResult
.NotLabel(symbol, diagInfo);
1498
return
LookupResult
.Good(symbol);
Binder\Binder_Statements.cs (2)
474
var
result =
LookupResult
.GetInstance();
Binder\Binder_Symbols.cs (16)
199
var
lookupResult =
LookupResult
.GetInstance();
363
var
result =
LookupResult
.GetInstance();
871
var
result =
LookupResult
.GetInstance();
951
static bool isViableType(
LookupResult
result)
972
static bool isViableNamespace(
LookupResult
result)
1274
var
lookupResult =
LookupResult
.GetInstance();
1422
LookupResult
lookupResult,
1444
LookupResult
tempLookupResult = null;
1525
ref
LookupResult
lookupResult,
1539
lookupResult ??=
LookupResult
.GetInstance();
1903
LookupResult
result,
1932
LookupResult
result,
Binder\Binder_XmlNameAttribute.cs (2)
30
var
lookupResult =
LookupResult
.GetInstance();
Binder\ForEachLoopBinder.cs (6)
1333
var
lookupResult =
LookupResult
.GetInstance();
1352
private MethodArgumentInfo FindForEachPatternMethod(SyntaxNode syntax, SyntaxNode collectionSyntax, TypeSymbol patternType, string methodName,
LookupResult
lookupResult, bool warningsOnly, BindingDiagnosticBag diagnostics, bool isAsync)
1617
LookupResult
lookupResult =
LookupResult
.GetInstance();
1858
private void ReportPatternMemberLookupDiagnostics(SyntaxNode collectionSyntax,
LookupResult
lookupResult, TypeSymbol patternType, string memberName, bool warningsOnly, BindingDiagnosticBag diagnostics)
Binder\HostObjectModeBinder.cs (1)
33
LookupResult
result, string name, int arity, ConsList<TypeSymbol> basesBeingResolved, LookupOptions options, Binder originalBinder, bool diagnose, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo)
Binder\InContainerBinder.cs (2)
104
LookupResult
result, string name, int arity, ConsList<TypeSymbol> basesBeingResolved, LookupOptions options, Binder originalBinder, bool diagnose, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo)
122
result.SetFrom(
LookupResult
.Good(error)); // force lookup to be done w/ error symbol as result
Binder\InMethodBinder.cs (1)
194
LookupResult
result, string name, int arity, ConsList<TypeSymbol> basesBeingResolved, LookupOptions options, Binder originalBinder, bool diagnose, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo)
Binder\InSubmissionClassBinder.cs (1)
48
LookupResult
result, string name, int arity, ConsList<TypeSymbol> basesBeingResolved, LookupOptions options, Binder originalBinder, bool diagnose, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo)
Binder\LocalScopeBinder.cs (2)
422
LookupResult
result, string name, int arity, ConsList<TypeSymbol> basesBeingResolved, LookupOptions options, Binder originalBinder, bool diagnose, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo)
435
result.MergeEqual(
LookupResult
.Good(labelSymbol));
Binder\LookupResult.cs (10)
73
private readonly ObjectPool<
LookupResult
> _pool;
75
private LookupResult(ObjectPool<
LookupResult
> pool)
227
internal void SetFrom(
LookupResult
other)
243
internal void MergePrioritized(
LookupResult
other)
256
internal void MergeEqual(
LookupResult
other)
298
private static readonly ObjectPool<
LookupResult
> s_poolInstance = CreatePool();
301
internal static ObjectPool<
LookupResult
> CreatePool()
303
ObjectPool<
LookupResult
> pool = null;
304
pool = new ObjectPool<
LookupResult
>(() => new LookupResult(pool), 128); // we rarely need more than 10
308
internal static
LookupResult
GetInstance()
Binder\NameofBinder.cs (3)
60
internal override void LookupSymbolsInSingleBinder(
LookupResult
result, string name, int arity, ConsList<TypeSymbol> basesBeingResolved, LookupOptions options, Binder originalBinder, bool diagnose, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo)
81
var
tmp =
LookupResult
.GetInstance();
Binder\WithExternAliasesBinder.cs (1)
33
LookupResult
result, string name, int arity, ConsList<TypeSymbol> basesBeingResolved, LookupOptions options, Binder originalBinder, bool diagnose, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo)
Binder\WithExternAndUsingAliasesBinder.cs (1)
37
LookupResult
result, string name, int arity, ConsList<TypeSymbol> basesBeingResolved, LookupOptions options, Binder originalBinder, bool diagnose, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo)
Binder\WithLambdaParametersBinder.cs (1)
87
LookupResult
result, string name, int arity, ConsList<TypeSymbol> basesBeingResolved, LookupOptions options, Binder originalBinder, bool diagnose, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo)
Binder\WithParametersBinder.cs (1)
46
LookupResult
result, string name, int arity, ConsList<TypeSymbol> basesBeingResolved, LookupOptions options, Binder originalBinder, bool diagnose, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo)
Binder\WithPrimaryConstructorParametersBinder.cs (1)
64
LookupResult
result, string name, int arity, ConsList<TypeSymbol> basesBeingResolved, LookupOptions options, Binder originalBinder, bool diagnose, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo)
Binder\WithTypeParametersBinder.cs (1)
39
LookupResult
result, string name, int arity, ConsList<TypeSymbol> basesBeingResolved, LookupOptions options, Binder originalBinder, bool diagnose, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo)
Binder\WithUsingNamespacesAndTypesBinder.cs (1)
133
LookupResult
result, string name, int arity, ConsList<TypeSymbol>? basesBeingResolved, LookupOptions options, Binder originalBinder, bool diagnose, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo)
BoundTree\BoundMethodGroup.cs (1)
19
LookupResult
lookupResult,
Compilation\CSharpSemanticModel.cs (4)
1657
var
lookupResult =
LookupResult
.GetInstance();
1733
var
lookupResult =
LookupResult
.GetInstance();
Microsoft.CodeAnalysis.CSharp.Semantic.UnitTests (2)
Semantics\LookupTests.cs (2)
438
var
lookupResult = LookupResult.GetInstance();
585
var
lookupResult = LookupResult.GetInstance();
Microsoft.CodeAnalysis.CSharp.Symbol.UnitTests (2)
Compilation\SemanticModelGetDeclaredSymbolAPITests.cs (1)
2174
var
lookupResult = LookupResult.GetInstance();
DocumentationComments\CrefTests.cs (1)
5518
var
lookupResult = LookupResult.GetInstance();