154 references to SingleOrDefault
Aspire.Dashboard (1)
Otlp\Storage\TelemetryRepository.cs (1)
647var trace = results.SingleOrDefault();
Aspire.Hosting (3)
Dcp\ApplicationExecutor.cs (1)
1773if (modelContainerResource.Annotations.OfType<DockerfileBuildAnnotation>().SingleOrDefault() is { } dockerfileBuildAnnotation)
DistributedApplicationResourceBuilder.cs (1)
27if (behavior == ResourceAnnotationMutationBehavior.Replace && Resource.Annotations.OfType<TAnnotation>().SingleOrDefault() is { } existingAnnotation)
ResourceBuilderExtensions.cs (1)
480.SingleOrDefault();
Aspire.Hosting.Azure (1)
Provisioning\Provisioners\AzureProvisioner.cs (1)
65else if (resource.Annotations.OfType<AzureBicepResourceAnnotation>().SingleOrDefault() is { } annotation)
Aspire.Hosting.Azure.PostgreSQL (1)
AzurePostgresExtensions.cs (1)
80if (builder.Resource.Annotations.OfType<ContainerImageAnnotation>().SingleOrDefault() is { } containerAnnotation)
Aspire.Hosting.Azure.Redis (1)
AzureRedisExtensions.cs (1)
70if (builder.Resource.Annotations.OfType<ContainerImageAnnotation>().SingleOrDefault() is { } containerAnnotation)
Aspire.Hosting.Azure.Sql (1)
AzureSqlExtensions.cs (1)
38if (builder.Resource.Annotations.OfType<ContainerImageAnnotation>().SingleOrDefault() is { } containerAnnotation)
Aspire.Hosting.Garnet.Tests (3)
AddGarnetTests.cs (3)
189var persistenceAnnotation = garnet.Resource.Annotations.OfType<CommandLineArgsCallbackAnnotation>().SingleOrDefault(); 220var persistenceAnnotation = garnet.Resource.Annotations.OfType<CommandLineArgsCallbackAnnotation>().SingleOrDefault(); 253Assert.NotNull(argsAnnotations.SingleOrDefault());
Aspire.Hosting.Kafka (1)
KafkaBuilderExtensions.cs (1)
96if (builder.ApplicationBuilder.Resources.OfType<KafkaUIContainerResource>().SingleOrDefault() is { } existingKafkaUIResource)
Aspire.Hosting.PostgreSQL (2)
PostgresBuilderExtensions.cs (2)
138if (builder.ApplicationBuilder.Resources.OfType<PgAdminContainerResource>().SingleOrDefault() is { } existingPgAdminResource) 272if (builder.ApplicationBuilder.Resources.OfType<PgWebContainerResource>().SingleOrDefault() is { } existingPgWebResource)
Aspire.Hosting.Redis (2)
RedisBuilderExtensions.cs (2)
81if (builder.ApplicationBuilder.Resources.OfType<RedisCommanderResource>().SingleOrDefault() is { } existingRedisCommanderResource) 148if (builder.ApplicationBuilder.Resources.OfType<RedisInsightResource>().SingleOrDefault() is { } existingRedisCommanderResource)
Aspire.Hosting.Redis.Tests (3)
AddRedisTests.cs (3)
328var persistenceAnnotation = redis.Resource.Annotations.OfType<CommandLineArgsCallbackAnnotation>().SingleOrDefault(); 359var persistenceAnnotation = redis.Resource.Annotations.OfType<CommandLineArgsCallbackAnnotation>().SingleOrDefault(); 392Assert.NotNull(argsAnnotations.SingleOrDefault());
Aspire.Hosting.Tests (3)
AddParameterTests.cs (2)
29var annotation = parameterResource.Annotations.OfType<ResourceSnapshotAnnotation>().SingleOrDefault(); 66var annotation = parameterResource.Annotations.OfType<ResourceSnapshotAnnotation>().SingleOrDefault();
ResourceNotificationTests.cs (1)
29var annotation = custom.Resource.Annotations.OfType<ResourceSnapshotAnnotation>().SingleOrDefault();
Aspire.Hosting.Valkey.Tests (3)
AddValkeyTests.cs (3)
189var persistenceAnnotation = valkey.Resource.Annotations.OfType<CommandLineArgsCallbackAnnotation>().SingleOrDefault(); 220var persistenceAnnotation = valkey.Resource.Annotations.OfType<CommandLineArgsCallbackAnnotation>().SingleOrDefault(); 253Assert.NotNull(argsAnnotations.SingleOrDefault());
BuildBoss (2)
CompilerNuGetCheckerUtil.cs (2)
431.SingleOrDefault(); 439var file = Directory.EnumerateFiles(directory, fileName, SearchOption.AllDirectories).SingleOrDefault();
IIS.FunctionalTests (4)
Http3Tests.cs (3)
73Assert.Equal(altsvc, response1.Headers.GetValues(HeaderNames.AltSvc).SingleOrDefault()); 94Assert.Equal(altsvc, response2.Headers.GetValues(HeaderNames.AltSvc).SingleOrDefault()); 113Assert.Equal("value", response.TrailingHeaders.GetValues("custom").SingleOrDefault());
src\Servers\IIS\IIS\test\Common.FunctionalTests\FrebTests.cs (1)
158var requestStatus = eventElement.Element(nameSpace + "EventData").Descendants().Where(el => el.Attribute("Name").Value == "requestStatus").SingleOrDefault();
IISExpress.FunctionalTests (1)
src\Servers\IIS\IIS\test\Common.FunctionalTests\FrebTests.cs (1)
158var requestStatus = eventElement.Element(nameSpace + "EventData").Descendants().Where(el => el.Attribute("Name").Value == "requestStatus").SingleOrDefault();
illink (4)
ILLink.RoslynAnalyzer (3)
DataFlow\LocalDataFlowVisitor.cs (1)
179 var method = assemblyType.GetMembers (methodName).OfType<IMethodSymbol> ().SingleOrDefault ();
src\tools\illink\src\ILLink.Shared\DataFlow\ForwardDataFlowAnalysis.cs (2)
69 IControlFlowGraph<TBlock, TRegion>.ControlFlowBranch? entryOut = cfg.GetSuccessors (cfg.Entry).SingleOrDefault (); 411 IControlFlowGraph<TBlock, TRegion>.ControlFlowBranch? finallyExit = cfg.GetSuccessors (lastFinallyBlock).SingleOrDefault ();
Infrastructure.Common (1)
xunit\ConditionAttribute.cs (1)
63ITypeInfo type = testMethod.TestClass.Class.Assembly.GetTypes(false).Where(t => t.Name.Contains(symbols[0])).SingleOrDefault();
InMemory.FunctionalTests (1)
src\Servers\Kestrel\shared\test\CertificateAuthority.cs (1)
763_cert.Extensions.OfType<X509SubjectKeyIdentifierExtension>().SingleOrDefault();
InProcessWebSite (1)
src\Servers\IIS\IIS\test\testassets\InProcessWebSite\Startup.cs (1)
133var authScheme = (await authProvider.GetAllSchemesAsync()).SingleOrDefault();
InteropWebsite (1)
TestServiceImpl.cs (1)
137var encoding = context.GetHttpContext().Request.Headers.SingleOrDefault(h => string.Equals(h.Key, "grpc-encoding", StringComparison.OrdinalIgnoreCase)).Value.SingleOrDefault();
Microsoft.Analyzers.Local (1)
CallAnalysis\ToInvariantString.cs (1)
47var invariantCulture = cultureInfo?.GetMembers("InvariantCulture").OfType<IPropertySymbol>().SingleOrDefault();
Microsoft.AspNetCore.App.CodeFixes (1)
WebApplicationBuilderFixer.cs (1)
113if (invocation.ArgumentList.Arguments.SingleOrDefault() is not { } initArgument
Microsoft.AspNetCore.Authentication.JwtBearer.Tools.Tests (10)
UserJwtsTests.cs (10)
114var id = matches.SingleOrDefault().Groups[1].Value; 148var id = matches.SingleOrDefault().Groups[1].Value; 293var id = matches.SingleOrDefault().Groups[1].Value; 312var id = matches.SingleOrDefault().Groups[1].Value; 332var id = matches.SingleOrDefault().Groups[1].Value; 353var id = matches.SingleOrDefault().Groups[1].Value; 475var id = matches.SingleOrDefault().Groups[1].Value; 568var key = printMatches.SingleOrDefault().Groups[1].Value; 573var resetKey = resetMatches.SingleOrDefault().Groups[1].Value; 594var key = printMatches.SingleOrDefault().Groups[1].Value;
Microsoft.AspNetCore.Authentication.Test (1)
CookieTests.cs (1)
1917transaction.SetCookie = transaction.Response.Headers.GetValues("Set-Cookie").SingleOrDefault();
Microsoft.AspNetCore.Components (1)
CascadingParameterState.cs (1)
124.OfType<CascadingParameterAttributeBase>().SingleOrDefault();
Microsoft.AspNetCore.Grpc.JsonTranscoding.Tests (1)
JsonTranscodingServiceMethodProviderTests.cs (1)
225var e = FindGrpcEndpoints(endpoints, methodName).SingleOrDefault();
Microsoft.AspNetCore.Http.Extensions (1)
RequestDelegateFactory.cs (1)
624var constructor = constructorType.MakeGenericType(factoryContext.ArgumentTypes!).GetConstructors(BindingFlags.NonPublic | BindingFlags.Instance).SingleOrDefault();
Microsoft.AspNetCore.Http.Extensions.Tests (15)
RequestDelegateGenerator\RequestDelegateCreationTestBase.cs (1)
179var generatedCodeAttribute = endpoint.Metadata.OfType<GeneratedCodeAttribute>().SingleOrDefault();
RequestDelegateGenerator\RequestDelegateCreationTests.Forms.cs (8)
50Assert.NotNull(endpoint.Metadata.OfType<IAntiforgeryMetadata>().SingleOrDefault()); 85Assert.NotNull(endpoint.Metadata.OfType<IAntiforgeryMetadata>().SingleOrDefault()); 115Assert.NotNull(endpoint.Metadata.OfType<IAntiforgeryMetadata>().SingleOrDefault()); 153Assert.NotNull(endpoint.Metadata.OfType<IAntiforgeryMetadata>().SingleOrDefault()); 196Assert.NotNull(endpoint.Metadata.OfType<IAntiforgeryMetadata>().SingleOrDefault()); 239Assert.NotNull(endpoint.Metadata.OfType<IAntiforgeryMetadata>().SingleOrDefault()); 269Assert.NotNull(endpoint.Metadata.OfType<IAntiforgeryMetadata>().SingleOrDefault()); 309Assert.NotNull(endpoint.Metadata.OfType<IAntiforgeryMetadata>().SingleOrDefault());
RequestDelegateGenerator\RuntimeCreationTests.ComplexFormBinding.cs (6)
36Assert.NotNull(endpoint.Metadata.OfType<IAntiforgeryMetadata>().SingleOrDefault()); 72Assert.NotNull(endpoint.Metadata.OfType<IAntiforgeryMetadata>().SingleOrDefault()); 104Assert.NotNull(endpoint.Metadata.OfType<IAntiforgeryMetadata>().SingleOrDefault()); 141Assert.NotNull(endpoint.Metadata.OfType<IAntiforgeryMetadata>().SingleOrDefault()); 213Assert.NotNull(endpoint.Metadata.OfType<IAntiforgeryMetadata>().SingleOrDefault()); 250Assert.NotNull(endpoint.Metadata.OfType<IAntiforgeryMetadata>().SingleOrDefault());
Microsoft.AspNetCore.Http.Microbenchmarks (1)
src\Http\Http.Extensions\test\RequestDelegateGenerator\RequestDelegateCreationTestBase.cs (1)
179var generatedCodeAttribute = endpoint.Metadata.OfType<GeneratedCodeAttribute>().SingleOrDefault();
Microsoft.AspNetCore.Identity.InMemory.Test (1)
InMemoryStore.cs (1)
62var role = _roles.Values.Where(x => x.NormalizedName.Equals(roleName)).SingleOrDefault();
Microsoft.AspNetCore.Identity.UI (1)
IdentityBuilderUIExtensions.cs (1)
88.SingleOrDefault()?.UIFramework; // Bootstrap5 is the default
Microsoft.AspNetCore.Mvc.ApiExplorer.Test (4)
EndpointMetadataApiDescriptionProviderTest.cs (4)
1448var descriptionMetadata = apiDescription.ActionDescriptor.EndpointMetadata.OfType<IEndpointDescriptionMetadata>().SingleOrDefault(); 1452var summaryMetadata = apiDescription.ActionDescriptor.EndpointMetadata.OfType<IEndpointSummaryMetadata>().SingleOrDefault(); 1479var descriptionMetadata = apiDescription.ActionDescriptor.EndpointMetadata.OfType<IEndpointDescriptionMetadata>().SingleOrDefault(); 1483var summaryMetadata = apiDescription.ActionDescriptor.EndpointMetadata.OfType<IEndpointSummaryMetadata>().SingleOrDefault();
Microsoft.AspNetCore.Mvc.Core (1)
ModelBinding\Metadata\ModelAttributes.cs (1)
231return modelMetadataTypeAttributes?.SingleOrDefault()?.MetadataType;
Microsoft.AspNetCore.Mvc.Core.Test (4)
ApplicationModels\DefaultApplicationModelProviderTest.cs (2)
638var method = typeInfo.GetDeclaredMethods("Dispose").SingleOrDefault(); 654var method = typeInfo.GetDeclaredMethods("Dispose").SingleOrDefault();
RequestFormLimitsAttributeTest.cs (2)
23.SingleOrDefault(); 44.SingleOrDefault();
Microsoft.AspNetCore.Mvc.FunctionalTests (1)
GlobalAuthorizationFilterTestBase.cs (1)
71var cookie2 = response.Headers.GetValues("Set-Cookie").SingleOrDefault();
Microsoft.AspNetCore.Mvc.RazorPages (2)
Infrastructure\DefaultPageLoader.cs (1)
94compiled.Endpoint = endpoints.SingleOrDefault();
Infrastructure\PageActionDescriptorProvider.cs (1)
135var pageRouteMetadata = selectorModel.EndpointMetadata.OfType<PageRouteMetadata>().SingleOrDefault();
Microsoft.AspNetCore.Mvc.ViewFeatures.Test (3)
Filters\TempDataApplicationModelProviderTest.cs (2)
75var controller = context.Result.Controllers.SingleOrDefault(); 96var controller = context.Result.Controllers.SingleOrDefault();
Filters\ViewDataAttributeApplicationModelProviderTest.cs (1)
55var controller = context.Result.Controllers.SingleOrDefault();
Microsoft.AspNetCore.OpenApi (3)
Extensions\OpenApiEndpointConventionBuilderExtensions.cs (1)
98var methodInfo = metadata.OfType<MethodInfo>().SingleOrDefault();
Services\OpenApiGenerator.cs (2)
63httpMethodMetadata.HttpMethods.SingleOrDefault() is { } method && 310var allowEmpty = requestBodyParameter.GetCustomAttributes().OfType<IFromBodyMetadata>().SingleOrDefault()?.AllowEmpty ?? false;
Microsoft.AspNetCore.OpenApi.Tests (2)
Services\OpenApiGeneratorTests.cs (2)
812Assert.Equal("multipart/form-data", fromFileParam0.Content.Keys.SingleOrDefault()); 817Assert.Equal("multipart/form-data", fromFileParam1.Content.Keys.SingleOrDefault());
Microsoft.AspNetCore.ResponseCompression.Tests (1)
ResponseCompressionMiddlewareTest.cs (1)
1006Assert.Equal("MD5", md5.SingleOrDefault());
Microsoft.AspNetCore.Rewrite (1)
IISUrlRewrite\RewriteMapParser.cs (1)
15var mapsElement = xmlRoot.Descendants(RewriteTags.RewriteMaps).SingleOrDefault();
Microsoft.AspNetCore.Routing.Tests (4)
CompositeEndpointDataSourceTest.cs (4)
335if (b.Metadata.OfType<string>().SingleOrDefault() == "initial-metadata") 391if (b.Metadata.OfType<string>().SingleOrDefault() == "initial-metadata") 446if (b.Metadata.OfType<string>().SingleOrDefault() == "initial-metadata") 453if (b.Metadata.OfType<IEndpointNameMetadata>().SingleOrDefault() is not null)
Microsoft.AspNetCore.Server.HttpSys.FunctionalTests (3)
Http3Tests.cs (3)
81Assert.Equal(altsvc, response1.Headers.GetValues(HeaderNames.AltSvc).SingleOrDefault()); 118Assert.Equal(altsvc, response2.Headers.GetValues(HeaderNames.AltSvc).SingleOrDefault()); 152Assert.Equal("value", response.TrailingHeaders.GetValues("custom").SingleOrDefault());
Microsoft.AspNetCore.Server.IntegrationTesting.IIS (1)
IISDeployer.cs (1)
273var workerProcess = appPool.WorkerProcesses.SingleOrDefault();
Microsoft.AspNetCore.Server.Kestrel.Core.Tests (1)
src\Servers\Kestrel\shared\test\CertificateAuthority.cs (1)
763_cert.Extensions.OfType<X509SubjectKeyIdentifierExtension>().SingleOrDefault();
Microsoft.CodeAnalysis (2)
InternalUtilities\EnumerableExtensions.cs (1)
775/// Unlike <see cref="Enumerable.SingleOrDefault{TSource}(IEnumerable{TSource})"/> doesn't throw if there is more than one element in the sequence.
Syntax\SyntaxNodeExtensions_Tracking.cs (1)
96return GetCurrentNodes(root, node).SingleOrDefault();
Microsoft.CodeAnalysis.CodeStyle (1)
src\Compilers\Core\Portable\InternalUtilities\EnumerableExtensions.cs (1)
775/// Unlike <see cref="Enumerable.SingleOrDefault{TSource}(IEnumerable{TSource})"/> doesn't throw if there is more than one element in the sequence.
Microsoft.CodeAnalysis.CSharp.EditorFeatures.UnitTests (1)
CodeActions\SyncNamespace\CSharpSyncNamespaceTestsBase.cs (1)
158var refDocument = workspace.Documents.Where(doc => doc.Id != originalDocumentId).SingleOrDefault();
Microsoft.CodeAnalysis.CSharp.Features (1)
ChangeSignature\CSharpChangeSignatureService.cs (1)
189var parameters = matchingNode.ChildNodes().OfType<BaseParameterListSyntax>().SingleOrDefault();
Microsoft.CodeAnalysis.CSharp.Semantic.UnitTests (2)
Semantics\IteratorTests.cs (2)
458var yieldNode = (YieldStatementSyntax)tree.GetRoot().DescendantNodes().Where(n => n is YieldStatementSyntax).SingleOrDefault(); 481var yieldNode = (YieldStatementSyntax)tree.GetRoot().DescendantNodes().Where(n => n is YieldStatementSyntax).SingleOrDefault();
Microsoft.CodeAnalysis.CSharp.Workspaces (1)
Simplification\Simplifiers\ExpressionSimplifier.cs (1)
393var constructor = memberAccess.Ancestors().OfType<ConstructorDeclarationSyntax>().SingleOrDefault();
Microsoft.CodeAnalysis.EditorFeatures.UnitTests (1)
RenameTracking\RenameTrackingTestState.cs (1)
176return actions.SingleOrDefault();
Microsoft.CodeAnalysis.Features (10)
CodeRefactorings\AddMissingImports\AbstractAddMissingImportsRefactoringProvider.cs (1)
31var pasteTrackingService = services?.GetExports<IPasteTrackingService>().SingleOrDefault()?.Value;
CodeRefactorings\SyncNamespace\AbstractSyncNamespaceCodeRefactoringProvider.State.cs (1)
186return defaultNamespaceFromProjects.SingleOrDefault();
Completion\Providers\AbstractSymbolCompletionProvider.cs (1)
75var declarationSyntax = symbol.DeclaringSyntaxReferences.Select(r => r.GetSyntax()).SingleOrDefault();
ExtractInterface\AbstractExtractInterfaceService.cs (1)
341var typeDeclaration = currentRoot.GetAnnotatedNodes(typeNodeAnnotation).SingleOrDefault();
ExtractMethod\InsertionPoint.cs (1)
43return root.GetAnnotatedNodesAndTokens(_annotation).SingleOrDefault().AsNode();
ExtractMethod\MethodExtractor.TriviaResult.cs (2)
38var callsite = root.GetAnnotatedNodesAndTokens(callsiteAnnotation).SingleOrDefault().AsNode(); 39var method = root.GetAnnotatedNodesAndTokens(methodDefinitionAnnotation).SingleOrDefault().AsNode();
ExtractMethod\MethodExtractor.VariableInfo.cs (1)
124=> node.GetAnnotatedTokens(_variableSymbol.IdentifierTokenAnnotation).SingleOrDefault();
GenerateConstructorFromMembers\AbstractGenerateConstructorFromMembersCodeRefactoringProvider.cs (1)
114var applyChangesOperation = operations.OfType<ApplyChangesOperation>().SingleOrDefault();
SyncNamespaces\AbstractSyncNamespacesService.cs (1)
146var applyChangesOperation = operations.OfType<ApplyChangesOperation>().SingleOrDefault();
Microsoft.CodeAnalysis.LanguageServer.Protocol.UnitTests (3)
Metadata\LspMetadataAsSourceWorkspaceTests.cs (2)
130var doc = testLspServer.GetManagerAccessor().GetLspMiscellaneousFilesWorkspace()!.CurrentSolution.Projects.SingleOrDefault()?.Documents.SingleOrDefault();
Miscellaneous\LspMiscellaneousFilesWorkspaceTests.cs (1)
309return testLspServer.GetManagerAccessor().GetLspMiscellaneousFilesWorkspace()!.CurrentSolution.Projects.SingleOrDefault()?.Documents.Single();
Microsoft.CodeAnalysis.Rebuild (1)
CompilationOptionsReader.cs (1)
202select PdbReader.GetBlobBytes(cdi.Value)).SingleOrDefault();
Microsoft.CodeAnalysis.Workspaces (1)
src\Compilers\Core\Portable\InternalUtilities\EnumerableExtensions.cs (1)
775/// Unlike <see cref="Enumerable.SingleOrDefault{TSource}(IEnumerable{TSource})"/> doesn't throw if there is more than one element in the sequence.
Microsoft.CodeAnalysis.Workspaces.MSBuild.BuildHost (1)
src\Compilers\Core\Portable\InternalUtilities\EnumerableExtensions.cs (1)
775/// Unlike <see cref="Enumerable.SingleOrDefault{TSource}(IEnumerable{TSource})"/> doesn't throw if there is more than one element in the sequence.
Microsoft.CodeAnalysis.Workspaces.MSBuild.UnitTests (1)
VisualStudioMSBuildWorkspaceTests.cs (1)
2473Assert.NotNull(project.Solution.GetProjectsByName("CSharpProject").SingleOrDefault());
Microsoft.CodeAnalysis.Workspaces.Test.Utilities (2)
MEF\UseExportProviderAttribute.cs (2)
116if (exportProvider.GetExportedValues<IAsynchronousOperationListenerProvider>().SingleOrDefault() is { } listenerProvider) 119var testExportJoinableTaskContext = exportProvider.GetExportedValues<TestExportJoinableTaskContext>().SingleOrDefault();
Microsoft.CodeAnalysis.Workspaces.UnitTests (2)
FindAllDeclarationsTests.cs (2)
184var actualSymbol = (await SymbolFinder.FindDeclarationsAsync(solution.GetProject(submission1Id), "Inner", ignoreCase: false)).SingleOrDefault(); 185var expectedSymbol = (await solution.GetProject(submission0Id).GetCompilationAsync()).GlobalNamespace.GetMembers("Outer").SingleOrDefault().GetMembers("Inner").SingleOrDefault();
Microsoft.DotNet.NuGetRepack.Tasks (2)
src\NuGetVersionUpdater.cs (1)
142var xmlNsAttribute = nuspecXml.Root.Attributes("xmlns").SingleOrDefault();
src\ReplacePackageParts.cs (1)
148var xmlNsAttribute = nuspecXml.Root.Attributes("xmlns").SingleOrDefault();
Microsoft.Extensions.Caching.StackExchangeRedis.Tests (1)
Infrastructure\RedisTestConfig.cs (1)
94var process = Process.GetProcessesByName(FunctionalTestsRedisServerExeName).SingleOrDefault();
Microsoft.VisualStudio.LanguageServices (4)
ColorSchemes\ColorSchemeApplier.ColorSchemeReader.cs (2)
65var backgroundElement = colorElement.Descendants("Background").SingleOrDefault(); 70var foregroundElement = colorElement.Descendants("Foreground").SingleOrDefault();
Utilities\AutomationDelegatingListView.cs (2)
89checkBoxItem = this.GetChildren()?.OfType<CheckBoxAutomationPeer>().SingleOrDefault(); 98radioButtonItem = this.GetChildren()?.OfType<RadioButtonAutomationPeer>().SingleOrDefault();
System.Collections.Immutable (1)
System\Linq\ImmutableArrayExtensions.cs (1)
507return immutableArray.array!.SingleOrDefault()!;
System.ComponentModel.Annotations (1)
System\ComponentModel\DataAnnotations\ValidationAttributeStore.cs (1)
153DisplayAttribute = attributes.OfType<DisplayAttribute>().SingleOrDefault();
System.ComponentModel.Composition (3)
System\ComponentModel\Composition\Hosting\ExportProvider.GetExportOverrides.cs (3)
730Export? export = GetExportsCore(typeof(T), (Type?)null, contractName, cardinality).SingleOrDefault(); 761Export? export = GetExportsCore(typeof(T), typeof(TMetadataView), contractName, ImportCardinality.ExactlyOne).SingleOrDefault(); 768Export? export = GetExportsCore(typeof(T), null, contractName, ImportCardinality.ExactlyOne).SingleOrDefault();
System.Composition.TypedParts (2)
System\Composition\Convention\AttributedModelProviderExtensions.cs (2)
16return convention.GetCustomAttributes(reflectedType, member).OfType<TAttribute>().SingleOrDefault(); 31return convention.GetCustomAttributes(reflectedType, parameter).OfType<TAttribute>().SingleOrDefault();
System.Linq.Queryable (1)
System\Linq\EnumerableRewriter.cs (1)
183.SingleOrDefault();
System.Windows.Forms.IntegrationTests.Common (1)
TestHelpers.cs (1)
38.SingleOrDefault();