17 references to SingleOrDefault
CSharpSyntaxGenerator (1)
SourceGenerator.cs (1)
56var input = syntaxXmlFiles.SingleOrDefault();
Microsoft.CodeAnalysis.CSharp (1)
Operations\CSharpOperationFactory.cs (1)
1071((boundOperand as BoundLambda)?.Body.Statements.SingleOrDefault() as BoundReturnStatement)?.
Microsoft.CodeAnalysis.CSharp.EditorFeatures2.UnitTests (1)
Recommendations\RecommenderTests.cs (1)
97var result = (await RecommendKeywordsAsync(position, context)).SingleOrDefault();
Microsoft.CodeAnalysis.CSharp.Symbol.UnitTests (5)
Symbols\Source\EventTests.cs (2)
305var eventSymbol1 = semanticModel.LookupSymbols(text.IndexOf("/*anchorE_1*/", StringComparison.Ordinal), name: "E1").SingleOrDefault() as IEventSymbol; 308var eventSymbol2 = semanticModel.LookupSymbols(text.IndexOf("/*anchorE_2*/", StringComparison.Ordinal), name: "E1").SingleOrDefault() as IEventSymbol;
Symbols\Source\PropertyTests.cs (3)
362var p = a.GetMembers("P").SingleOrDefault() as PropertySymbol; 366p = a.GetMembers("P2").SingleOrDefault() as PropertySymbol; 370var q = i.GetMembers("Q").SingleOrDefault() as PropertySymbol;
Microsoft.CodeAnalysis.CSharp.Workspaces (1)
Simplification\Simplifiers\NameSimplifier.cs (1)
442var argument = type.TypeArguments.SingleOrDefault();
Microsoft.CodeAnalysis.LanguageServer.Protocol (2)
Extensions\Extensions.cs (1)
110var documentId = solution.GetDocumentIds(documentIdentifier.Uri).SingleOrDefault();
Workspaces\LspMiscellaneousFilesWorkspace.cs (1)
85var matchingDocument = CurrentSolution.GetDocumentIds(uri).SingleOrDefault();
Microsoft.CodeAnalysis.Rebuild (1)
CompilationOptionsReader.cs (1)
335(metadataReferenceInfo.ExternAlias == metadataReference.Properties.Aliases.SingleOrDefault())
Microsoft.CodeAnalysis.Rebuild.UnitTests (1)
CompilationRebuildArtifactResolver.cs (1)
26x.Properties.Aliases.SingleOrDefault() == metadataReferenceInfo.ExternAlias);
Microsoft.CodeAnalysis.UnitTests (1)
Diagnostics\SuppressMessageTargetSymbolResolverTests.cs (1)
1378var symbol = symbols.SingleOrDefault();
Microsoft.CodeAnalysis.VisualBasic (1)
Symbols\Source\SynthesizedEntryPointSymbol.vb (1)
198Dim method = TryCast(type.GetMembers(methodName).SingleOrDefault(), MethodSymbol)
Microsoft.CodeAnalysis.Workspaces.UnitTests (1)
FindAllDeclarationsTests.cs (1)
185var expectedSymbol = (await solution.GetProject(submission0Id).GetCompilationAsync()).GlobalNamespace.GetMembers("Outer").SingleOrDefault().GetMembers("Inner").SingleOrDefault();
Microsoft.VisualStudio.LanguageServices (1)
Venus\ContainedLanguageCodeSupport.cs (1)
426return membersOfName.SingleOrDefault();