29 references to TryGetValue
Microsoft.CodeAnalysis (6)
CodeGen\ILBuilderEmit.cs (3)
125
if (_labelInfos.
TryGetValue
(label, out labelInfo))
178
if (!_labelInfos.
TryGetValue
(label, out labelInfo))
283
if (!_labelInfos.
TryGetValue
(label, out ld))
Collections\SmallDictionary.cs (2)
92
if (!
TryGetValue
(key, out value!))
109
return
TryGetValue
(key, out value!);
DiagnosticAnalyzer\SuppressMessageAttributeState.cs (1)
32
=> s_suppressMessageScopeTypes.
TryGetValue
(info.Scope ?? string.Empty, out scope);
Microsoft.CodeAnalysis.CSharp (23)
Binder\ExecutableCodeBinder.cs (1)
61
return this.BinderMap.
TryGetValue
(node, out binder) ? binder : Next.GetBinder(node);
Binder\InMethodBinder.cs (1)
363
if (map.
TryGetValue
(name, out existingDeclaration))
Binder\LocalBinderFactory.cs (1)
1024
Debug.Assert(!_map.
TryGetValue
(node, out existing) || existing == binder || existing == binder.Next || existing == binder.Next?.Next);
Binder\LocalScopeBinder.cs (7)
384
if (LocalsMap != null && LocalsMap.
TryGetValue
(nameToken.ValueText, out result))
404
if (LocalFunctionsMap != null && LocalFunctionsMap.
TryGetValue
(nameToken.ValueText, out result))
433
if (labelsMap.
TryGetValue
(name, out labelSymbol))
445
if (localsMap.
TryGetValue
(name, out localSymbol))
455
if (localFunctionsMap.
TryGetValue
(name, out localSymbol))
550
if ((localsMap != null && localsMap.
TryGetValue
(name, out existingLocal)) ||
551
(localFunctionsMap != null && localFunctionsMap.
TryGetValue
(name, out existingLocalFunction)))
Binder\WithLambdaParametersBinder.cs (1)
162
if (map != null && map.
TryGetValue
(name, out existingDeclaration))
CodeGen\Optimizer.cs (2)
1841
if (_dummyVariables.
TryGetValue
(label, out dummy))
1858
if (_dummyVariables.
TryGetValue
(label, out dummy))
Compiler\TypeCompilationState.cs (1)
225
if (_constructorInitializers.
TryGetValue
(next, out next))
FlowAnalysis\AbstractFlowPass_LocalFunctions.cs (1)
51
if (!_localFuncVarUsages.
TryGetValue
(localFunc, out TLocalFunctionState? usages))
FlowAnalysis\EmptyStructTypeCache.cs (1)
99
if (Cache.
TryGetValue
(nts, out result))
Lowering\ClosureConversion\ClosureConversion.Analysis.Tree.cs (1)
662
if (_localToScope.
TryGetValue
(symbol, out var declScope))
Symbols\AbstractTypeParameterMap.cs (1)
31
if (Mapping.
TryGetValue
(typeParameter, out result))
Symbols\Metadata\PE\PENamedTypeSymbol.cs (1)
1252
if (handleToFieldMap.
TryGetValue
(handle, out field))
Symbols\Source\SourceNamedTypeSymbol.cs (1)
590
if (!clauseConstraintTypesMap.
TryGetValue
(constraintType1, out index2))
Symbols\Source\TypeParameterConstraintClause.cs (2)
153
if (isValueTypeMap.
TryGetValue
(thisTypeParameter, out bool knownIsValueType))
219
if (isReferenceTypeFromConstraintTypesMap.
TryGetValue
(thisTypeParameter, out bool knownIsReferenceTypeFromConstraintTypes))
Symbols\Tuples\TupleTypeSymbol.cs (1)
1114
if (UnderlyingDefinitionToMemberMap.
TryGetValue
(underlyingMemberDefinition, out Symbol? result))