34 references to TryGetValue
Microsoft.CodeAnalysis (6)
CodeGen\ILBuilderEmit.cs (3)
133
if (_labelInfos.
TryGetValue
(label, out labelInfo))
186
if (!_labelInfos.
TryGetValue
(label, out labelInfo))
286
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 (24)
Binder\ExecutableCodeBinder.cs (1)
61
return this.BinderMap.
TryGetValue
(node, out binder) ? binder : Next.GetBinder(node);
Binder\InMethodBinder.cs (1)
344
if (map.
TryGetValue
(name, out existingDeclaration))
Binder\LocalBinderFactory.cs (2)
835
Debug.Assert(_map.
TryGetValue
(node.Block, out finallyBinder) && finallyBinder.Flags.Includes(BinderFlags.InFinallyBlock));
929
Debug.Assert(!_map.
TryGetValue
(node, out existing) || existing == binder || existing == binder.Next || existing == binder.Next?.Next);
Binder\LocalScopeBinder.cs (7)
338
if (LocalsMap != null && LocalsMap.
TryGetValue
(nameToken.ValueText, out result))
358
if (LocalFunctionsMap != null && LocalFunctionsMap.
TryGetValue
(nameToken.ValueText, out result))
387
if (labelsMap.
TryGetValue
(name, out labelSymbol))
399
if (localsMap.
TryGetValue
(name, out localSymbol))
409
if (localFunctionsMap.
TryGetValue
(name, out localSymbol))
504
if ((localsMap != null && localsMap.
TryGetValue
(name, out existingLocal)) ||
505
(localFunctionsMap != null && localFunctionsMap.
TryGetValue
(name, out existingLocalFunction)))
Binder\WithLambdaParametersBinder.cs (1)
162
if (map != null && map.
TryGetValue
(name, out existingDeclaration))
CodeGen\Optimizer.cs (2)
1765
if (_dummyVariables.
TryGetValue
(label, out dummy))
1782
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)
104
if (Cache.
TryGetValue
(nts, out result))
Lowering\ClosureConversion\ClosureConversion.Analysis.Tree.cs (1)
643
if (_localToScope.
TryGetValue
(symbol, out var declScope))
Symbols\AbstractTypeParameterMap.cs (1)
31
if (Mapping.
TryGetValue
(typeParameter, out result))
Symbols\Metadata\PE\PENamedTypeSymbol.cs (1)
1033
if (handleToFieldMap.
TryGetValue
(handle, out field))
Symbols\Source\SourceNamedTypeSymbol.cs (1)
590
if (!clauseConstraintTypesMap.
TryGetValue
(constraintType1, out index2))
Symbols\Source\TypeParameterConstraintClause.cs (2)
150
if (isValueTypeMap.
TryGetValue
(thisTypeParameter, out bool knownIsValueType))
216
if (isReferenceTypeFromConstraintTypesMap.
TryGetValue
(thisTypeParameter, out bool knownIsReferenceTypeFromConstraintTypes))
Symbols\Tuples\TupleTypeSymbol.cs (1)
1121
if (UnderlyingDefinitionToMemberMap.
TryGetValue
(underlyingMemberDefinition, out Symbol? result))
Microsoft.CodeAnalysis.VisualBasic (4)
Binding\Binder_Expressions.vb (1)
3467
If Not lookup.
TryGetValue
(item, Nothing) Then
Binding\MemberSemanticModel.vb (1)
1240
Return If(Me._guardedBoundNodeMap.
TryGetValue
(node, result), result, Nothing)
Symbols\MergedNamespaceSymbol.vb (1)
680
If Not lookup.
TryGetValue
(item, Nothing) Then
Symbols\Tuples\TupleTypeSymbol.vb (1)
934
If Me.UnderlyingDefinitionToMemberMap.
TryGetValue
(originalDefinition, symbol) Then