8 references to GetValueOrDefault
Microsoft.CodeAnalysis.UnitTests (2)
Collections\ImmutableSegmentedDictionaryTest.cs (2)
228Assert.Equal(1, empty.GetValueOrDefault("a", 1)); 230Assert.Equal(5, populated.GetValueOrDefault("a", 1));
Microsoft.CodeAnalysis.Workspaces (1)
Workspace\Solution\Project.cs (1)
828=> Solution.FallbackAnalyzerOptions.GetValueOrDefault(Language, StructuredAnalyzerConfigOptions.Empty);
Microsoft.VisualStudio.LanguageServices (4)
ProjectSystem\VisualStudioWorkspaceImpl.cs (2)
1331return _projectToHierarchyMap.GetValueOrDefault(projectId, defaultValue: null); 1337return _projectToGuidMap.GetValueOrDefault(projectId, defaultValue: Guid.Empty);
ProjectSystem\VisualStudioWorkspaceImpl.OpenFileTracker.cs (1)
246var matchingProjectId = projectIds.FirstOrDefault(id => projectToHierarchyMap.GetValueOrDefault(id, null) == hierarchy);
Snippets\SnippetExpansionClient.cs (1)
658new XElement(snippetNamespace + "Default", new XText(parameterValues.GetValueOrDefault(parameter.Name, "")))));
System.Collections.Immutable (1)
System\Collections\Immutable\ImmutableDictionary.cs (1)
294return GetValueOrDefault(dictionary, key, default(TValue)!);