25 references to SingleOrDefault
Aspire.Hosting.Tests (14)
Orchestrator\ApplicationOrchestratorTests.cs (13)
57childParentResourceId = item.Snapshot.Properties.SingleOrDefault(p => p.Name == KnownProperties.Resource.ParentName)?.Value?.ToString(); 105childParentResourceId = item.Snapshot.Properties.SingleOrDefault(p => p.Name == KnownProperties.Resource.ParentName)?.Value?.ToString(); 206childParentResourceId = item.Snapshot.Properties.SingleOrDefault(p => p.Name == KnownProperties.Resource.ParentName)?.Value?.ToString(); 210nestedChildParentResourceId = item.Snapshot.Properties.SingleOrDefault(p => p.Name == KnownProperties.Resource.ParentName)?.Value?.ToString(); 214child2ParentResourceId = item.Snapshot.Properties.SingleOrDefault(p => p.Name == KnownProperties.Resource.ParentName)?.Value?.ToString(); 275childParentResourceId = item.Snapshot.Properties.SingleOrDefault(p => p.Name == KnownProperties.Resource.ParentName)?.Value?.ToString(); 323projectBParentResourceId = item.Snapshot.Properties.SingleOrDefault(p => p.Name == KnownProperties.Resource.ParentName)?.Value?.ToString(); 1053var waitingFor = waitingEvent.Snapshot.Properties.SingleOrDefault(p => p.Name == KnownProperties.Resource.WaitingFor)?.Value; 1413childParentResourceId = item.Snapshot.Properties.SingleOrDefault(p => p.Name == KnownProperties.Resource.ParentName)?.Value?.ToString(); 1417child2ParentResourceId = item.Snapshot.Properties.SingleOrDefault(p => p.Name == KnownProperties.Resource.ParentName)?.Value?.ToString(); 1470childParentResourceId = item.Snapshot.Properties.SingleOrDefault(p => p.Name == KnownProperties.Resource.ParentName)?.Value?.ToString(); 1474child2ParentResourceId = item.Snapshot.Properties.SingleOrDefault(p => p.Name == KnownProperties.Resource.ParentName)?.Value?.ToString(); 1524childProjectParentResourceId = item.Snapshot.Properties.SingleOrDefault(p => p.Name == KnownProperties.Resource.ParentName)?.Value?.ToString();
ResourceNotificationTests.cs (1)
1621var property = resourceEvent.Snapshot.Properties.SingleOrDefault(p => p.Name == KnownProperties.Resource.WaitingFor);
ConfigurationSchemaGenerator (1)
RuntimeSource\Configuration.Binder\ConfigurationBindingGenerator.Parser.cs (1)
852type.InstanceConstructors.SingleOrDefault(ctor => ctor.DeclaredAccessibility is Accessibility.Public && ctor.Parameters.Length is 0) is not null;
Microsoft.AspNetCore.App.Analyzers (1)
RouteHandlers\RouteHandlerAnalyzer.cs (1)
227var builderArgument = operation.Arguments.SingleOrDefault(a => a.Parameter?.Ordinal == 0);
Microsoft.CodeAnalysis.Features (2)
EditAndContinue\AbstractEditAndContinueAnalyzer.cs (1)
5147result = record.InstanceConstructors.SingleOrDefault(m => m.IsImplicitlyDeclared && m.IsCopyConstructor());
InlineTemporary\AbstractInlineTemporaryCodeRefactoringProvider.cs (1)
41var referencedSymbol = findReferencesResult.SingleOrDefault(r => Equals(r.Definition, local));
Microsoft.CodeAnalysis.NetAnalyzers (1)
Microsoft.NetCore.Analyzers\Runtime\ForwardCancellationTokenToInvocations.Fixer.cs (1)
139var paramsArrayType = invocation.Arguments.SingleOrDefault(a => a.ArgumentKind == ArgumentKind.ParamArray)?.Value.Type as IArrayTypeSymbol;
Microsoft.CodeAnalysis.Rebuild (1)
Extensions.cs (1)
26var entry = peReader.ReadDebugDirectory().SingleOrDefault(x => x.Type == DebugDirectoryEntryType.EmbeddedPortablePdb);
Microsoft.Extensions.Configuration.Binder.SourceGeneration (1)
ConfigurationBindingGenerator.Parser.cs (1)
982type.InstanceConstructors.SingleOrDefault(ctor => ctor.DeclaredAccessibility is Accessibility.Public && ctor.Parameters.Length is 0) is not null;
Microsoft.Maui.Controls.SourceGen (1)
CodeBehindGenerator.cs (1)
187 .SingleOrDefault(t => t.ContainingAssembly.Identity.Name == "Microsoft.Maui.Controls");
System.Text.RegularExpressions.Generator (3)
UpgradeToGeneratedRegexCodeFixer.cs (3)
381.SingleOrDefault(arg => arg.Parameter?.Name == UpgradeToGeneratedRegexAnalyzer.PatternArgumentName) 386IArgumentOperation? optionsArgument = arguments.SingleOrDefault(arg => arg.Parameter?.Name == UpgradeToGeneratedRegexAnalyzer.OptionsArgumentName); 398if (arguments.SingleOrDefault(arg => arg.Parameter?.Name == parameterName) is IArgumentOperation argument)