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