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