8 references to GetValueOrDefault
Microsoft.CodeAnalysis.UnitTests (2)
Collections\ImmutableSegmentedDictionaryTest.cs (2)
228
Assert.Equal(1, empty.
GetValueOrDefault
("a", 1));
230
Assert.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)
1331
return _projectToHierarchyMap.
GetValueOrDefault
(projectId, defaultValue: null);
1337
return _projectToGuidMap.
GetValueOrDefault
(projectId, defaultValue: Guid.Empty);
ProjectSystem\VisualStudioWorkspaceImpl.OpenFileTracker.cs (1)
246
var matchingProjectId = projectIds.FirstOrDefault(id => projectToHierarchyMap.
GetValueOrDefault
(id, null) == hierarchy);
Snippets\SnippetExpansionClient.cs (1)
658
new XElement(snippetNamespace + "Default", new XText(parameterValues.
GetValueOrDefault
(parameter.Name, "")))));
System.Collections.Immutable (1)
System\Collections\Immutable\ImmutableDictionary.cs (1)
294
return
GetValueOrDefault
(dictionary, key, default(TValue)!);