Implemented interface members:
570 references to TryGetValue
AnalyzerRunner (2)
DiagnosticAnalyzerRunner.cs (2)
180if (!analyzers.TryGetValue(project.Language, out var languageAnalyzers)) 334if (!analyzers.TryGetValue(project.Language, out var languageAnalyzers) || languageAnalyzers.IsEmpty)
BuildActionTelemetryTable (6)
Program.cs (3)
153if (!CodeActionDescriptionMap.TryGetValue(actionTypeName, out var description)) 183if (!CodeActionDescriptionMap.TryGetValue(actionTypeName, out var description)) 222if (!CodeActionDescriptionMap.TryGetValue(actionOrProviderTypeName, out var description))
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\DiagnosticDescriptorExtensions.cs (3)
45(!compilationOptions.SpecificDiagnosticOptions.TryGetValue(descriptor.Id, out var reportDiagnostic) || 48if (treeOptions.TryGetValue(descriptor.Id, out reportDiagnostic) && reportDiagnostic != ReportDiagnostic.Default || 70if (!compilationOptions.SpecificDiagnosticOptions.TryGetValue(descriptor.Id, out var reportDiagnostic) ||
ILLink.RoslynAnalyzer (1)
DataFlow\LocalDataFlowVisitor.cs (1)
57 => !lValueFlowCaptures.TryGetValue (captureId, out var captureKind) || captureKind != FlowCaptureKind.LValueCapture;
Metrics (8)
src\RoslynAnalyzers\Utilities\Compiler\Extensions\DiagnosticExtensions.cs (1)
251if (options.TryGetValue(rule.Id, out var value))
src\RoslynAnalyzers\Utilities\Compiler\Lightup\OperationWrapperHelper.cs (1)
30if (WrappedTypes.TryGetValue(wrapperType, out var wrappedType))
src\RoslynAnalyzers\Utilities\Compiler\Options\AggregateCategorizedAnalyzerConfigOptions.cs (1)
131return _perTreeOptions.TryGetValue(tree, out var lazyTreeOptions) &&
src\RoslynAnalyzers\Utilities\Compiler\Options\SymbolNamesWithValueOption.cs (5)
238if (_symbols.TryGetValue(symbol, out value) || _names.TryGetValue(symbol.Name, out value)) 309if (_wildcardNamesBySymbolKind.TryGetValue(symbol.Kind, out var names) && 319if (_wildcardNamesBySymbolKind.TryGetValue(AllKinds, out var value) && 329if (_wildcardNamesBySymbolKind.TryGetValue(AllKinds, out var allKindsValue) &&
Metrics.Legacy (8)
src\RoslynAnalyzers\Utilities\Compiler\Extensions\DiagnosticExtensions.cs (1)
251if (options.TryGetValue(rule.Id, out var value))
src\RoslynAnalyzers\Utilities\Compiler\Lightup\OperationWrapperHelper.cs (1)
30if (WrappedTypes.TryGetValue(wrapperType, out var wrappedType))
src\RoslynAnalyzers\Utilities\Compiler\Options\AggregateCategorizedAnalyzerConfigOptions.cs (1)
131return _perTreeOptions.TryGetValue(tree, out var lazyTreeOptions) &&
src\RoslynAnalyzers\Utilities\Compiler\Options\SymbolNamesWithValueOption.cs (5)
238if (_symbols.TryGetValue(symbol, out value) || _names.TryGetValue(symbol.Name, out value)) 309if (_wildcardNamesBySymbolKind.TryGetValue(symbol.Kind, out var names) && 319if (_wildcardNamesBySymbolKind.TryGetValue(AllKinds, out var value) && 329if (_wildcardNamesBySymbolKind.TryGetValue(AllKinds, out var allKindsValue) &&
Microsoft.AspNetCore.Analyzers (2)
StartupAnalysis.cs (2)
25if (_analysesByType.TryGetValue(type, out var list)) 42if (_analysesByType.TryGetValue(type, out var list))
Microsoft.AspNetCore.App.Analyzers (4)
RouteEmbeddedLanguage\FrameworkParametersCompletionProvider.cs (2)
68if (!item.Properties.TryGetValue(DescriptionKey, out var description)) 85item.Properties.TryGetValue(NewPositionKey, out var newPositionString);
RouteEmbeddedLanguage\RoutePatternCompletionProvider.cs (2)
62if (!item.Properties.TryGetValue(DescriptionKey, out var description)) 79item.Properties.TryGetValue(NewPositionKey, out var newPositionString);
Microsoft.AspNetCore.App.CodeFixes (3)
Http\HeaderDictionaryIndexerFixer.cs (2)
27if (diagnostic.Properties.TryGetValue("HeaderName", out var headerName) && 28diagnostic.Properties.TryGetValue("ResolvedPropertyName", out var resolvedPropertyName))
RouteParameterUnusedParameterFixer.cs (1)
47if (diagnostic.Properties.TryGetValue("RouteParameterName", out var routeParameterName))
Microsoft.AspNetCore.Http.Extensions.Tests (1)
RequestDelegateGenerator\RequestDelegateCreationTestBase.cs (1)
87if (result.TrackedSteps.TryGetValue(stepName, out var staticEndpointSteps))
Microsoft.AspNetCore.Http.Microbenchmarks (1)
src\Http\Http.Extensions\test\RequestDelegateGenerator\RequestDelegateCreationTestBase.cs (1)
87if (result.TrackedSteps.TryGetValue(stepName, out var staticEndpointSteps))
Microsoft.Build (7)
BuildCheck\Infrastructure\EditorConfig\EditorConfigFile.cs (1)
45internal bool IsRoot => GlobalSection.Properties.TryGetValue("root", out string? val) && val?.ToLower() == "true";
Collections\CopyOnWritePropertyDictionary.cs (5)
100_backing.TryGetValue(name, out T projectProperty); 120if (_backing.TryGetValue(name, out T value)) 181if (!thatBacking.TryGetValue(thisProp.Key, out T thatProp) || 263bool IDictionary<string, T>.TryGetValue(string key, out T value) => _backing.TryGetValue(key, out value); 282if (_backing.TryGetValue(item.Key, out T value))
CopyOnWriteDictionary.cs (1)
249return _backing.TryGetValue(key, out value);
Microsoft.Build.BuildCheck.UnitTests (1)
EditorConfig_Tests.cs (1)
888Assert.True(properties.TryGetValue("my_PrOp", out var val));
Microsoft.Build.Tasks.Core (1)
CopyOnWriteDictionary.cs (1)
249return _backing.TryGetValue(key, out value);
Microsoft.Build.Utilities.Core (1)
CopyOnWriteDictionary.cs (1)
249return _backing.TryGetValue(key, out value);
Microsoft.CodeAnalysis (21)
CommandLine\AnalyzerConfig.cs (2)
114internal bool IsRoot => GlobalSection.Properties.TryGetValue("root", out string? val) && val == "true"; 142if (GlobalSection.Properties.TryGetValue(GlobalLevelKey, out string? val) && int.TryParse(val, out int level))
Compilation\SyntaxTreeOptionsProvider.cs (4)
75=> _options.TryGetValue(tree, out var value) ? value.IsGenerated : GeneratedKind.Unknown; 79if (_options.TryGetValue(tree, out var value)) 81return value.DiagnosticOptions.TryGetValue(diagnosticId, out severity); 91return _globalOptions.TreeOptions.TryGetValue(diagnosticId, out severity);
Diagnostic\SuppressionDescriptor.cs (1)
109return compilationOptions.SpecificDiagnosticOptions.TryGetValue(Id, out var reportDiagnostic) &&
DiagnosticAnalyzer\AnalysisResultBuilder.cs (1)
310if (_pathToAdditionalTextMap.TryGetValue(externalFileLocation.GetLineSpan().Path, out var additionalTexts))
DiagnosticAnalyzer\AnalyzerDriver.cs (3)
911if (AnalyzerExecutionTimes.TryGetValue(analyzer, out var analyzerExecutionTimeSpan)) 952if (compilation.Options.SpecificDiagnosticOptions.TryGetValue(descriptor.Id, out var severity) || 1068if (programmaticSuppressionsByDiagnostic.TryGetValue(diagnostic, out var programmaticSuppressionInfo))
DiagnosticAnalyzer\AnalyzerManager.cs (1)
389if ((diagnosticOptions.TryGetValue(diag.Id, out var severity) && severity != ReportDiagnostic.Default) ||
DiagnosticAnalyzer\CompilerAnalyzerConfigOptionsProvider.cs (2)
29=> _treeDict.TryGetValue(tree, out var options) ? options : DictionaryAnalyzerConfigOptions.Empty; 32=> _treeDict.TryGetValue(textFile, out var options) ? options : DictionaryAnalyzerConfigOptions.Empty;
DiagnosticAnalyzer\DictionaryAnalyzerConfigOptions.cs (1)
25=> Options.TryGetValue(key, out value);
DiagnosticAnalyzer\SuppressMessageAttributeState.cs (1)
222return suppressions.TryGetValue(id, out info);
Operations\ControlFlowGraph.cs (2)
246if (!_localFunctionsMap.TryGetValue(localFunction, out (ControlFlowRegion enclosing, ILocalFunctionOperation operation, int ordinal) info)) 295if (!_anonymousFunctionsMap.TryGetValue(anonymousFunction, out (ControlFlowRegion enclosing, int ordinal) info))
ReferenceManager\CommonReferenceManager.Binding.cs (1)
541if (!implicitReferenceResolutions.TryGetValue(referenceIdentity, out resolvedReference))
SourceGeneration\GeneratedCodeUtilities.cs (1)
152if (options.TryGetValue("generated_code", out string? optionValue) &&
Syntax\AbstractWarningStateMap.cs (1)
43if (entry.SpecificWarningOption.TryGetValue(id, out state))
Microsoft.CodeAnalysis.Analyzers (17)
MetaAnalyzers\CompareSymbolsCorrectlyAnalyzer.cs (1)
214if (equalityComparerMethods.TryGetValue(method.Name, out var possibleMethodTypes) &&
MetaAnalyzers\DiagnosticDescriptorCreationAnalyzer.cs (2)
697if (!diagnostic.Properties.TryGetValue(DefineDescriptorArgumentCorrectlyFixAdditionalDocumentLocationInfo, out var locationInfo) 850if (map.TryGetValue(nameOfLocalizableResource, out var resourceStringTuple))
MetaAnalyzers\DiagnosticDescriptorCreationAnalyzer_IdRangeAndCategoryValidation.cs (1)
176categoryAndAllowedIdsInfoMap.TryGetValue(category, out allowedIdsInfoList))
MetaAnalyzers\Fixers\AnalyzerReleaseTrackingFix.cs (2)
126diagnostic.Properties.TryGetValue(DiagnosticDescriptorCreationAnalyzer.EntryToAddPropertyName, out entryToAdd) && 143diagnostic.Properties.TryGetValue(DiagnosticDescriptorCreationAnalyzer.EntryToUpdatePropertyName, out entryToUpdate) &&
MetaAnalyzers\Fixers\CompareSymbolsCorrectlyFix.cs (1)
37if (diagnostic.Properties.TryGetValue(CompareSymbolsCorrectlyAnalyzer.RulePropertyName, out var rule))
MetaAnalyzers\Fixers\DefineDiagnosticDescriptorArgumentsCorrectlyFix.cs (1)
136=> diagnostic.Properties.TryGetValue(DiagnosticDescriptorCreationAnalyzer.DefineDescriptorArgumentCorrectlyFixValue, out fixValue) &&
MetaAnalyzers\ReportDiagnosticAnalyzer.cs (1)
146if (_supportedDescriptorFieldsMap.TryGetValue(analyzer, out ImmutableArray<IFieldSymbol> descriptorFields))
src\RoslynAnalyzers\Utilities\Compiler\Extensions\DiagnosticExtensions.cs (1)
251if (options.TryGetValue(rule.Id, out var value))
src\RoslynAnalyzers\Utilities\Compiler\Lightup\OperationWrapperHelper.cs (1)
30if (WrappedTypes.TryGetValue(wrapperType, out var wrappedType))
src\RoslynAnalyzers\Utilities\Compiler\Options\AggregateCategorizedAnalyzerConfigOptions.cs (1)
131return _perTreeOptions.TryGetValue(tree, out var lazyTreeOptions) &&
src\RoslynAnalyzers\Utilities\Compiler\Options\SymbolNamesWithValueOption.cs (5)
238if (_symbols.TryGetValue(symbol, out value) || _names.TryGetValue(symbol.Name, out value)) 309if (_wildcardNamesBySymbolKind.TryGetValue(symbol.Kind, out var names) && 319if (_wildcardNamesBySymbolKind.TryGetValue(AllKinds, out var value) && 329if (_wildcardNamesBySymbolKind.TryGetValue(AllKinds, out var allKindsValue) &&
Microsoft.CodeAnalysis.AnalyzerUtilities (36)
src\RoslynAnalyzers\Utilities\Compiler\Extensions\DiagnosticExtensions.cs (1)
251if (options.TryGetValue(rule.Id, out var value))
src\RoslynAnalyzers\Utilities\Compiler\Lightup\OperationWrapperHelper.cs (1)
30if (WrappedTypes.TryGetValue(wrapperType, out var wrappedType))
src\RoslynAnalyzers\Utilities\Compiler\Options\AggregateCategorizedAnalyzerConfigOptions.cs (1)
131return _perTreeOptions.TryGetValue(tree, out var lazyTreeOptions) &&
src\RoslynAnalyzers\Utilities\Compiler\Options\SymbolNamesWithValueOption.cs (5)
238if (_symbols.TryGetValue(symbol, out value) || _names.TryGetValue(symbol.Name, out value)) 309if (_wildcardNamesBySymbolKind.TryGetValue(symbol.Kind, out var names) && 319if (_wildcardNamesBySymbolKind.TryGetValue(AllKinds, out var value) && 329if (_wildcardNamesBySymbolKind.TryGetValue(AllKinds, out var allKindsValue) &&
src\RoslynAnalyzers\Utilities\FlowAnalysis\FlowAnalysis\Analysis\PointsToAnalysis\PointsToAnalysisResult.cs (1)
49if (map.TryGetValue(key, out var escapedLocations))
src\RoslynAnalyzers\Utilities\FlowAnalysis\FlowAnalysis\Analysis\PropertySetAnalysis\HazardousUsageEvaluatorCollection.cs (6)
53return this.HazardousUsageEvaluators.TryGetValue( 64if (this.HazardousUsageEvaluators.TryGetValue( 67|| this.HazardousUsageEvaluators.TryGetValue( 81return this.HazardousUsageEvaluators.TryGetValue( 90return this.HazardousUsageEvaluators.TryGetValue( 99return this.HazardousUsageEvaluators.TryGetValue(
src\RoslynAnalyzers\Utilities\FlowAnalysis\FlowAnalysis\Analysis\PropertySetAnalysis\PropertyMapperCollection.cs (1)
91if (this.PropertyMappersWithIndex.TryGetValue(propertyName, out (int Index, PropertyMapper PropertyMapper) tuple))
src\RoslynAnalyzers\Utilities\FlowAnalysis\FlowAnalysis\Analysis\PropertySetAnalysis\PropertySetAnalysis.PropertySetDataFlowOperationVisitor.cs (4)
358if (!this.DataFlowAnalysisContext.PointsToAnalysisResult!.ExitBlockOutput.Data.TryGetValue( 383if (!exitBlockOutput.Data.TryGetValue( 561if (this.DataFlowAnalysisContext.HazardousUsageTypesToNames.TryGetValue( 571if (this.DataFlowAnalysisContext.HazardousUsageTypesToNames.TryGetValue(
src\RoslynAnalyzers\Utilities\FlowAnalysis\FlowAnalysis\Analysis\TaintedDataAnalysis\TaintedDataAnalysis.TaintedDataOperationVisitor.cs (1)
700else if (sinkInfo.SinkMethodParameters.TryGetValue(method.MetadataName, out var sinkParameters)
src\RoslynAnalyzers\Utilities\FlowAnalysis\FlowAnalysis\Analysis\TaintedDataAnalysis\TaintedDataConfig.cs (3)
194if (map.TryGetValue(sinkKind, out var lazySourceSymbolMap)) 207if (s_sinkKindToSourceInfo.TryGetValue(sinkKind, out var sourceInfo)) 260if (s_sinkKindToSanitizerInfo.TryGetValue(sinkKind, out var sanitizerInfo))
src\RoslynAnalyzers\Utilities\FlowAnalysis\FlowAnalysis\Analysis\TaintedDataAnalysis\TaintedDataSymbolMap.cs (3)
124&& this.InterfaceInfos.TryGetValue(namedTypeSymbol.OriginalDefinition, out var infoForInterfaceSymbol)) 131if (this.InterfaceInfos.TryGetValue(interfaceSymbol.OriginalDefinition, out var info)) 142if (this.ConcreteInfos.TryGetValue(typeSymbol.OriginalDefinition, out var info))
src\RoslynAnalyzers\Utilities\FlowAnalysis\FlowAnalysis\Framework\DataFlow\DataFlowAnalysisResult.cs (4)
111if (_operationStateMap.TryGetValue(operation, out var value)) 149if (_interproceduralResultsMap.TryGetValue(operation, out var result)) 160if (_standaloneLocalFunctionAnalysisResultsMap.TryGetValue(localFunction, out var result)) 222public PredicateValueKind GetPredicateKind(IOperation operation) => _predicateValueKindMap.TryGetValue(operation, out var valueKind) ? valueKind : PredicateValueKind.Unknown;
src\RoslynAnalyzers\Utilities\FlowAnalysis\FlowAnalysis\Framework\DataFlow\DataFlowOperationVisitor.cs (5)
567if (argumentValuesMap.TryGetValue(parameter.OriginalDefinition, out var argumentInfo)) 671_lazyParameterEntities.TryGetValue(parameter, out var parameterEntity) && 1156return outputData.TryGetValue(analysisEntity, out pointsToAbstractValue); 1163if (inputData.TryGetValue(analysisEntity, out PointsToAbstractValue? pointsToAbstractValue)) 1177if (inputData == null || !inputData.TryGetValue(analysisEntity, out PointsToAbstractValue? pointsToAbstractValue))
Microsoft.CodeAnalysis.BannedApiAnalyzers (9)
RestrictedInternalsVisibleToAnalyzer.cs (1)
211!restrictedInternalsVisibleToMap.TryGetValue(symbol.ContainingAssembly, out var allowedNamespaces) ||
src\RoslynAnalyzers\Utilities\Compiler\Extensions\DiagnosticExtensions.cs (1)
251if (options.TryGetValue(rule.Id, out var value))
src\RoslynAnalyzers\Utilities\Compiler\Lightup\OperationWrapperHelper.cs (1)
30if (WrappedTypes.TryGetValue(wrapperType, out var wrappedType))
src\RoslynAnalyzers\Utilities\Compiler\Options\AggregateCategorizedAnalyzerConfigOptions.cs (1)
131return _perTreeOptions.TryGetValue(tree, out var lazyTreeOptions) &&
src\RoslynAnalyzers\Utilities\Compiler\Options\SymbolNamesWithValueOption.cs (5)
238if (_symbols.TryGetValue(symbol, out value) || _names.TryGetValue(symbol.Name, out value)) 309if (_wildcardNamesBySymbolKind.TryGetValue(symbol.Kind, out var names) && 319if (_wildcardNamesBySymbolKind.TryGetValue(AllKinds, out var value) && 329if (_wildcardNamesBySymbolKind.TryGetValue(AllKinds, out var allKindsValue) &&
Microsoft.CodeAnalysis.CodeStyle (16)
src\Analyzers\Core\Analyzers\RemoveUnnecessarySuppressions\AbstractRemoveUnnecessaryPragmaSuppressionsDiagnosticAnalyzer.cs (3)
105compilationWithAnalyzers.Compilation.Options.SpecificDiagnosticOptions.TryGetValue(IDEDiagnosticIds.RemoveUnnecessarySuppressionDiagnosticId, out severity)) 466if (analysisResult.SyntaxDiagnostics.TryGetValue(semanticModel.SyntaxTree, out var diagnostics)) 473if (analysisResult.SemanticDiagnostics.TryGetValue(semanticModel.SyntaxTree, out diagnostics))
src\Analyzers\Core\Analyzers\RemoveUnusedParametersAndValues\AbstractRemoveUnusedParametersAndValuesDiagnosticAnalyzer.cs (1)
298diagnostic.Properties.TryGetValue(UnusedValuePreferenceKey, out var preferenceString))
src\Compilers\Core\Portable\DiagnosticAnalyzer\DictionaryAnalyzerConfigOptions.cs (1)
25=> Options.TryGetValue(key, out value);
src\Compilers\Core\Portable\SourceGeneration\GeneratedCodeUtilities.cs (1)
152if (options.TryGetValue("generated_code", out string? optionValue) &&
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\DiagnosticDescriptorExtensions.cs (3)
45(!compilationOptions.SpecificDiagnosticOptions.TryGetValue(descriptor.Id, out var reportDiagnostic) || 48if (treeOptions.TryGetValue(descriptor.Id, out reportDiagnostic) && reportDiagnostic != ReportDiagnostic.Default || 70if (!compilationOptions.SpecificDiagnosticOptions.TryGetValue(descriptor.Id, out var reportDiagnostic) ||
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\FlowAnalysis\SymbolUsageAnalysis\SymbolUsageAnalysis.DataFlowAnalyzer.FlowGraphAnalysisData.cs (1)
460=> !LValueFlowCapturesInGraph.TryGetValue(captureId, out var captureKind) || captureKind != FlowCaptureKind.LValueCapture;
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\AliasSymbolCache.cs (1)
43symbolMap.TryGetValue(targetSymbol, out aliasSymbol);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\BidirectionalMap.cs (4)
42=> _forwardMap.TryGetValue(key, out value); 45=> _backwardMap.TryGetValue(value, out key); 55if (!_forwardMap.TryGetValue(key, out var value)) 67if (!_backwardMap.TryGetValue(value, out var key))
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\IDictionaryExtensions.cs (1)
161if (dictionary.TryGetValue(key, out var collection))
Microsoft.CodeAnalysis.CodeStyle.Fixes (5)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Extensions\SyntaxGeneratorExtensions_Negate.cs (1)
151if (!s_negatedBinaryMap.TryGetValue(binaryOperation.OperatorKind, out var negatedKind))
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Workspace\Mef\MefLanguageServices.cs (1)
130if (!_serviceMap.TryGetValue(serviceType, out var service))
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Workspace\Mef\MefWorkspaceServices.cs (3)
139if (!_serviceMap.TryGetValue(serviceType, out var service)) 178if (!currentServicesMap.TryGetValue(languageName, out var languageServices)) 211=> _languageServicesMap.TryGetValue(languageName, out languageServices);
Microsoft.CodeAnalysis.CSharp (171)
Binder\Binder_Lookup.cs (2)
448if (usingAliases.TryGetValue(name, out node)) 484if (usingAliases.TryGetValue(name, out alias))
Binder\DecisionDagBuilder.cs (6)
846if (existingState.RemainingValues.TryGetValue(dagTemp, out var existingValuesForTemp)) 930case BoundDagAssignmentEvaluation e when state.RemainingValues.TryGetValue(e.Input, out IValueSet? currentValues): 935if (state.RemainingValues.TryGetValue(e.Target, out IValueSet? targetValues)) 1102whenTrueValues.TryGetValue(test.Input, out IValueSet? whenTrueValuesOpt); 1103whenFalseValues.TryGetValue(test.Input, out IValueSet? whenFalseValuesOpt); 1164if (values.TryGetValue(input, out IValueSet? tempValuesBeforeTest))
BoundTree\NullabilityRewriter.cs (2)
94bool foundInfo = _updatedNullabilities.TryGetValue(currentBinary, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType); 216if (_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType))
BoundTree\UnboundLambda.cs (3)
622if (!_bindingCache!.TryGetValue((delegateType, inExpressionTree), out BoundLambda? result)) 820_returnInferenceCache!.TryGetValue(cacheKey, out BoundLambda? returnInferenceLambda) && 1032if (!_returnInferenceCache!.TryGetValue(cacheKey, out result))
Compilation\CSharpCompilation.cs (1)
3028if (syntaxAndDeclarations.GetLazyState().LoadDirectiveMap.TryGetValue(syntaxTree, out loadDirectives))
Compilation\MemberSemanticModel.cs (2)
725if (_lazyRemappedSymbols.TryGetValue(originalSymbol, out Symbol? remappedSymbol)) 2351if (_lazyRemappedSymbols.TryGetValue(symbol, out var remappedSymbol))
Compilation\SyntaxAndDeclarationManager.cs (6)
393if (includeLoadedTrees && loadDirectiveMap.TryGetValue(oldTree, out oldLoadDirectives)) 416if (loadDirectiveMap.TryGetValue(tree, out loadDirectives)) 446if (loadDirectiveMap.TryGetValue(loadedTree, out nestedLoadDirectives)) 671return loadedSyntaxTreeMap.TryGetValue(tree.FilePath, out loadedTree) && (tree == loadedTree); 685if (loadDirectiveMap.TryGetValue(tree, out loadDirectives)) 730if (loadedSyntaxTreeMap.TryGetValue(directive.ResolvedPath, out loadedTree))
Errors\ErrorFacts.cs (1)
173if (s_categoriesMap.Value.TryGetValue(code, out category))
FlowAnalysis\NullableWalker.SnapshotManager.cs (2)
74if (_updatedSymbolsMap.TryGetValue((null, lambda), out var updatedDelegate)) 84return _updatedSymbolsMap.TryGetValue((node, symbol), out updatedSymbol);
FlowAnalysis\NullableWalker.Variables.cs (1)
61return VariableTypes.TryGetValue(symbol, out type);
Generated\BoundNodes.xml.Generated.cs (143)
12435if (!_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 12450if (_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 12467if (_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 12481if (!_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 12493if (!_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 12505if (!_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 12517if (!_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 12529if (!_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 12541if (!_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 12553if (!_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 12565if (!_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 12577if (!_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 12589if (!_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 12601if (!_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 12616if (_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 12634if (_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 12652if (_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 12666if (!_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 12678if (!_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 12696if (_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 12720if (_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 12737if (_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 12754if (_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 12772if (_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 12789if (_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 12807if (_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 12825if (_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 12843if (_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 12860if (_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 12877if (_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 12895if (_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 12914if (_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 12932if (_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 12955if (_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 12973if (_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 12991if (_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 13011if (_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 13029if (_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 13048if (_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 13068if (_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 13086if (_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 13103if (_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 13120if (_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 13147if (_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 13165if (_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 13182if (_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 13200if (_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 13218if (_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 13232if (!_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 13244if (!_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 13256if (!_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 13268if (!_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 13280if (!_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 13292if (!_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 13304if (!_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 13316if (!_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 13332if (_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 13350if (_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 13364if (!_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 13379if (_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 13397if (_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 13417if (_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 13434if (_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 13451if (_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 13469if (_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 13483if (!_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 13498if (_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 13519if (_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 13654if (!_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 13666if (!_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 13678if (!_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 13690if (!_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 13702if (!_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 13714if (!_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 13729if (_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 13746if (_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 13764if (_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 13781if (_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 13795if (!_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 13821if (_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 13841if (_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 13916if (_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 13935if (_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 13954if (_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 13971if (_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 13990if (_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 14008if (_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 14028if (_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 14042if (!_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 14058if (_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 14078if (_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 14096if (_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 14116if (_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 14135if (_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 14154if (_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 14171if (_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 14191if (_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 14208if (_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 14231if (_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 14245if (!_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 14260if (_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 14278if (_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 14297if (_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 14314if (_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 14332if (_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 14351if (_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 14368if (_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 14386if (_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 14405if (_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 14424if (_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 14438if (!_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 14455if (_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 14472if (_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 14489if (_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 14507if (_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 14525if (_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 14542if (_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 14561if (_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 14580if (_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 14598if (_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 14615if (_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 14633if (_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 14651if (_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 14671if (_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 14689if (_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 14708if (_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 14727if (_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 14744if (_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 14765if (_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 14782if (_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 14799if (_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 14816if (_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 14830if (!_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 14842if (!_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 14859if (_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 14878if (_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 15012if (!_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 15027if (_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 15045if (_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 15063if (_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 15080if (_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 15106if (_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType)) 15125if (_updatedNullabilities.TryGetValue(node, out (NullabilityInfo Info, TypeSymbol? Type) infoAndType))
Symbols\Compilation_UsedAssemblies.cs (1)
41mergedAssemblyReferencesMap.TryGetValue(reference, out ImmutableArray<MetadataReference> merged))
Symbols\TypeSymbol.cs (1)
2338if (info.synthesizedMethodImplMap.TryGetValue(interfaceMethod, out MethodSymbol? result))
Microsoft.CodeAnalysis.CSharp.Emit3.UnitTests (3)
Diagnostics\DiagnosticAnalyzerTests.cs (3)
3711var diagnostics = diagnosticsMap.TryGetValue(tree1, out var value) ? value : ImmutableDictionary<DiagnosticAnalyzer, ImmutableArray<Diagnostic>>.Empty; 4023if (analysisResult.AdditionalFileDiagnostics.TryGetValue(additionalFile, out var diagnosticsMap) && 4024diagnosticsMap.TryGetValue(analyzer, out var diagnostics))
Microsoft.CodeAnalysis.CSharp.Features (1)
src\Analyzers\CSharp\CodeFixes\UpgradeProject\CSharpUpgradeProjectCodeFixProvider.cs (1)
72if (diagnostic.Properties.TryGetValue(DiagnosticPropertyConstants.RequiredLanguageVersion, out var requiredVersion) &&
Microsoft.CodeAnalysis.CSharp.Workspaces (1)
Rename\CSharpRenameRewriterLanguageService.cs (1)
681!_stringAndCommentTextSpans.TryGetValue(oldToken.Span, out subSpansToReplace)))
Microsoft.CodeAnalysis.EditorFeatures (6)
Tagging\AbstractAsynchronousTaggerProvider.TagSource_ProduceTags.cs (5)
61var oldTagTree = oldTagTrees.TryGetValue(snapshot.TextBuffer, out var tagTree) 118if (oldTagTrees.TryGetValue(buffer, out var treeForBuffer)) 521oldTagTrees.TryGetValue(textBuffer, out var oldTagTree); 738!tagTrees.TryGetValue(buffer, out _)) 751tagTrees.TryGetValue(buffer, out var tags);
Tagging\TaggerContext.cs (1)
102_existingTags.TryGetValue(point.Snapshot.TextBuffer, out var tree) &&
Microsoft.CodeAnalysis.ExpressionEvaluator.ExpressionCompiler (4)
PDB\MethodDebugInfo.Native.cs (4)
668dynamicLocalConstantMap?.TryGetValue(name, out dynamicFlags); 675tupleLocalConstantMap.TryGetValue(new LocalNameAndScope(name, scopeStart, scopeEnd), out tupleElementNames); 715dynamicLocalMap?.TryGetValue(i, out dynamicFlags); 718tupleLocalConstantMap?.TryGetValue(i, out tupleElementNames);
Microsoft.CodeAnalysis.ExpressionEvaluator.FunctionResolver (2)
SpecialTypeExtensions.cs (1)
16s_typeSignatures.TryGetValue(type, out signature);
VisualBasic\Scanner.cs (1)
102KeywordKinds.TryGetValue(text, out keywordKind);
Microsoft.CodeAnalysis.ExternalAccess.Razor.UnitTests (1)
RazorPredefinedProviderNameTests.cs (1)
35if (!razorProviderNames.TryGetValue(roslynKvp.Key, out var razorValue))
Microsoft.CodeAnalysis.Features (30)
AddMissingReference\AbstractAddMissingReferenceCodeFixProvider.cs (1)
68if (properties.TryGetValue(DiagnosticPropertyConstants.UnreferencedAssemblyIdentity, out var displayName) &&
CodeFixes\Service\CodeFixService.cs (6)
375if (!_lazyWorkspaceFixersMap.TryGetValue(document.Project.Language, out var lazyFixerMap)) 401return _lazyFixerPriorityMap.TryGetValue(document.Project.Language, out fixersPriorityMap); 718if (!_configurationProvidersMap.Value.TryGetValue(document.Project.Language, out var lazyConfigurationProviders) || 815if (!_configurationProvidersMap.Value.TryGetValue(language, out var lazyConfigurationProviders) || 1024if (_priorityMap.TryGetValue(x, out var xOrder) && 1025_priorityMap.TryGetValue(y, out var yOrder))
Completion\CompletionItem.cs (1)
114return _lazyPropertiesAsImmutableDictionary.TryGetValue(name, out value);
Completion\CompletionService.ProviderManager.cs (1)
157if (_nameToProvider.Value.TryGetValue(item.ProviderName, out var provider))
ConvertAnonymousType\AbstractConvertAnonymousTypeToClassCodeRefactoringProvider.cs (1)
168if (propertyMap.TryGetValue(symbol, out var newName))
Diagnostics\Service\DocumentAnalysisExecutor.cs (2)
218return _lazySyntaxDiagnostics.TryGetValue(analyzer, out var diagnosticAnalysisResult) 254return _lazySemanticDiagnostics.TryGetValue(analyzer, out var diagnosticAnalysisResult)
Diagnostics\Service\EngineV2\DiagnosticIncrementalAnalyzer.StateManager.ProjectStates.cs (1)
48if (_projectAnalyzerStateMap.TryGetValue(project.Id, out var entry) &&
Diagnostics\Service\EngineV2\DiagnosticIncrementalAnalyzer_IncrementalAnalyzer.cs (1)
64if (projectAnalysisData.TryGetValue(analyzer, out var analyzerResult))
Extensions\ExtensionFolder.cs (2)
143if (!_assemblyFilePathToHandlers.TryGetValue(assemblyFilePath, out var lazyHandlers)) 158if (!_assemblyFilePathToHandlers.TryGetValue(assemblyFilePath, out var lazyHandlers))
Extensions\ExtensionMessageHandlerService.cs (2)
116if (!_folderPathToExtensionFolder.TryGetValue(assemblyFolderPath, out var extensionFolder)) 176if (!_folderPathToExtensionFolder.TryGetValue(assemblyFolderPath, out var extensionFolder))
FindUsages\DefinitionItem.DefaultDefinitionItem.cs (3)
42if (Properties.TryGetValue(MetadataSymbolKey, out var symbolKey)) 62if (!Properties.TryGetValue(MetadataSymbolOriginatingProjectIdGuid, out var projectIdGuid) || 63!Properties.TryGetValue(MetadataSymbolOriginatingProjectIdDebugName, out var projectDebugName))
InlineMethod\AbstractInlineMethodRefactoringProvider.InlineContext.cs (1)
281var name = renameTable.TryGetValue(parameterSymbol, out var newName) ? newName : parameterSymbol.Name;
PdbSourceDocument\PdbSourceDocumentMetadataAsSourceFileProvider.cs (3)
210if (pdbCompilationOptions.TryGetValue(Cci.CompilationOptionNames.DefaultEncoding, out var encodingString)) 214else if (pdbCompilationOptions.TryGetValue(Cci.CompilationOptionNames.FallbackEncoding, out var fallbackEncodingString)) 310if (!pdbCompilationOptions.TryGetValue(Cci.CompilationOptionNames.Language, out var languageName) || languageName is null)
src\Analyzers\Core\Analyzers\RemoveUnnecessarySuppressions\AbstractRemoveUnnecessaryPragmaSuppressionsDiagnosticAnalyzer.cs (1)
105compilationWithAnalyzers.Compilation.Options.SpecificDiagnosticOptions.TryGetValue(IDEDiagnosticIds.RemoveUnnecessarySuppressionDiagnosticId, out severity))
src\Analyzers\Core\Analyzers\RemoveUnusedParametersAndValues\AbstractRemoveUnusedParametersAndValuesDiagnosticAnalyzer.cs (1)
298diagnostic.Properties.TryGetValue(UnusedValuePreferenceKey, out var preferenceString))
Structure\Syntax\BlockSpanCollector.cs (2)
65if (_nodeProviderMap.TryGetValue(node.GetType(), out var providers)) 87if (_triviaProviderMap.TryGetValue(trivia.RawKind, out var providers))
SyncNamespaces\AbstractSyncNamespacesService.cs (1)
178return _diagnosticsByProject.TryGetValue(project, out var diagnostics)
Microsoft.CodeAnalysis.LanguageServer (2)
Services\ExtensionAssemblyManager.cs (2)
171if (_directoryLoadContexts.TryGetValue(directory, out var loadContext)) 186if (_assemblyFullNameToLoadContext.TryGetValue(assemblyFullName, out var loadContext))
Microsoft.CodeAnalysis.LanguageServer.Protocol (4)
Handler\Completion\CompletionResultFactory.cs (2)
183if (ProtocolConversions.RoslynTagToCompletionItemKinds.TryGetValue(tag, out var completionItemKinds)) 211if (ProtocolConversions.RoslynTagToCompletionItemTags.TryGetValue(tag, out var completionItemTags))
Handler\Diagnostics\DiagnosticSourceProviders\DiagnosticSourceManager.cs (1)
71if (nameToProviderMap.TryGetValue(providerName, out var provider))
Workspaces\LspWorkspaceManager.cs (1)
271if (_trackedDocuments.TryGetValue(uri, out var trackedDocument))
Microsoft.CodeAnalysis.PublicApiAnalyzers (6)
src\RoslynAnalyzers\Utilities\Compiler\Extensions\DiagnosticExtensions.cs (1)
251if (options.TryGetValue(rule.Id, out var value))
src\RoslynAnalyzers\Utilities\Compiler\Options\SymbolNamesWithValueOption.cs (5)
238if (_symbols.TryGetValue(symbol, out value) || _names.TryGetValue(symbol.Name, out value)) 309if (_wildcardNamesBySymbolKind.TryGetValue(symbol.Kind, out var names) && 319if (_wildcardNamesBySymbolKind.TryGetValue(AllKinds, out var value) && 329if (_wildcardNamesBySymbolKind.TryGetValue(AllKinds, out var allKindsValue) &&
Microsoft.CodeAnalysis.Remote.Workspaces (3)
ServiceDescriptors.cs (1)
142if (!_descriptors.TryGetValue(serviceType, out var descriptor))
VisualStudioMefHostServices.cs (2)
47if (!_exportsMap.TryGetValue(key, out var exports)) 64if (!_exportsMap.TryGetValue(key, out var exports))
Microsoft.CodeAnalysis.ResxSourceGenerator (9)
AbstractResxGenerator.cs (1)
299if (!y.TryGetValue(key, out var other)
src\RoslynAnalyzers\Utilities\Compiler\Extensions\DiagnosticExtensions.cs (1)
251if (options.TryGetValue(rule.Id, out var value))
src\RoslynAnalyzers\Utilities\Compiler\Lightup\OperationWrapperHelper.cs (1)
30if (WrappedTypes.TryGetValue(wrapperType, out var wrappedType))
src\RoslynAnalyzers\Utilities\Compiler\Options\AggregateCategorizedAnalyzerConfigOptions.cs (1)
131return _perTreeOptions.TryGetValue(tree, out var lazyTreeOptions) &&
src\RoslynAnalyzers\Utilities\Compiler\Options\SymbolNamesWithValueOption.cs (5)
238if (_symbols.TryGetValue(symbol, out value) || _names.TryGetValue(symbol.Name, out value)) 309if (_wildcardNamesBySymbolKind.TryGetValue(symbol.Kind, out var names) && 319if (_wildcardNamesBySymbolKind.TryGetValue(AllKinds, out var value) && 329if (_wildcardNamesBySymbolKind.TryGetValue(AllKinds, out var allKindsValue) &&
Microsoft.CodeAnalysis.Scripting (1)
Hosting\Resolvers\RuntimeMetadataReferenceResolver.cs (1)
199=> TrustedPlatformAssemblies.TryGetValue(name, out var path) && File.Exists(path) ? CreateFromFile(path, properties) : null;
Microsoft.CodeAnalysis.Test.Utilities (6)
Compilation\CompilationTestDataExtensions.cs (2)
50if (map.TryGetValue(qualifiedMethodName, out methodData)) 56if (map.TryGetValue(qualifiedMethodName + "()", out methodData))
MarkedSource\SourceWithMarkedNodes.cs (2)
140if (map1.TryGetValue(node1, out var mark)) 142if (map0.TryGetValue(mark, out var result))
PDB\DeterministicBuildCompilationTestHelpers.cs (1)
30pdbOptions.TryGetValue(pdbName, out var actualValueString);
Platform\CoreClr\TestExecutionLoadContext.cs (1)
50if (_dependencies.TryGetValue(assemblyName.FullName, out var moduleData))
Microsoft.CodeAnalysis.UnitTests (1)
Analyzers\AnalyzerConfigTests.cs (1)
1270Assert.True(treeOptions.TryGetValue(item.diagId, out var severity));
Microsoft.CodeAnalysis.VisualBasic (3)
Binding\DescendantBinderFactory.vb (2)
43If NodeToBinderMap.TryGetValue(node, binder) Then 52If StmtListToBinderMap.TryGetValue(statementList, binder) Then
Preprocessor\ExpressionEvaluator.vb (1)
282If Not _symbols.TryGetValue(ident.IdentifierText, value) Then
Microsoft.CodeAnalysis.VisualBasic.ExpressionCompiler (1)
Rewriters\CapturedVariableRewriter.vb (1)
163_displayClassVariables.TryGetValue(name, variable)
Microsoft.CodeAnalysis.VisualBasic.Workspaces (1)
Rename\VisualBasicRenameRewriterLanguageService.vb (1)
628(Me._isProcessingStructuredTrivia = 0 AndAlso Not Me._stringAndCommentTextSpans.TryGetValue(oldToken.Span, subSpansToReplace)) Then
Microsoft.CodeAnalysis.Workspaces (61)
CodeFixes\FixAllOccurrences\FixAllState.FixMultipleDiagnosticProvider.cs (4)
44if (DocumentDiagnosticsMap.TryGetValue(document, out diagnostics)) 51if (ProjectDiagnosticsMap.TryGetValue(project, out diagnostics)) 61if (DocumentDiagnosticsMap.TryGetValue(document, out var diagnostics)) 71if (ProjectDiagnosticsMap.TryGetValue(project, out var diagnostics))
Diagnostics\DiagnosticAnalysisResult.cs (1)
136return map.TryGetValue(documentId, out var diagnostics) ? diagnostics : [];
Diagnostics\Extensions.cs (4)
157if (analysisResult.MergedSyntaxDiagnostics.TryGetValue(treeToAnalyze, out diagnosticsByAnalyzerMap)) 163else if (analysisResult.MergedAdditionalFileDiagnostics.TryGetValue(additionalFileToAnalyze!, out diagnosticsByAnalyzerMap)) 172if (analysisResult.MergedSemanticDiagnostics.TryGetValue(treeToAnalyze!, out diagnosticsByAnalyzerMap)) 250if (diagnosticsByAnalyzer.TryGetValue(analyzer, out var diagnostics))
Diagnostics\HostDiagnosticAnalyzers.cs (2)
100if (!map.TryGetValue(id, out var reference) || reference == null) 148if (_compilerDiagnosticAnalyzerMap.TryGetValue(language, out var compilerAnalyzer))
Editing\SymbolEditor.cs (1)
137if (!_assemblyNameToProjectIdMap.TryGetValue(assembly.Name, out var projectIds))
Options\DocumentOptionSet.cs (1)
48if (_values.TryGetValue(optionKey, out var value))
Options\GlobalOptionService.cs (1)
123if (currentValues.TryGetValue(optionKey, out var value))
Options\SolutionOptionSet.cs (1)
49if (_values.TryGetValue(optionKey, out var value))
Rename\ConflictResolution.cs (6)
99=> _documentToComplexifiedSpansMap.TryGetValue(documentId, out var complexifiedSpans) 106if (_documentToModifiedSpansMap.TryGetValue(documentId, out var modifiedSpans)) 112if (_documentToComplexifiedSpansMap.TryGetValue(documentId, out var complexifiedSpans)) 125=> _documentToRelatedLocationsMap.TryGetValue(documentId, out var result) 131if (_documentToModifiedSpansMap.TryGetValue(documentId, out var modifiedSpans)) 138if (_documentToComplexifiedSpansMap.TryGetValue(documentId, out var complexifiedSpans))
src\Compilers\Core\Portable\DiagnosticAnalyzer\DictionaryAnalyzerConfigOptions.cs (1)
25=> Options.TryGetValue(key, out value);
src\Compilers\Core\Portable\SourceGeneration\GeneratedCodeUtilities.cs (1)
152if (options.TryGetValue("generated_code", out string? optionValue) &&
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\DiagnosticDescriptorExtensions.cs (3)
45(!compilationOptions.SpecificDiagnosticOptions.TryGetValue(descriptor.Id, out var reportDiagnostic) || 48if (treeOptions.TryGetValue(descriptor.Id, out reportDiagnostic) && reportDiagnostic != ReportDiagnostic.Default || 70if (!compilationOptions.SpecificDiagnosticOptions.TryGetValue(descriptor.Id, out var reportDiagnostic) ||
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\FlowAnalysis\SymbolUsageAnalysis\SymbolUsageAnalysis.DataFlowAnalyzer.FlowGraphAnalysisData.cs (1)
460=> !LValueFlowCapturesInGraph.TryGetValue(captureId, out var captureKind) || captureKind != FlowCaptureKind.LValueCapture;
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\AliasSymbolCache.cs (1)
43symbolMap.TryGetValue(targetSymbol, out aliasSymbol);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\BidirectionalMap.cs (4)
42=> _forwardMap.TryGetValue(key, out value); 45=> _backwardMap.TryGetValue(value, out key); 55if (!_forwardMap.TryGetValue(key, out var value)) 67if (!_backwardMap.TryGetValue(value, out var key))
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\IDictionaryExtensions.cs (1)
161if (dictionary.TryGetValue(key, out var collection))
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Extensions\SyntaxGeneratorExtensions_Negate.cs (1)
151if (!s_negatedBinaryMap.TryGetValue(binaryOperation.OperatorKind, out var negatedKind))
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Workspace\Mef\MefLanguageServices.cs (1)
130if (!_serviceMap.TryGetValue(serviceType, out var service))
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Workspace\Mef\MefWorkspaceServices.cs (3)
139if (!_serviceMap.TryGetValue(serviceType, out var service)) 178if (!currentServicesMap.TryGetValue(languageName, out var languageServices)) 211=> _languageServicesMap.TryGetValue(languageName, out languageServices);
Workspace\ProjectSystem\ProjectSystemProjectFactory.cs (6)
193_projectToDependencyNodeTargetIdentifier.TryGetValue(projectId, out var identifier); 200_projectToMaxSupportedLangVersionMap.TryGetValue(projectId, out var identifier); 361if (projectUpdateState.ProjectReferenceInfos.TryGetValue(projectId, out var referenceInfo)) 392if (projectUpdateState.ProjectReferenceInfos.TryGetValue(projectId, out var projectReferenceInfo)) 706if (projectUpdateState.ProjectsByOutputPath.TryGetValue(path, out var ids) && ids.Distinct().Length == 1) 795if (projectUpdateState.ProjectsByOutputPath.TryGetValue(outputPath, out var remainingProjectsForOutputPath))
Workspace\ProjectSystem\ProjectSystemProjectFactory.ProjectUpdateState.cs (2)
81if (!map.TryGetValue(path, out var projects)) 101if (map.TryGetValue(path, out var projects))
Workspace\Solution\ProjectDependencyGraph.cs (6)
259_transitiveReferencesMap.TryGetValue(projectId, out var projects); 275if (currentMap.TryGetValue(projectId, out var transitiveReferences)) 290if (!_transitiveReferencesMap.TryGetValue(projectId, out var transitiveReferences)) 327if (currentMap.TryGetValue(projectId, out var reverseTransitiveReferences)) 342if (!_reverseTransitiveReferencesMap.TryGetValue(projectId, out var reverseTransitiveReferences)) 410if (_referencesMap.TryGetValue(projectId, out var projectReferenceIds))
Workspace\Solution\ProjectDependencyGraph_AddProjectReference.cs (5)
63if (existingReferencesMap.TryGetValue(projectId, out var existingReferences)) 112if (existingTransitiveReferencesMap.TryGetValue(referencedProjectId, out var additionalTransitiveReferences)) 128existingTransitiveReferencesMap.TryGetValue(projectIdToUpdate, out var existingTransitiveReferences); 164existingReverseTransitiveReferencesMap.TryGetValue(projectId, out var newReverseTranstiveReferences); 176existingReverseTransitiveReferencesMap.TryGetValue(projectIdToUpdate, out var existingReverseTransitiveReferences);
Workspace\Solution\ProjectDependencyGraph_RemoveAllProjectReferences.cs (1)
17if (!_referencesMap.TryGetValue(projectId, out var referencedProjectIds))
Workspace\Solution\ProjectDependencyGraph_RemoveProject.cs (2)
62if (existingReverseReferencesMap.TryGetValue(removedProjectId, out var referencingProjects)) 101if (!existingForwardReferencesMap.TryGetValue(removedProjectId, out var forwardReferences))
Workspace\Solution\SolutionState.cs (1)
516if (!projectCountByLanguage.TryGetValue(language, out var currentCount))
Microsoft.CodeAnalysis.Workspaces.Desktop (2)
Workspace\Host\Mef\MefV1HostServices.cs (2)
82if (!_exportsMap.TryGetValue(key, out var exports)) 99if (!_exportsMap.TryGetValue(key, out var exports))
Microsoft.CodeAnalysis.Workspaces.MSBuild (1)
MSBuild\MSBuildProjectLoader.Worker_ResolveReferences.cs (1)
122if (filePath != null && _pathToIndicesMap.TryGetValue(filePath, out var indices))
Microsoft.CodeAnalysis.Workspaces.MSBuild.BuildHost (1)
MSBuild\ProjectFile\CommandLineArgumentReader.cs (1)
172if (debugType != null && s_debugTypeValues.TryGetValue(debugType, out var value))
Microsoft.CodeAnalysis.Workspaces.Test.Utilities (1)
Fakes\TestOptionSet.cs (1)
25=> _values.TryGetValue(optionKey, out var value) ? value : optionKey.Option.DefaultValue;
Microsoft.DotNet.Build.Tasks.Feed (6)
src\model\SetupTargetFeedConfigV3.cs (3)
78AzureDevOpsFeedsKey = FeedKeys.TryGetValue("https://pkgs.dev.azure.com/dnceng", out string key) ? key : null; 167FeedOverrides.TryGetValue("transport-packages", out string newFeed)) 173FeedOverrides.TryGetValue("shipping-packages", out newFeed))
src\model\SetupTargetFeedConfigV4.cs (3)
77AzureDevOpsFeedsKey = FeedKeys.TryGetValue("https://pkgs.dev.azure.com/dnceng", out string key) ? key : null; 140FeedOverrides.TryGetValue("transport-packages", out string newFeed)) 146FeedOverrides.TryGetValue("shipping-packages", out newFeed))
Microsoft.DotNet.SignTool (1)
src\ZipData.cs (1)
49if (NestedParts.TryGetValue(relativeName, out ZipPart part))
Microsoft.Interop.ComInterfaceGenerator (17)
Analyzers\AddGeneratedComClassFixer.cs (1)
50bool allowUnsafe = selectedOptions.TryGetValue(Option.AllowUnsafe, out var allowUnsafeOption) && allowUnsafeOption is Option.Bool(true);
Analyzers\AddMarshalAsToElementFixer.cs (1)
34if (!diagnostic.Properties.TryGetValue(GeneratorDiagnosticProperties.AddMarshalAsAttribute, out string? addMarshalAsAttribute))
Analyzers\ConvertComImportToGeneratedComInterfaceFixer.cs (7)
30return selectedOptions.TryGetValue(Option.AllowUnsafe, out Option allowUnsafeOption) && allowUnsafeOption is Option.Bool(true) 37bool mayRequireAdditionalWork = selectedOptions.TryGetValue(Option.MayRequireAdditionalWork, out Option mayRequireAdditionalWorkOption) && mayRequireAdditionalWorkOption is Option.Bool(true); 38bool addStringMarshalling = selectedOptions.TryGetValue(AddStringMarshallingOption, out Option addStringMarshallingOption) && addStringMarshallingOption is Option.Bool(true); 47if (diagnostic.Properties.TryGetValue(AnalyzerDiagnostics.Metadata.MayRequireAdditionalWork, out string? mayRequireAdditionalWork) && bool.Parse(mayRequireAdditionalWork)) 51if (diagnostic.Properties.TryGetValue(AnalyzerDiagnostics.Metadata.AddStringMarshalling, out string? addStringMarshalling) && bool.Parse(addStringMarshalling)) 61if (fixAllOptions.TryGetValue(AddStringMarshallingOption, out Option fixAllAddStringMarshallingOption) 63&& (!diagnosticOptions.TryGetValue(AddStringMarshallingOption, out Option addStringMarshallingOption)
GeneratedComInterfaceAttributeData.cs (1)
66if (args.TryGetValue(nameof(Options), out var options))
src\libraries\System.Runtime.InteropServices\gen\Common\ConvertToSourceGeneratedInteropFixer.cs (3)
174bool addUnsafe = options.TryGetValue(Option.AllowUnsafe, out Option allowUnsafeOption) && allowUnsafeOption is Option.Bool(true); 176bool includeFixesWithAdditionalWork = options.TryGetValue(Option.MayRequireAdditionalWork, out Option includeFixesWithAdditionalWorkOption) && includeFixesWithAdditionalWorkOption is Option.Bool(true); 188bool mayRequireAdditionalWork = diagnostic.Properties.TryGetValue(Option.MayRequireAdditionalWork, out string mayRequireAdditionalWorkString)
VtableIndexStubGenerator.cs (4)
150if (namedArguments.TryGetValue(nameof(VirtualMethodIndexCompilationData.Direction), out TypedConstant directionValue)) 160if (namedArguments.TryGetValue(nameof(VirtualMethodIndexCompilationData.ImplicitThisParameter), out TypedConstant implicitThisValue)) 168if (namedArguments.TryGetValue(nameof(VirtualMethodIndexCompilationData.ExceptionMarshalling), out TypedConstant exceptionMarshallingValue)) 179if (namedArguments.TryGetValue(nameof(VirtualMethodIndexCompilationData.ExceptionMarshallingCustomType), out TypedConstant exceptionMarshallingCustomTypeValue))
Microsoft.Interop.LibraryImportGenerator (12)
Analyzers\ConvertToLibraryImportFixer.cs (7)
39bool allowUnsafe = selectedOptions.TryGetValue(Option.AllowUnsafe, out Option? allowUnsafeOption) && allowUnsafeOption is Option.Bool(true); 42if (selectedOptions.TryGetValue(SelectedSuffixOption, out Option? suffixOption) && suffixOption is Option.String(string suffixValue)) 60if (diagnostic.Properties.TryGetValue(ConvertToLibraryImportAnalyzer.MayRequireAdditionalWork, out string? mayRequireAdditionalWork) && bool.Parse(mayRequireAdditionalWork)) 78bool warnForAdditionalWork = options.TryGetValue(Option.MayRequireAdditionalWork, out Option mayRequireAdditionalWork) && mayRequireAdditionalWork is Option.Bool(true); 80CharSet? charSet = options.TryGetValue(CharSetOption, out Option charSetOption) && charSetOption is Option.String(string charSetString) && Enum.TryParse<CharSet>(charSetString, out CharSet result) ? result : null; 131bool warnForAdditionalWork = selectedOptions.TryGetValue(Option.MayRequireAdditionalWork, out Option mayRequireAdditionalWork) && mayRequireAdditionalWork is Option.Bool(true); 132char? suffix = selectedOptions.TryGetValue(SelectedSuffixOption, out Option selectedSuffixOption) && selectedSuffixOption is Option.String(string selectedSuffix) ? selectedSuffix[0] : null;
Analyzers\CustomMarshallerAttributeFixer.cs (1)
139if (diagnostic.Properties.TryGetValue(MissingMemberNames.Key, out string missingMembers))
LibraryImportGenerator.cs (1)
203if (namedArguments.TryGetValue(nameof(LibraryImportCompilationData.EntryPoint), out TypedConstant entryPointValue))
src\libraries\System.Runtime.InteropServices\gen\Common\ConvertToSourceGeneratedInteropFixer.cs (3)
174bool addUnsafe = options.TryGetValue(Option.AllowUnsafe, out Option allowUnsafeOption) && allowUnsafeOption is Option.Bool(true); 176bool includeFixesWithAdditionalWork = options.TryGetValue(Option.MayRequireAdditionalWork, out Option includeFixesWithAdditionalWorkOption) && includeFixesWithAdditionalWorkOption is Option.Bool(true); 188bool mayRequireAdditionalWork = diagnostic.Properties.TryGetValue(Option.MayRequireAdditionalWork, out string mayRequireAdditionalWorkString)
Microsoft.Interop.LibraryImportGenerator.Downlevel (1)
DownlevelLibraryImportGenerator.cs (1)
145if (namedArguments.TryGetValue(nameof(LibraryImportCompilationData.EntryPoint), out TypedConstant entryPointValue))
Microsoft.Interop.SourceGeneration (13)
InteropAttributeData.cs (3)
62if (namedArguments.TryGetValue(nameof(InteropAttributeCompilationData.SetLastError), out TypedConstant setLastErrorValue)) 71if (namedArguments.TryGetValue(nameof(InteropAttributeCompilationData.StringMarshalling), out TypedConstant stringMarshallingValue)) 82if (namedArguments.TryGetValue(nameof(InteropAttributeCompilationData.StringMarshallingCustomType), out TypedConstant stringMarshallingCustomTypeValue))
ManualTypeMarshallingHelper.cs (4)
48if (Modes.TryGetValue(mode, out data)) 51if (Modes.TryGetValue(MarshalMode.Default, out data)) 60if (Modes.TryGetValue(mode, out data)) 63return Modes.TryGetValue(MarshalMode.Default, out data);
MarshalAsParser.cs (2)
137if (namedArguments.TryGetValue(nameof(MarshalAsAttribute.SizeConst), out TypedConstant sizeConstArg)) 141if (namedArguments.TryGetValue(nameof(MarshalAsAttribute.SizeParamIndex), out TypedConstant sizeParamIndexArg))
Marshalling\NoMarshallingInfoErrorResolver.cs (1)
18if (info.MarshallingAttributeInfo is NoMarshallingInfo && CustomTypeToErrorMessageMap.TryGetValue(info.ManagedType, out string errorMessage))
MarshalUsingAttributeParser.cs (1)
68int elementIndirectionDepth = namedArgs.TryGetValue(ManualTypeMarshallingHelper.MarshalUsingProperties.ElementIndirectionDepth, out TypedConstant value) ? (int)value.Value! : 0;
UseSiteAttributeProvider.cs (1)
82return _useSiteAttributesByIndirectionDepth.TryGetValue(indirectionDepth, out useSiteInfo);
ValueEqualityImmutableDictionary.cs (1)
57public bool TryGetValue(T key, out U value) => Map.TryGetValue(key, out value);
Microsoft.VisualStudio.LanguageServices (10)
Options\VisualStudioSettingsOptionPersister.cs (1)
54if (_storageKeysToMonitorForChanges.TryGetValue(args.PropertyName, out var entry) &&
Packaging\PackageInstallerService.ProjectState.cs (1)
35=> InstalledPackageToVersion.TryGetValue(packageName, out version);
Packaging\PackageInstallerServiceFactory.cs (2)
335var installedVersion = installedPackagesMap.TryGetValue(packageName, out var result) ? result : null; 390if (!installedPackagesMap.TryGetValue(packageName, out var installedVersion))
ProjectSystem\OpenTextBufferProvider.cs (2)
180if (_monikerToTextBufferMap.TryGetValue(pszMkDocumentOld, out var textBuffer)) 265return _monikerToTextBufferMap.TryGetValue(filePath, out textBuffer);
ProjectSystem\VisualStudioWorkspaceImpl.cs (2)
269if (_projectToHierarchyMap.TryGetValue(project.Id, out var projectHierarchy)) 287if (_projectToRuleSetFilePath.TryGetValue(projectId, out var ruleSetPathFunc))
Snippets\SnippetExpansionClient.cs (1)
902newArguments.TryGetValue(parameter.Name, out var value);
TableDataSource\Suppression\VisualStudioDiagnosticListSuppressionStateService.cs (1)
257if (!filePathMap.TryGetValue(filePath, out document))
Microsoft.VisualStudio.LanguageServices.LiveShare (3)
Client\RemoteLanguageServiceWorkspace.cs (1)
367if (_openedDocs.TryGetValue(moniker, out var id))
Client\RemoteLanguageServiceWorkspaceHost.cs (2)
120if (!_loadedProjects.TryGetValue(projectName, out var projectId)) 135if (_loadedProjectInfo.TryGetValue(projectName, out var projInfo))
MSBuild (1)
CopyOnWriteDictionary.cs (1)
249return _backing.TryGetValue(key, out value);
Roslyn.Diagnostics.Analyzers (10)
ExportedPartsShouldHaveImportingConstructorCodeFixProvider.cs (1)
38if (!diagnostic.Properties.TryGetValue(nameof(ExportedPartsShouldHaveImportingConstructor.Scenario), out var scenario))
ImportingConstructorShouldBeObsoleteCodeFixProvider.cs (1)
38if (!diagnostic.Properties.TryGetValue(nameof(ImportingConstructorShouldBeObsolete.Scenario), out var scenario))
src\RoslynAnalyzers\Utilities\Compiler\Extensions\DiagnosticExtensions.cs (1)
251if (options.TryGetValue(rule.Id, out var value))
src\RoslynAnalyzers\Utilities\Compiler\Lightup\OperationWrapperHelper.cs (1)
30if (WrappedTypes.TryGetValue(wrapperType, out var wrappedType))
src\RoslynAnalyzers\Utilities\Compiler\Options\AggregateCategorizedAnalyzerConfigOptions.cs (1)
131return _perTreeOptions.TryGetValue(tree, out var lazyTreeOptions) &&
src\RoslynAnalyzers\Utilities\Compiler\Options\SymbolNamesWithValueOption.cs (5)
238if (_symbols.TryGetValue(symbol, out value) || _names.TryGetValue(symbol.Name, out value)) 309if (_wildcardNamesBySymbolKind.TryGetValue(symbol.Kind, out var names) && 319if (_wildcardNamesBySymbolKind.TryGetValue(AllKinds, out var value) && 329if (_wildcardNamesBySymbolKind.TryGetValue(AllKinds, out var allKindsValue) &&
Roslyn.Diagnostics.VisualBasic.Analyzers (1)
BasicInvokeTheCorrectPropertyToEnsureCorrectUseSiteDiagnostics.vb (1)
67If s_propertiesToValidateMap.TryGetValue(identifier.ToString(), containingTypeName) Then
Roslyn.Test.PdbUtilities (2)
Reader\MockSymUnmanagedReader.cs (2)
38if (!_methodDebugInfoMap.TryGetValue(methodToken, out info)) 64if (!_methodDebugInfoMap.TryGetValue(methodToken, out info))
RunTests (1)
AssemblyScheduler.cs (1)
126if (testHistory.TryGetValue(methodInfo.FullyQualifiedName, out var executionTime))
System.Collections.Immutable (1)
System\Collections\Immutable\ImmutableDictionary_2.cs (1)
249if (!this.TryGetValue(key, out value!))
System.Windows.Forms.Analyzers.CSharp.Tests (3)
CompilerAnalyzerConfigOptions.cs (1)
26public override bool TryGetValue(string key, [NotNullWhen(true)] out string? value) => _backing.TryGetValue(key, out value);
CompilerAnalyzerConfigOptionsProvider.cs (2)
34=> _treeDict.TryGetValue(tree, out var options) ? options : CompilerAnalyzerConfigOptions.Empty; 37=> _treeDict.TryGetValue(textFile, out var options) ? options : CompilerAnalyzerConfigOptions.Empty;
Test.Utilities (8)
src\RoslynAnalyzers\Utilities\Compiler\Extensions\DiagnosticExtensions.cs (1)
251if (options.TryGetValue(rule.Id, out var value))
src\RoslynAnalyzers\Utilities\Compiler\Lightup\OperationWrapperHelper.cs (1)
30if (WrappedTypes.TryGetValue(wrapperType, out var wrappedType))
src\RoslynAnalyzers\Utilities\Compiler\Options\AggregateCategorizedAnalyzerConfigOptions.cs (1)
131return _perTreeOptions.TryGetValue(tree, out var lazyTreeOptions) &&
src\RoslynAnalyzers\Utilities\Compiler\Options\SymbolNamesWithValueOption.cs (5)
238if (_symbols.TryGetValue(symbol, out value) || _names.TryGetValue(symbol.Name, out value)) 309if (_wildcardNamesBySymbolKind.TryGetValue(symbol.Kind, out var names) && 319if (_wildcardNamesBySymbolKind.TryGetValue(AllKinds, out var value) && 329if (_wildcardNamesBySymbolKind.TryGetValue(AllKinds, out var allKindsValue) &&
Text.Analyzers (8)
src\RoslynAnalyzers\Utilities\Compiler\Extensions\DiagnosticExtensions.cs (1)
251if (options.TryGetValue(rule.Id, out var value))
src\RoslynAnalyzers\Utilities\Compiler\Lightup\OperationWrapperHelper.cs (1)
30if (WrappedTypes.TryGetValue(wrapperType, out var wrappedType))
src\RoslynAnalyzers\Utilities\Compiler\Options\AggregateCategorizedAnalyzerConfigOptions.cs (1)
131return _perTreeOptions.TryGetValue(tree, out var lazyTreeOptions) &&
src\RoslynAnalyzers\Utilities\Compiler\Options\SymbolNamesWithValueOption.cs (5)
238if (_symbols.TryGetValue(symbol, out value) || _names.TryGetValue(symbol.Name, out value)) 309if (_wildcardNamesBySymbolKind.TryGetValue(symbol.Kind, out var names) && 319if (_wildcardNamesBySymbolKind.TryGetValue(AllKinds, out var value) && 329if (_wildcardNamesBySymbolKind.TryGetValue(AllKinds, out var allKindsValue) &&