890 references to Uri
Aspire.Azure.AI.OpenAI.Tests (1)
Aspire.Azure.Data.Tables.Tests (1)
Aspire.Azure.Messaging.EventHubs (1)
Aspire.Azure.Messaging.EventHubs.Tests (1)
Aspire.Azure.Search.Documents.Tests (5)
Aspire.Azure.Security.KeyVault.Tests (5)
Aspire.Azure.Storage.Blobs.Tests (1)
Aspire.Azure.Storage.Queues.Tests (1)
Aspire.Dashboard (3)
Aspire.Dashboard.Components.Tests (1)
Aspire.Dashboard.Tests (30)
Aspire.Hosting.Elasticsearch (1)
Aspire.Hosting.Nats.Tests (1)
Aspire.Hosting.RabbitMQ (1)
Aspire.Hosting.Redis (1)
Aspire.Hosting.Testing (2)
Aspire.Hosting.Tests (3)
Aspire.Milvus.Client.Tests (2)
Aspire.OpenAI.Tests (1)
Aspire.RabbitMQ.Client (1)
Aspire.RabbitMQ.Client.Tests (1)
Aspire.Seq (2)
Aspire.Seq.Tests (4)
AutobahnTestApp (1)
BasicTestApp (2)
BasicWebSite (1)
Binding.Custom.IntegrationTests (1)
Binding.UDS.IntegrationTests (4)
Binding.WS.FederationHttp.IntegrationTests (6)
BuildActionTelemetryTable (2)
BuildBoss (1)
CdkSample.ApiService (1)
Client.ChannelLayer.IntegrationTests (3)
Client.ClientBase.IntegrationTests (2)
Client.ExpectedExceptions.IntegrationTests (4)
ClientSample (3)
Diagnostics.FunctionalTests (1)
dotnet-openapi (1)
dotnet-svcutil-lib (25)
Metadata\MetadaExchangeResolver.cs (6)
109metadataResolved = await ResolveMetadataAsync(new Uri(baseUri + mexUri), MetadataExchangeClientMode.MetadataExchange, false, cancellationToken).ConfigureAwait(false);
118metadataResolved = await ResolveMetadataAsync(new Uri(baseUri + wsdlQuery), MetadataExchangeClientMode.HttpGet, false, cancellationToken).ConfigureAwait(false);
134metadataResolved = await ResolveMetadataAsync(new Uri(baseUri + wsdlQuery), MetadataExchangeClientMode.HttpGet, false, cancellationToken).ConfigureAwait(false);
138metadataResolved = await ResolveMetadataAsync(new Uri(baseUri), MetadataExchangeClientMode.HttpGet, true, cancellationToken).ConfigureAwait(false);
146metadataResolved = await ResolveMetadataAsync(new Uri(baseUri), MetadataExchangeClientMode.MetadataExchange, false, cancellationToken).ConfigureAwait(false);
149metadataResolved = await ResolveMetadataAsync(new Uri(baseUri + mexUri), MetadataExchangeClientMode.MetadataExchange, false, cancellationToken).ConfigureAwait(false);
dotnet-svcutil-lib.Tests (1)
HostedBlazorWebassemblyApp.Client (1)
HtmlGenerationWebSite (2)
IIS.FunctionalTests (10)
IIS.LongTests (1)
IIS.NewHandler.FunctionalTests (1)
IIS.NewShim.FunctionalTests (1)
IIS.Tests (1)
IISExpress.FunctionalTests (9)
InMemory.FunctionalTests (9)
Interop.FunctionalTests (4)
Keycloak.Web (1)
Microsoft.AspNetCore.Authentication.Google (1)
Microsoft.AspNetCore.Authentication.Test (5)
Microsoft.AspNetCore.Components.Endpoints.Tests (3)
Microsoft.AspNetCore.Components.WebAssembly.Server (6)
Microsoft.AspNetCore.Components.WebView (2)
Microsoft.AspNetCore.Components.WebView.Maui (4)
Microsoft.AspNetCore.Components.WebView.Photino (2)
Microsoft.AspNetCore.Components.WebView.Test (2)
Microsoft.AspNetCore.Components.WebView.WindowsForms (3)
Microsoft.AspNetCore.Components.WebView.Wpf (3)
Microsoft.AspNetCore.Cors.Test (22)
UriHelpersTests.cs (22)
36new object[] {new Uri("http://sub.domain"), new Uri("http://domain")},
37new object[] {new Uri("https://sub.domain"), new Uri("https://domain")},
38new object[] {new Uri("https://sub.domain:5678"), new Uri("https://domain:5678")},
39new object[] {new Uri("http://sub.sub.domain"), new Uri("http://domain")},
40new object[] {new Uri("http://sub.sub.domain"), new Uri("http://sub.domain")}
51new object[] {new Uri("http://subdomain"), new Uri("http://domain")},
52new object[] {new Uri("https://sub.domain"), new Uri("http://domain")},
53new object[] {new Uri("https://sub.domain:1234"), new Uri("https://domain:5678")},
54new object[] {new Uri("http://domain.tld"), new Uri("http://domain")},
55new object[] {new Uri("http://sub.domain.tld"), new Uri("http://domain")},
56new object[] {new Uri("/relativeUri", UriKind.Relative), new Uri("http://domain")},
57new object[] {new Uri("http://sub.domain"), new Uri("/relative", UriKind.Relative)}
Microsoft.AspNetCore.HeaderPropagation.Tests (2)
Microsoft.AspNetCore.Http.Abstractions.Microbenchmarks (3)
Microsoft.AspNetCore.Http.Abstractions.Tests (3)
Microsoft.AspNetCore.Http.Connections.Client (1)
Microsoft.AspNetCore.Http.Connections.Tests (9)
Microsoft.AspNetCore.Http.Extensions.Tests (15)
RequestDelegateFactoryTests.cs (7)
325new object[] { (Action<HttpContext, Uri[]>)Store, new[] { "https://example.org" }, new[] { new Uri("https://example.org") } },
339new object[] { (Action<HttpContext, MyTryParseRecord[]>)Store, new[] { "https://example.org" },new[] { new MyTryParseRecord(new Uri("https://example.org")) } },
376new object[] { (Action<HttpContext, Uri>)Store, "https://example.org", new Uri("https://example.org") },
390new object[] { (Action<HttpContext, MyTryParseRecord>)Store, "https://example.org", new MyTryParseRecord(new Uri("https://example.org")) },
704Assert.Equal(new MyAwaitedBindAsyncRecord(new Uri("https://example.org")), httpContext.Items["myAwaitedBindAsyncRecord"]);
705Assert.Equal(new MyAwaitedBindAsyncStruct(new Uri("https://example.org")), httpContext.Items["myAwaitedBindAsyncStruct"]);
1699Assert.Equal(new Uri("https://example.org"), httpContext.Items["uri"]);
Microsoft.AspNetCore.Http.Results.Tests (7)
Microsoft.AspNetCore.HttpsPolicy.Tests (9)
Microsoft.AspNetCore.Identity.FunctionalTests (2)
Microsoft.AspNetCore.InternalTesting (2)
Microsoft.AspNetCore.InternalTesting.Tests (2)
Microsoft.AspNetCore.JsonPatch.Tests (1)
Microsoft.AspNetCore.Mvc.Core.Test (9)
Microsoft.AspNetCore.Mvc.FunctionalTests (5)
Microsoft.AspNetCore.Mvc.NewtonsoftJson.Test (3)
Microsoft.AspNetCore.Mvc.Testing (2)
Microsoft.AspNetCore.OpenApi.Tests (15)
Comparers\OpenApiExternalDocsComparerTests.cs (5)
14[new OpenApiExternalDocs { Description = "description" }, new OpenApiExternalDocs { Description = "description", Url = new Uri("http://localhost") }, false],
15[new OpenApiExternalDocs { Description = "description", Url = new Uri("http://localhost") }, new OpenApiExternalDocs { Description = "description", Url = new Uri("http://localhost") }, true],
16[new OpenApiExternalDocs { Description = "description", Url = new Uri("http://localhost") }, new OpenApiExternalDocs { Description = "description", Url = new Uri("http://localhost") }, true],
Comparers\OpenApiXmlComparerTests.cs (9)
13[new OpenApiXml { Name = "name" }, new OpenApiXml { Name = "name", Namespace = new Uri("http://localhost.com/namespace") }, false],
14[new OpenApiXml { Name = "name", Namespace = new Uri("http://localhost.com/namespace") }, new OpenApiXml { Name = "name", Namespace = new Uri("http://localhost.com/namespace") }, true],
15[new OpenApiXml { Name = "name", Namespace = new Uri("http://localhost.com/namespace") }, new OpenApiXml { Name = "name", Namespace = new Uri("http://localhost.com/namespace2") }, false],
16[new OpenApiXml { Name = "name", Namespace = new Uri("http://localhost.com/namespace"), Prefix = "prefix" }, new OpenApiXml { Name = "name", Namespace = new Uri("http://localhost.com/namespace"), Prefix = "prefix" }, true],
17[new OpenApiXml { Name = "name", Namespace = new Uri("http://localhost.com/namespace"), Prefix = "prefix" }, new OpenApiXml { Name = "name", Namespace = new Uri("http://localhost.com/namespace"), Prefix = "prefix2" }, false]
Microsoft.AspNetCore.ResponseCompression.Tests (3)
Microsoft.AspNetCore.Rewrite.Tests (30)
Microsoft.AspNetCore.Routing.FunctionalTests (6)
Microsoft.AspNetCore.Server.HttpSys.FunctionalTests (26)
Listener\RequestHeaderTests.cs (11)
71Assert.Equal(new Uri(address).Authority, requestHeaders["Host"]);
72Assert.Equal(new[] { new Uri(address).Authority }, requestHeaders.GetValues("Host"));
98Assert.Equal(new Uri(address).Authority, requestHeaders["Host"]);
99Assert.Equal(new[] { new Uri(address).Authority }, requestHeaders.GetValues("Host"));
126Assert.Equal(new Uri(address).Authority, requestHeaders["Host"]);
127Assert.Equal(new[] { new Uri(address).Authority }, requestHeaders.GetValues("Host"));
167Assert.Equal(new Uri(address).Authority, requestHeaders["Host"]);
168Assert.Equal(new[] { new Uri(address).Authority }, requestHeaders.GetValues("Host"));
192Assert.Equal(new Uri(address).Authority, requestHeaders["Host"]);
193Assert.Equal(new[] { new Uri(address).Authority }, requestHeaders.GetValues("Host"));
207var uri = new Uri(address);
Microsoft.AspNetCore.Server.IntegrationTesting (5)
Microsoft.AspNetCore.Server.IntegrationTesting.IIS (1)
Microsoft.AspNetCore.Server.Kestrel.Core.Tests (2)
Microsoft.AspNetCore.Server.Kestrel.Transport.Quic.Tests (1)
Microsoft.AspNetCore.SignalR.Client (4)
Microsoft.AspNetCore.SignalR.Client.FunctionalTests (8)
Microsoft.AspNetCore.SignalR.Client.Tests (29)
ServerSentEventsTransportTests.cs (11)
54new Uri("http://fakeuri.org"), TransferFormat.Text).DefaultTimeout();
103new Uri("http://fakeuri.org"), TransferFormat.Text).DefaultTimeout();
153new Uri("http://fakeuri.org"), TransferFormat.Text).DefaultTimeout();
209new Uri("http://fakeuri.org"), TransferFormat.Text).DefaultTimeout();
259new Uri("http://fakeuri.org"), TransferFormat.Text).DefaultTimeout();
286new Uri("http://fakeuri.org"), TransferFormat.Text).DefaultTimeout();
340new Uri("http://fakeuri.org"), TransferFormat.Text).DefaultTimeout();
374var ex = await Assert.ThrowsAsync<ArgumentException>(() => sseTransport.StartAsync(new Uri("http://fakeuri.org"), TransferFormat.Binary).DefaultTimeout());
401sseTransport.StartAsync(new Uri("http://fakeuri.org"), transferFormat));
433await sseTransport.StartAsync(new Uri("http://fakeuri.org"), TransferFormat.Text).DefaultTimeout();
487new Uri("http://fakeuri.org"), TransferFormat.Text).DefaultTimeout();
Microsoft.AspNetCore.SignalR.Tests (24)
EndToEndTests.cs (15)
44var connection = new HttpConnection(new Uri(url), HttpTransports.All, LoggerFactory);
66var connection = new HttpConnection(new HttpConnectionOptions { Url = new Uri(url), DefaultTransferFormat = TransferFormat.Text }, LoggerFactory, new TestTransportFactory());
80var connection = new HttpConnection(new HttpConnectionOptions { Url = new Uri(url), Transports = transportType, DefaultTransferFormat = TransferFormat.Text }, LoggerFactory);
100await ws.ConnectAsync(new Uri(socketUrl), CancellationToken.None).DefaultTimeout();
138await ws.ConnectAsync(new Uri(socketUrl), CancellationToken.None).DefaultTimeout();
180Url = new Uri(url),
230Url = new Uri(url),
267var connection = new HttpConnection(new HttpConnectionOptions { Url = new Uri(url), Transports = transportType, DefaultTransferFormat = requestedTransferFormat }, LoggerFactory);
323var connection = new HttpConnection(new Uri(url), HttpTransportType.WebSockets, LoggerFactory);
387var connection = new HttpConnection(new Uri(url), HttpTransportType.WebSockets, LoggerFactory);
413Url = new Uri(url),
441var connection = new HttpConnection(new Uri(url), transportType, LoggerFactory);
479client.BaseAddress = new Uri(server.Url);
489Url = new Uri(url),
653client.BaseAddress = new Uri(server.Url);
Microsoft.AspNetCore.SpaProxy (1)
Microsoft.AspNetCore.SpaServices.Extensions (3)
Microsoft.AspNetCore.SpaServices.Extensions.Tests (1)
Microsoft.AspNetCore.StaticFiles.FunctionalTests (8)
Microsoft.AspNetCore.TestHost (2)
Microsoft.AspNetCore.TestHost.Tests (11)
Microsoft.AspNetCore.Testing (1)
Microsoft.AspNetCore.WebSockets.Tests (29)
WebSocketMiddlewareTests.cs (24)
29await client.ConnectAsync(new Uri($"ws://127.0.0.1:{port}/"), CancellationToken.None);
49await client.ConnectAsync(new Uri($"ws://127.0.0.1:{port}/"), CancellationToken.None);
79await client.ConnectAsync(new Uri($"ws://127.0.0.1:{port}/"), CancellationToken.None);
105await client.ConnectAsync(new Uri($"ws://127.0.0.1:{port}/"), CancellationToken.None);
130await client.ConnectAsync(new Uri($"ws://127.0.0.1:{port}/"), CancellationToken.None);
158await client.ConnectAsync(new Uri($"ws://127.0.0.1:{port}/"), CancellationToken.None);
205await client.ConnectAsync(new Uri($"ws://127.0.0.1:{port}/"), CancellationToken.None);
231await client.ConnectAsync(new Uri($"ws://127.0.0.1:{port}/"), CancellationToken.None);
256await client.ConnectAsync(new Uri($"ws://127.0.0.1:{port}/"), CancellationToken.None);
281await client.ConnectAsync(new Uri($"ws://127.0.0.1:{port}/"), CancellationToken.None);
316await client.ConnectAsync(new Uri($"ws://127.0.0.1:{port}/"), CancellationToken.None);
363await client.ConnectAsync(new Uri($"ws://127.0.0.1:{port}/"), CancellationToken.None);
385await client.ConnectAsync(new Uri($"ws://127.0.0.1:{port}/"), CancellationToken.None);
421await client.ConnectAsync(new Uri($"ws://127.0.0.1:{port}/"), CancellationToken.None);
451await client.ConnectAsync(new Uri($"ws://127.0.0.1:{port}/"), CancellationToken.None);
483await client.ConnectAsync(new Uri($"ws://127.0.0.1:{port}/"), CancellationToken.None);
558await client.ConnectAsync(new Uri($"ws://127.0.0.1:{port}/"), CancellationToken.None);
625await client.ConnectAsync(new Uri($"ws://127.0.0.1:{port}/"), CancellationToken.None);
671var uri = new UriBuilder(new Uri($"ws://127.0.0.1:{port}/"));
705var uri = new UriBuilder(new Uri($"ws://127.0.0.1:{port}/"));
735await client.ConnectAsync(new Uri($"ws://127.0.0.1:{port}/"), CancellationToken.None);
754var uri = new UriBuilder(new Uri($"ws://127.0.0.1:{port}/"));
793await client.ConnectAsync(new Uri($"ws://127.0.0.1:{port}/"), CancellationToken.None);
827var uri = new UriBuilder(new Uri($"ws://127.0.0.1:{port}/"));
Microsoft.Build (1)
Microsoft.Build.Tasks.Core (6)
Microsoft.Build.Tasks.UnitTests (4)
Microsoft.CodeAnalysis (1)
Microsoft.CodeAnalysis.CSharp.Emit3.UnitTests (1)
Microsoft.CodeAnalysis.CSharp.Syntax.UnitTests (1)
Microsoft.CodeAnalysis.LanguageServer.Protocol (1)
Microsoft.CodeAnalysis.LanguageServer.Protocol.UnitTests (3)
Microsoft.CodeAnalysis.Workspaces (1)
Microsoft.Data.Analysis.Tests (1)
Microsoft.DotNet.Build.Tasks.Feed (5)
Microsoft.DotNet.Git.IssueManager (2)
Microsoft.DotNet.Helix.Client (4)
Microsoft.DotNet.Helix.JobSender (1)
Microsoft.DotNet.Helix.JobSender.Tests (1)
Microsoft.DotNet.Helix.Sdk (6)
Microsoft.Extensions.Http.Diagnostics.PerformanceTests (2)
Microsoft.Extensions.Http.Diagnostics.Tests (28)
Logging\HttpClientLoggerTest.cs (13)
86RequestUri = new("http://default-uri.com"),
124RequestUri = new("http://default-uri.com"),
186RequestUri = new($"http://{expectedLogRecord.Host}/{expectedLogRecord.Path}"),
282RequestUri = new($"http://{expectedLogRecord.Host}/{expectedLogRecord.Path}"),
387RequestUri = new($"http://{expectedLogRecord.Host}/{expectedLogRecord.Path}"),
483RequestUri = new($"http://{expectedLogRecord.Host}/{expectedLogRecord.Path}"),
598RequestUri = new($"http://{expectedLogRecord.Host}/{expectedLogRecord.Path}"),
690RequestUri = new($"http://default-uri.com/foo/bar"),
733RequestUri = new($"http://default-uri.com/foo/bar"),
771RequestUri = new($"http://default-uri.com/foo/bar"),
815RequestUri = new($"http://default-uri.com/foo/bar"),
865RequestUri = new($"http://{expectedLogRecord.Host}/{expectedLogRecord.Path}"),
960RequestUri = new($"http://default-uri.com/foo/bar"),
Microsoft.Extensions.Http.Polly.Tests (8)
Microsoft.Extensions.Http.Resilience.PerformanceTests (8)
Microsoft.Extensions.Http.Resilience.Tests (17)
Microsoft.Extensions.ML (4)
Microsoft.Extensions.ML.Tests (2)
Microsoft.Extensions.ServiceDiscovery.Tests (17)
ConfigurationServiceEndpointResolverTests.cs (13)
102Assert.Equal(new UriEndPoint(new Uri("https://localhost")), ep.EndPoint);
117Assert.Equal(new UriEndPoint(new Uri("https://localhost")), ep.EndPoint);
132Assert.Equal(new UriEndPoint(new Uri("https://localhost")), ep.EndPoint);
172Assert.Equal(new UriEndPoint(new Uri("https://localhost:8080")), initialResult.EndpointSource.Endpoints[0].EndPoint);
194Assert.Equal(new UriEndPoint(new Uri("https://localhost:8080")), initialResult.EndpointSource.Endpoints[0].EndPoint);
209Assert.Equal(new UriEndPoint(new Uri("https://localhost:8080")), initialResult.EndpointSource.Endpoints[0].EndPoint);
265Assert.Equal(new UriEndPoint(new Uri(expectedResult)), initialResult.EndpointSource.Endpoints[0].EndPoint);
303Assert.Equal(new UriEndPoint(new Uri("http://localhost:8080")), initialResult.EndpointSource.Endpoints[0].EndPoint);
304Assert.Equal(new UriEndPoint(new Uri("http://remotehost:9090")), initialResult.EndpointSource.Endpoints[1].EndPoint);
325Assert.Equal(new UriEndPoint(new Uri("http://localhost:8080")), initialResult.EndpointSource.Endpoints[0].EndPoint);
326Assert.Equal(new UriEndPoint(new Uri("http://remotehost:9090")), initialResult.EndpointSource.Endpoints[1].EndPoint);
372Assert.Equal(new UriEndPoint(new Uri("http://remotehost:4444")), initialResult.EndpointSource.Endpoints[2].EndPoint);
421Assert.Equal(new UriEndPoint(new Uri("https://remotehost:5555")), initialResult.EndpointSource.Endpoints[2].EndPoint);
Microsoft.Extensions.ServiceDiscovery.Yarp (3)
Microsoft.Gen.Logging.Generated.Tests (1)
Microsoft.Maui (6)
Microsoft.Maui.Controls (2)
Microsoft.Maui.Controls.Compatibility (2)
Microsoft.Maui.Essentials (7)
Microsoft.ML.AutoML.Tests (1)
Microsoft.ML.Core (1)
Microsoft.ML.IntegrationTests (1)
Microsoft.ML.Parquet (3)
Microsoft.ML.Samples (5)
Microsoft.ML.Samples.GPU (5)
Microsoft.ML.SamplesUtils (1)
Microsoft.VisualBasic.Tests (1)
Microsoft.VisualStudio.LanguageServices (1)
Microsoft.VisualStudio.LanguageServices.LiveShare (2)
Microsoft.VisualStudio.LanguageServices.Xaml (2)
MSBuild (3)
MyFrontend (3)
Negotiate.Client (2)
PresentationBuildTasks (2)
PresentationCore (19)
PresentationFramework (18)
PresentationUI (6)
ReachFramework (5)
RunTests (1)
Security.TransportSecurity.IntegrationTests (33)
Sockets.BindTests (11)
src\Servers\Kestrel\test\BindTests\AddressRegistrationTests.cs (8)
209var uri = new Uri(testUrl);
337Assert.Equal(new Uri(testUrlWithPort).ToString(), response);
392Assert.Equal(new Uri(testUrl).ToString(), response);
439Assert.Equal(new Uri(testUrl).ToString(), response);
526Assert.Equal(new Uri(address).ToString(), await HttpClientSlim.GetStringAsync(address, validateCertificate: false));
641Assert.Equal(new Uri(useUrlsAddressWithPort).ToString(), await HttpClientSlim.GetStringAsync(useUrlsAddressWithPort));
686Assert.Equal(new Uri(endPointAddress).ToString(), await HttpClientSlim.GetStringAsync(endPointAddress, validateCertificate: false));
722Assert.Equal(new Uri(endPointAddress).ToString(), await HttpClientSlim.GetStringAsync(endPointAddress, validateCertificate: false));
Sockets.FunctionalTests (2)
System.ComponentModel.TypeConverter (1)
System.Data.Common (3)
System.Drawing.Common.Tests (1)
System.IO.IsolatedStorage (1)
System.IO.Packaging (5)
System.Net.Http (1)
System.Net.HttpListener (1)
System.Net.Mail (1)
System.Net.Requests (3)
System.Net.Security (1)
System.Net.WebClient (3)
System.Net.WebProxy (1)
System.Private.DataContractSerialization (1)
System.Private.Uri (2)
System.Private.Xml (4)
System.Runtime.Serialization.Schema (1)
System.Security.Cryptography (1)
System.ServiceModel.Federation.Tests (2)
System.ServiceModel.Http.Tests (2)
System.ServiceModel.NetFramingBase (5)
System.Windows.Forms (15)
System.Windows.Forms.IntegrationTests.Common (1)
System.Windows.Forms.Tests (46)
System.Xaml (3)
System.Xaml.Tests (1)
Templates.Blazor.Tests (1)
WaitFor.Frontend (1)
WebSocketSample (1)