642 references to Single
aspire (1)
Certificates\CertificateGeneration\CertificateManager.cs (1)
231.Single()
Aspire.Azure.AI.OpenAI.Tests (1)
Aspire.Cli.Tests (3)
Aspire.Dashboard (5)
Aspire.Dashboard.Components.Tests (1)
Aspire.Dashboard.Tests (35)
Integration\OtlpCorsHttpServiceTests.cs (9)
63Assert.Equal("http://localhost:8000", responseMessage1.Headers.GetValues("Access-Control-Allow-Origin").Single());
64Assert.Equal("POST", responseMessage1.Headers.GetValues("Access-Control-Allow-Methods").Single());
65Assert.Equal("X-Requested-With", responseMessage1.Headers.GetValues("Access-Control-Allow-Headers").Single());
77Assert.Equal("http://localhost:8001", responseMessage2.Headers.GetValues("Access-Control-Allow-Origin").Single());
78Assert.Equal("POST", responseMessage2.Headers.GetValues("Access-Control-Allow-Methods").Single());
79Assert.Equal("X-Requested-With", responseMessage2.Headers.GetValues("Access-Control-Allow-Headers").Single());
132Assert.Equal("*", responseMessage.Headers.GetValues("Access-Control-Allow-Origin").Single());
133Assert.Equal("POST", responseMessage.Headers.GetValues("Access-Control-Allow-Methods").Single());
134Assert.Equal("x-requested-with,x-custom,Content-Type", responseMessage.Headers.GetValues("Access-Control-Allow-Headers").Single());
TelemetryRepositoryTests\MetricsTests.cs (13)
187var dimensionAttributes = instrument.Dimensions.Single().Attributes;
283var dimensionAttributes = instrument.Dimensions.Single().Attributes;
400var instrument = resources.Single().GetInstrument("test-meter", "test", s_testTime.AddMinutes(1), s_testTime.AddMinutes(1.5));
605Assert.Equal(KeyValuePair.Create("key-1", "value-1"), d.Attributes.Single());
606Assert.Equal(1, ((MetricValue<long>)d.Values.Single()).Value);
610Assert.Equal(KeyValuePair.Create("key-1", "value-2"), d.Attributes.Single());
611Assert.Equal(2, ((MetricValue<long>)d.Values.Single()).Value);
615Assert.Equal(KeyValuePair.Create("key-1", "value-3"), d.Attributes.Single());
616Assert.Equal(3, ((MetricValue<long>)d.Values.Single()).Value);
843Assert.Equal(5, ((MetricValue<long>)resource2Test1Dimensions.Values.Single()).Value);
858Assert.Equal(6, ((MetricValue<long>)resource2Test3Dimensions.Values.Single()).Value);
983Assert.Equal(5, ((MetricValue<long>)resource2Test1Dimensions.Values.Single()).Value);
998Assert.Equal(6, ((MetricValue<long>)resource2Test3Dimensions.Values.Single()).Value);
Aspire.EndToEnd.Tests (1)
Aspire.Hosting (3)
Aspire.Hosting.Azure.ContainerRegistry (1)
Aspire.Hosting.Azure.Tests (37)
Aspire.Hosting.Containers.Tests (13)
Aspire.Hosting.DotnetTool.Tests (6)
Aspire.Hosting.Garnet.Tests (2)
Aspire.Hosting.JavaScript.Tests (13)
Aspire.Hosting.Kafka.Tests (3)
Aspire.Hosting.Keycloak.Tests (4)
Aspire.Hosting.Maui.Tests (1)
Aspire.Hosting.MySql (1)
Aspire.Hosting.MySql.Tests (1)
Aspire.Hosting.PostgreSQL.Tests (10)
Aspire.Hosting.Python.Tests (20)
Aspire.Hosting.Redis.Tests (2)
Aspire.Hosting.Seq.Tests (2)
Aspire.Hosting.Tests (56)
Aspire.Hosting.Valkey.Tests (2)
Aspire.OpenAI.Tests (2)
Aspire.StackExchange.Redis.DistributedCaching.Tests (10)
Aspire.StackExchange.Redis.Tests (12)
Aspire.Templates.Tests (1)
AzureAppService.AppHost (1)
CdkSample.AppHost (4)
csc (1)
CSharpSyntaxGenerator (3)
dotnet (13)
dotnet-dev-certs (1)
src\aspnetcore\src\Shared\CertificateGeneration\CertificateManager.cs (1)
233.Single()
dotnet-sourcelink (2)
dotnet-watch (1)
GenerateDocumentationAndConfigFiles (5)
ilc (1)
ILCompiler.Compiler (2)
ILCompiler.ReadyToRun (4)
illink (2)
ILLink.RoslynAnalyzer (1)
Microsoft.Analyzers.Extra.Tests (2)
Microsoft.Analyzers.Local.Tests (2)
Microsoft.AspNetCore.Components.Endpoints (5)
Microsoft.AspNetCore.DataProtection (4)
Microsoft.AspNetCore.DeveloperCertificates.XPlat (1)
src\aspnetcore\src\Shared\CertificateGeneration\CertificateManager.cs (1)
233.Single()
Microsoft.AspNetCore.Http.Extensions (5)
Microsoft.AspNetCore.Http.Results (1)
Microsoft.AspNetCore.Mvc.Core (2)
Microsoft.AspNetCore.Mvc.ViewFeatures (2)
Microsoft.AspNetCore.Server.Kestrel.Core (1)
src\aspnetcore\src\Shared\CertificateGeneration\CertificateManager.cs (1)
233.Single()
Microsoft.AspNetCore.SignalR.Core (2)
Microsoft.AspNetCore.StaticAssets (3)
Microsoft.AspNetCore.StaticFiles (1)
Microsoft.AspNetCore.Testing.Tests (2)
Microsoft.Build (2)
src\msbuild\artifacts\.packages\microsoft.codeanalysis.collections\5.0.0-1.25277.114\contentFiles\cs\net9.0\TemporaryArrayExtensions.cs (1)
68=> new[] { 0, 0 }.Single();
Microsoft.Build.Tasks.CodeAnalysis (1)
Microsoft.CodeAnalysis (3)
Microsoft.CodeAnalysis.Analyzers (6)
Microsoft.CodeAnalysis.AnalyzerUtilities (13)
src\roslyn\src\RoslynAnalyzers\Utilities\FlowAnalysis\FlowAnalysis\Analysis\GlobalFlowStateAnalysis\GlobalFlowStateAnalysis.GlobalFlowStateAnalysisValueSetDomain.cs (1)
202return candidateNodes.Single();
Microsoft.CodeAnalysis.CodeStyle (3)
Microsoft.CodeAnalysis.CodeStyle.Fixes (5)
Microsoft.CodeAnalysis.CSharp (12)
Microsoft.CodeAnalysis.CSharp.CodeStyle (7)
Microsoft.CodeAnalysis.CSharp.CodeStyle.Fixes (13)
Microsoft.CodeAnalysis.CSharp.Features (34)
CodeRefactorings\InlineTemporary\InlineTemporaryCodeRefactoringProvider.cs (1)
325.Single()
Microsoft.CodeAnalysis.CSharp.Workspaces (7)
Microsoft.CodeAnalysis.Extensions.Package (1)
Microsoft.CodeAnalysis.Features (21)
Microsoft.CodeAnalysis.Rebuild (1)
Microsoft.CodeAnalysis.ResxSourceGenerator (3)
Microsoft.CodeAnalysis.Workspaces (8)
Microsoft.CodeAnalysis.Workspaces.MSBuild (1)
Microsoft.CodeAnalysis.Workspaces.MSBuild.BuildHost (1)
Microsoft.DotNet.Build.Tasks.Packaging (2)
Microsoft.DotNet.Build.Tasks.VisualStudio (1)
Microsoft.DotNet.Cli.Definitions (14)
Microsoft.DotNet.HotReload.Watch (2)
Microsoft.DotNet.NuGetRepack.Tasks (1)
Microsoft.Extensions.AI.Abstractions.Tests (4)
Microsoft.Extensions.AI.Evaluation.Safety (2)
Microsoft.Extensions.AI.Integration.Tests (3)
Microsoft.Extensions.AI.OpenAI.Tests (39)
OpenAIChatClientTests.cs (26)
165Assert.Single(response.Messages.Single().Contents);
166Assert.Equal(ChatRole.Assistant, response.Messages.Single().Role);
167Assert.Equal("chatcmpl-ADx3PvAnCwJg0woha4pYsBTi3ZpOI", response.Messages.Single().MessageId);
259UsageContent usage = updates.SelectMany(u => u.Contents).OfType<UsageContent>().Single();
839Assert.Single(response.Messages.Single().Contents);
840Assert.Equal(ChatRole.Assistant, response.Messages.Single().Role);
841Assert.Equal("chatcmpl-ADyV17bXeSm5rzUx3n46O7m3M0o3P", response.Messages.Single().MessageId);
937Assert.Single(response.Messages.Single().Contents);
938Assert.Equal(ChatRole.Assistant, response.Messages.Single().Role);
1035Assert.Single(response.Messages.Single().Contents);
1036Assert.Equal(ChatRole.Assistant, response.Messages.Single().Role);
1149Assert.Equal(ChatRole.Assistant, response.Messages.Single().Role);
1167Assert.Single(response.Messages.Single().Contents);
1168FunctionCallContent fcc = Assert.IsType<FunctionCallContent>(response.Messages.Single().Contents[0]);
1233Assert.Equal(ChatRole.Assistant, response.Messages.Single().Role);
1251Assert.Single(response.Messages.Single().Contents);
1252TextContent fcc = Assert.IsType<TextContent>(response.Messages.Single().Contents[0]);
1352UsageContent usage = updates.SelectMany(u => u.Contents).OfType<UsageContent>().Single();
1488Assert.Single(response.Messages.Single().Contents);
1489Assert.Equal(ChatRole.Assistant, response.Messages.Single().Role);
1602Assert.Single(response.Messages.Single().Contents);
1603Assert.Equal(ChatRole.Assistant, response.Messages.Single().Role);
1604Assert.Equal("chatcmpl-BHaQ3nkeSDGhLzLya3mGbB1EXSqve", response.Messages.Single().MessageId);
1912var message = response.Messages.Single();
1913var reasoning = message.Contents.OfType<TextReasoningContent>().Single();
1916var text = message.Contents.OfType<TextContent>().Single();
Microsoft.Extensions.Caching.Abstractions (1)
Microsoft.Extensions.Diagnostics.ResourceMonitoring.Tests (6)
Microsoft.Extensions.Http.Diagnostics.Tests (1)
Microsoft.Extensions.Http.Resilience.Tests (4)
Microsoft.Extensions.Resilience.Tests (2)
Microsoft.Extensions.Telemetry.Tests (2)
Microsoft.Gen.BuildMetadata.Unit.Tests (1)
Microsoft.Gen.ComplianceReports.Unit.Tests (1)
Microsoft.Gen.ContextualOptions.Unit.Tests (21)
Microsoft.Gen.Logging.Unit.Tests (1)
Microsoft.Gen.MetadataExtractor.Unit.Tests (1)
Microsoft.Gen.Metrics.Unit.Tests (1)
Microsoft.Gen.MetricsReports.Unit.Tests (1)
Microsoft.Maui.Controls.Build.Tasks (4)
Microsoft.ML.PerformanceTests (1)
Microsoft.ML.Tests (4)
Microsoft.NET.Build.Tasks (2)
Microsoft.NET.Sdk.BlazorWebAssembly.Tasks (1)
Microsoft.NET.Sdk.Publish.Tasks (1)
Microsoft.TemplateEngine.Cli (11)
Microsoft.TestPlatform.TestHostRuntimeProvider (2)
Microsoft.VisualStudio.TestPlatform.ObjectModel (3)
MSBuild (1)
NuGet.CommandLine.XPlat (2)
NuGet.Commands (3)
NuGet.Frameworks (2)
NuGet.PackageManagement (3)
NuGet.Packaging (2)
NuGet.Protocol (1)
RepoTasks (1)
src\aspnetcore\src\Shared\CertificateGeneration\CertificateManager.cs (1)
233.Single()
Roslyn.Diagnostics.Analyzers (5)
Roslyn.Diagnostics.CSharp.Analyzers (4)
rzc (1)
Shared.Tests (2)
System.Collections.Immutable (4)
System.ComponentModel.Composition (1)
System.Linq.Queryable (1)
System.Private.Windows.Core.TestUtilities (1)
System.Reflection.DispatchProxy (1)
vbc (1)
VBCSCompiler (1)