890 references to Uri
Aspire.Azure.AI.OpenAI.Tests (1)
AspireAzureAIOpenAIExtensionsTests.cs (1)
87var uri = new Uri("https://aspireopenaitests.openai.azure.com/");
Aspire.Azure.Data.Tables.Tests (1)
ConformanceTests.cs (1)
125TableServiceClient tableClient = new(new Uri(ServiceUri), new DefaultAzureCredential(), clientOptions);
Aspire.Azure.Messaging.EventHubs (1)
EventHubsComponent.cs (1)
56: new Uri(settings.FullyQualifiedNamespace).Host;
Aspire.Azure.Messaging.EventHubs.Tests (1)
AspireEventHubsExtensionsTests.cs (1)
60var blobClient = new BlobServiceClient(new Uri(BlobsConnectionString), new DefaultAzureCredential());
Aspire.Azure.Search.Documents.Tests (5)
AspireAzureSearchExtensionsTests.cs (5)
42Assert.Equal(new Uri(SearchEndpoint), client.Endpoint); 50var searchEndpoint = new Uri("https://aspireazuresearchtests.search.windows.net/"); 69Assert.Equal(new Uri(SearchEndpoint), client.Endpoint); 98Assert.Equal(new Uri("https://aspireazuresearchtests2.search.windows.net/"), client2.Endpoint); 99Assert.Equal(new Uri("https://aspireazuresearchtests3.search.windows.net/"), client3.Endpoint);
Aspire.Azure.Security.KeyVault.Tests (5)
AspireKeyVaultExtensionsTests.cs (4)
22var vaultUri = new Uri(ConformanceTests.VaultUri); 73Assert.Equal(new Uri(ConformanceTests.VaultUri), client.VaultUri); 201Assert.Equal(new Uri("https://aspiretests2.vault.azure.net/"), client2.VaultUri); 202Assert.Equal(new Uri("https://aspiretests3.vault.azure.net/"), client3.VaultUri);
ConformanceTests.cs (1)
117SecretClient secretClient = new(new Uri(VaultUri), new DefaultAzureCredential(), clientOptions);
Aspire.Azure.Storage.Blobs.Tests (1)
ConformanceTests.cs (1)
126BlobServiceClient tableClient = new(new Uri(ServiceUri), new DefaultAzureCredential(), clientOptions);
Aspire.Azure.Storage.Queues.Tests (1)
ConformanceTests.cs (1)
128QueueServiceClient tableClient = new(new Uri(ServiceUri), new DefaultAzureCredential(), clientOptions);
Aspire.Dashboard (3)
Components\Dialogs\SettingsDialog.razor.cs (1)
69var uri = new Uri(NavigationManager.Uri)
Model\TargetLocationInterceptor.cs (2)
22var targetBaseUri = new Uri(uri.GetLeftPart(UriPartial.Authority)); 23if (targetBaseUri != new Uri(appBaseUri))
Aspire.Dashboard.Components.Tests (1)
Pages\MetricsTests.cs (1)
82loadRedirect = new Uri(a.Location);
Aspire.Dashboard.Tests (30)
Integration\FrontendBrowserTokenAuthTests.cs (8)
40using var client = new HttpClient { BaseAddress = new Uri($"http://{app.FrontendSingleEndPointAccessor().EndPoint}") }; 62using var client = new HttpClient { BaseAddress = new Uri($"http://{app.FrontendSingleEndPointAccessor().EndPoint}") }; 93using var client = new HttpClient { BaseAddress = new Uri($"http://{app.OtlpServiceHttpEndPointAccessor().EndPoint}") }; 117using var client = new HttpClient { BaseAddress = new Uri($"http://{app.FrontendSingleEndPointAccessor().EndPoint}") }; 142using var client = new HttpClient { BaseAddress = new Uri($"http://{app.FrontendSingleEndPointAccessor().EndPoint}") }; 181var uri = new Uri((string)GetValue(w.State, "DashboardUri")!); 188var uri = new Uri((string)GetValue(w.State, "OtlpEndpointUri")!); 195var uri = new Uri((string)GetValue(w.State, "OtlpEndpointUri")!);
Integration\FrontendOpenIdConnectAuthTests.cs (2)
37using var client = new HttpClient(handler) { BaseAddress = new Uri($"http://{app.FrontendSingleEndPointAccessor().EndPoint}") }; 82using var client = new HttpClient(handler) { BaseAddress = new Uri($"http://{app.OtlpServiceHttpEndPointAccessor().EndPoint}") };
Integration\IntegrationTestHelpers.cs (1)
133return new HttpClient(handler) { BaseAddress = new Uri(address) };
Integration\OtlpHttpServiceTests.cs (5)
228using var client = new HttpClient { BaseAddress = new Uri($"http://{endpoint.EndPoint}") }; 256using var client = new HttpClient { BaseAddress = new Uri($"http://{endpoint.EndPoint}") }; 281using var client = new HttpClient { BaseAddress = new Uri($"http://{endpoint.EndPoint}") }; 310using var client = new HttpClient { BaseAddress = new Uri($"http://{endpoint.EndPoint}") }; 339using var client = new HttpClient { BaseAddress = new Uri($"http://{endpoint.EndPoint}") };
Integration\Playwright\BrowserTokenAuthenticationTests.cs (2)
39var uri = new Uri(response!.Url); 65var uri = new Uri(response!.Url);
Integration\ResponseCompressionTests.cs (2)
23using var client = new HttpClient(httpClientHandler) { BaseAddress = new Uri($"http://{app.FrontendSingleEndPointAccessor().EndPoint}") }; 45using var client = new HttpClient(httpClientHandler) { BaseAddress = new Uri($"http://{app.FrontendSingleEndPointAccessor().EndPoint}") };
Integration\StartupTests.cs (9)
296BaseAddress = new Uri($"https://{app.FrontendSingleEndPointAccessor().EndPoint}") 397BaseAddress = new Uri($"http://{app.FrontendSingleEndPointAccessor().EndPoint}") 569var uri = new Uri((string)GetValue(w.State, "DashboardUri")!); 576var uri = new Uri((string)GetValue(w.State, "OtlpEndpointUri")!); 583var uri = new Uri((string)GetValue(w.State, "OtlpEndpointUri")!); 649var uri = new Uri((string)GetValue(w.State, "DashboardUri")!); 658var uri = new Uri((string)GetValue(w.State, "OtlpEndpointUri")!); 665var uri = new Uri((string)GetValue(w.State, "OtlpEndpointUri")!); 690using var client = new HttpClient { BaseAddress = new Uri($"http://{app.FrontendSingleEndPointAccessor().EndPoint}") };
ResourceOutgoingPeerResolverTests.cs (1)
20urls: serviceAddress is null || servicePort is null ? [] : [new UrlViewModel(name, new($"http://{serviceAddress}:{servicePort}"), isInternal: false)]);
Aspire.Hosting.Elasticsearch (1)
ElasticsearchBuilderExtensions.cs (1)
68elasticsearchClient = new ElasticsearchClient(new Uri(connectionString));
Aspire.Hosting.Nats.Tests (1)
NatsFunctionalTests.cs (1)
132? connectionString!.Replace(new Uri(connectionString).UserInfo, null)
Aspire.Hosting.RabbitMQ (1)
RabbitMQBuilderExtensions.cs (1)
60options.ConnectionUri = new Uri(connectionString!);
Aspire.Hosting.Redis (1)
RedisBuilderExtensions.cs (1)
191client.BaseAddress = new Uri($"{insightEndpoint.Scheme}://{insightEndpoint.Host}:{insightEndpoint.Port}");
Aspire.Hosting.Testing (2)
DistributedApplicationHostingTestingExtensions.cs (2)
28client.BaseAddress = new(baseUri); 61public static Uri GetEndpoint(this DistributedApplication app, string resourceName, string? endpointName = default) => new(GetEndpointUriStringCore(app, resourceName, endpointName));
Aspire.Hosting.Tests (3)
Utils\PasswordGeneratorTests.cs (1)
111Exception exception = Record.Exception(() => new Uri($"https://guest:{password}@localhost:12345"));
WithReferenceTests.cs (2)
284Assert.Throws<InvalidOperationException>(() => builder.AddProject<ProjectA>("projecta").WithReference("petstore", new Uri("https://petstore.swagger.io/v2"))); 293.WithReference("petstore", new Uri("https://petstore.swagger.io/"));
Aspire.Milvus.Client.Tests (2)
AspireMilvusExtensionTests.cs (2)
65builder.AddKeyedMilvusClient(DefaultKeyName, settings => { settings.Endpoint = new Uri("http://localhost:19530"); settings.Key = DefaultApiKey; }); 69builder.AddMilvusClient(DefaultKeyName, settings => { settings.Endpoint = new Uri("http://localhost:19530"); settings.Key = DefaultApiKey; });
Aspire.OpenAI.Tests (1)
AspireOpenAIExtensionsTests.cs (1)
50var uri = new Uri("https://api.openai.com/");
Aspire.RabbitMQ.Client (1)
AspireRabbitMQExtensions.cs (1)
104factory.Uri = new(connectionString);
Aspire.RabbitMQ.Client.Tests (1)
AspireRabbitMQExtensionsTests.cs (1)
197var uri = new Uri(expectedUri);
Aspire.Seq (2)
AspireSeqExtensions.cs (2)
56settings.Logs.Endpoint = new Uri($"{settings.ServerUrl}/ingest/otlp/v1/logs"); 57settings.Traces.Endpoint = new Uri($"{settings.ServerUrl}/ingest/otlp/v1/traces");
Aspire.Seq.Tests (4)
SeqEndpointCanBeConfigured.cs (4)
40s.Logs.Endpoint = new Uri("http://localhost:1234/ingest/otlp/v1/logs"); 41s.Traces.Endpoint = new Uri("http://localhost:1234/ingest/otlp/v1/traces"); 44Assert.Equal(settings.Logs.Endpoint, new Uri("http://localhost:9876/ingest/otlp/v1/logs")); 45Assert.Equal(settings.Traces.Endpoint, new Uri("http://localhost:9876/ingest/otlp/v1/traces"));
AutobahnTestApp (1)
Program.cs (1)
54var uri = new Uri(urls);
BasicTestApp (2)
Program.cs (2)
34builder.Services.AddSingleton(new HttpClient { BaseAddress = new Uri(builder.HostEnvironment.BaseAddress) }); 67uri = new Uri(host.Services.GetService<NavigationManager>().Uri);
BasicWebSite (1)
StartupWithoutEndpointRouting.cs (1)
67client.BaseAddress = new Uri($"{httpContext.Request.Scheme}://{httpContext.Request.Host}");
Binding.Custom.IntegrationTests (1)
CustomBindingTests.4.1.0.cs (1)
35factory = new ChannelFactory<IWcfService>(binding, new EndpointAddress(new Uri(Endpoints.Tcp_CustomBinding_SslStreamSecurity_Address), endpointIdentity));
Binding.UDS.IntegrationTests (4)
ServiceHelper.cs (1)
26options.Listen(new Uri("net.uds://" + linuxSocketFilepath));
UDSBindingTests.cs (3)
78var uri = new Uri("net.uds://" + UDS.GetUDSFilePath()); 116new System.ServiceModel.EndpointAddress(new Uri(uriBuilder.ToString()), identity)); 160new System.ServiceModel.EndpointAddress(new Uri("net.uds://" + UDS.GetUDSFilePath())));
Binding.WS.FederationHttp.IntegrationTests (6)
WSFederationHttpBindingTests.cs (6)
37issuerAddress = new EndpointAddress(new Uri(Endpoints.WSFederationAuthorityLocalSTS + endpointSuffix)); 39serviceEndpointAddress = new EndpointAddress(new Uri(tokenTargetAddress)); 97issuerAddress = new EndpointAddress(new Uri(Endpoints.WSFederationAuthorityLocalSTS + "wsHttp/wstrustFeb2005")); 99serviceEndpointAddress = new EndpointAddress(new Uri(tokenTargetAddress)); 148issuerAddress = new EndpointAddress(new Uri(Endpoints.WSFederationAuthorityLocalSTS + "wsHttp/wstrust13")); 150serviceEndpointAddress = new EndpointAddress(new Uri(tokenTargetAddress));
BuildActionTelemetryTable (2)
Program.cs (2)
461var currentDirectory = new Uri(Environment.CurrentDirectory + "\\"); 473var relativePath = baseUri.MakeRelativeUri(new Uri(rootedPath));
BuildBoss (1)
SharedUtil.cs (1)
20internal static Uri MSBuildNamespaceUri { get; } = new Uri(MSBuildNamespaceUriRaw);
CdkSample.ApiService (1)
Program.cs (1)
31clients.AddConfigurationClient(new Uri(builder.Configuration.GetConnectionString("appConfig")!));
Client.ChannelLayer.IntegrationTests (3)
DuplexChannelWithSynchronizationContext.cs (3)
34EndpointAddress endpointAddress = new EndpointAddress(new Uri(Endpoints.Tcp_Certificate_Duplex_Address)); 94EndpointAddress endpointAddress = new EndpointAddress(new Uri(Endpoints.Tcp_Certificate_Duplex_Address)); 172EndpointAddress endpointAddress = new EndpointAddress(new Uri(Endpoints.Tcp_Certificate_Duplex_Address));
Client.ClientBase.IntegrationTests (2)
ClientBaseTests.4.1.0.cs (2)
35cookieManager.CookieContainer.Add(new Uri(Endpoints.HttpBaseAddress_Basic_Text), new System.Net.Cookie(cookieName, cookieValue)); 62Uri uri = new Uri(Endpoints.HttpBaseAddress_Basic_Text);
Client.ExpectedExceptions.IntegrationTests (4)
ExpectedExceptionTests.4.1.0.cs (3)
92string hostName = new Uri(Endpoints.HttpBaseAddress_Basic_Text).Host; 388endpointAddress = new EndpointAddress(new Uri(Endpoints.Tcp_RevokedServerCertResource_Address), new DnsEndpointIdentity(Endpoints.Tcp_RevokedServerCertResource_HostName)); 435endpointAddress = new EndpointAddress(new Uri(Endpoints.Tcp_InvalidEkuServerCertResource_Address), new DnsEndpointIdentity(Endpoints.Tcp_InvalidEkuServerCertResource_HostName));
ExpectedExceptionTests.4.1.1.cs (1)
33endpointAddress = new EndpointAddress(new Uri(Endpoints.Tcp_VerifyDNS_Address), new DnsEndpointIdentity(Endpoints.Tcp_VerifyDNS_HostName));
ClientSample (3)
HubSample.cs (2)
30var uri = baseUrl == null ? new Uri("net.tcp://127.0.0.1:9001") : new Uri(baseUrl);
RawSample.cs (1)
39Url = new Uri(baseUrl),
Diagnostics.FunctionalTests (1)
TestFixture.cs (1)
37Client.BaseAddress = new Uri("http://localhost");
dotnet-openapi (1)
Commands\BaseCommand.cs (1)
382var uri = new Uri(url);
dotnet-svcutil-lib (25)
CommandProcessorOptions.cs (1)
739this.Inputs.Insert(idx, new Uri(file));
FrameworkFork\Microsoft.Xml\Xml\XmlResolver.cs (1)
49uri = new Uri(Path.GetFullPath(relativeUri));
FrameworkFork\System.Runtime.Serialization\System\Runtime\Serialization\Globals.cs (1)
1000s_dataContractXsdBaseNamespaceUri = new Uri(DataContractXsdBaseNamespace);
FrameworkFork\System.ServiceModel\System\IdentityModel\Claims\X509CertificateClaimSet.cs (1)
206claims.Add(Claim.CreateUriClaim(new Uri(value)));
FrameworkFork\System.ServiceModel\System\ServiceModel\Channels\Addressing.cs (2)
447return new Uri(toString); 746internal static readonly Uri ReplyRelationshipType = new Uri(Addressing10Strings.ReplyRelationship);
FrameworkFork\System.ServiceModel\System\ServiceModel\Channels\AddressingVersion.cs (2)
52_anonymousUri = new Uri(anonymous); 57_noneUri = new Uri(none);
FrameworkFork\System.ServiceModel\System\ServiceModel\Channels\BinaryMessageEncoder.cs (1)
1430_toHeader = ToHeader.Create(new Uri(toString.Value), _messageVersion.Addressing);
FrameworkFork\System.ServiceModel\System\ServiceModel\Channels\FramingChannels.cs (1)
29: this(factory, settings, s_anonymousEndpointAddress, settings.MessageVersion.Addressing == AddressingVersion.None ? null : new Uri("http://www.w3.org/2005/08/addressing/anonymous"),
FrameworkFork\System.ServiceModel\System\ServiceModel\Channels\FramingDecoders.cs (1)
225_via = new Uri(value);
FrameworkFork\System.ServiceModel\System\ServiceModel\Channels\HttpChannelFactory.cs (1)
1117_httpRequestMessage.Headers.Referrer = new Uri(value);
FrameworkFork\System.ServiceModel\System\ServiceModel\Channels\Message.cs (1)
2045uri = new Uri(uriString);
FrameworkFork\System.ServiceModel\System\ServiceModel\Channels\PrivacyNoticeBindingElementImporter.cs (1)
38settings.Url = new Uri(privacyNoticeAssertion.InnerText);
FrameworkFork\System.ServiceModel\System\ServiceModel\Description\MetadataExchangeClient.cs (1)
587return new Uri(new Uri(baseUri), relativeUri);
FrameworkFork\System.ServiceModel\System\ServiceModel\EndpointAddress.cs (3)
98Uri u = new Uri(uri); 234s_anonymousUri = new Uri(AddressingStrings.AnonymousUri); 244s_noneUri = new Uri(AddressingStrings.NoneUri);
FrameworkFork\System.ServiceModel\System\ServiceModel\Security\WSSecurityPolicy.cs (1)
2831private static readonly Uri s_selfIssuerUri = new Uri(WSIdentityNamespace + "/issuer/self");
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)
GlobalToolTests.cs (1)
189options.Inputs.Add(new Uri(url));
HostedBlazorWebassemblyApp.Client (1)
Program.cs (1)
24builder.Services.AddScoped(sp => new HttpClient { BaseAddress = new Uri(builder.HostEnvironment.BaseAddress) });
HtmlGenerationWebSite (2)
Controllers\HtmlGeneration_HomeController.cs (2)
18HomePage = new Uri("http://www.contoso.com") 82HomePage = new System.Uri("http://www.contoso.com"),
IIS.FunctionalTests (10)
Http3Tests.cs (2)
62var altsvc = $@"h3="":{new Uri(address).Port}"""; 86var altsvc = $@"h3="":{new Uri(address).Port}""";
src\Servers\IIS\IIS\test\Common.FunctionalTests\AspNetCorePortTests.cs (2)
66Assert.Equal(port, new Uri(responseText).Port); 82Assert.InRange(new Uri(responseText).Port, _minPort, _maxPort);
src\Servers\IIS\IIS\test\Common.FunctionalTests\WebSocketTests.cs (6)
69await cws.ConnectAsync(new Uri(webSocketUri + "WebSocketLifetimeEvents"), default); 82await cws.ConnectAsync(new Uri(webSocketUri + "WebSocketReadBeforeUpgrade"), default); 94await cws.ConnectAsync(new Uri(webSocketUri + "WebSocketEcho"), default); 112await cws.ConnectAsync(new Uri(webSocketUri + "WebSocketAllowCompression"), default); 130Uri uri = new Uri(Fixture.DeploymentResult.ApplicationBaseUri + "WebSocketNotUpgradable"); 150Uri uri = new Uri(Fixture.DeploymentResult.ApplicationBaseUri + "WebSocketUpgradeFails");
IIS.LongTests (1)
src\Servers\IIS\IIS\test\Common.LongTests\StartupTests.cs (1)
1378BaseAddress = new Uri(deploymentParameters.ApplicationBaseUriHint),
IIS.NewHandler.FunctionalTests (1)
src\Servers\IIS\IIS\test\Common.LongTests\StartupTests.cs (1)
1378BaseAddress = new Uri(deploymentParameters.ApplicationBaseUriHint),
IIS.NewShim.FunctionalTests (1)
src\Servers\IIS\IIS\test\Common.LongTests\StartupTests.cs (1)
1378BaseAddress = new Uri(deploymentParameters.ApplicationBaseUriHint),
IIS.Tests (1)
Utilities\TestServer.cs (1)
51private Uri BaseUri => new Uri(_protocol + "://localhost:" + _currentPort);
IISExpress.FunctionalTests (9)
src\Servers\IIS\IIS\test\Common.FunctionalTests\AspNetCorePortTests.cs (2)
66Assert.Equal(port, new Uri(responseText).Port); 82Assert.InRange(new Uri(responseText).Port, _minPort, _maxPort);
src\Servers\IIS\IIS\test\Common.FunctionalTests\WebSocketTests.cs (6)
69await cws.ConnectAsync(new Uri(webSocketUri + "WebSocketLifetimeEvents"), default); 82await cws.ConnectAsync(new Uri(webSocketUri + "WebSocketReadBeforeUpgrade"), default); 94await cws.ConnectAsync(new Uri(webSocketUri + "WebSocketEcho"), default); 112await cws.ConnectAsync(new Uri(webSocketUri + "WebSocketAllowCompression"), default); 130Uri uri = new Uri(Fixture.DeploymentResult.ApplicationBaseUri + "WebSocketNotUpgradable"); 150Uri uri = new Uri(Fixture.DeploymentResult.ApplicationBaseUri + "WebSocketUpgradeFails");
src\Servers\IIS\IIS\test\Common.LongTests\StartupTests.cs (1)
1378BaseAddress = new Uri(deploymentParameters.ApplicationBaseUriHint),
InMemory.FunctionalTests (9)
EventSourceTests.cs (1)
190RequestUri = new Uri("https://localhost/"),
Http2\Http2EndToEndTests.cs (1)
67RequestUri = new Uri("http://localhost/"),
KestrelMetricsTests.cs (5)
569RequestUri = new Uri("http://localhost/"), 648RequestUri = new Uri("http://localhost/"), 726RequestUri = new Uri("https://localhost/"), 807RequestUri = new Uri("http://localhost/"), 895RequestUri = new Uri("https://localhost/"),
TestTransport\InMemoryHttpClientSlim.cs (2)
30=> await GetStringAsync(new Uri(requestUri), validateCertificate).ConfigureAwait(false); 69=> await PostAsync(new Uri(requestUri), content, validateCertificate).ConfigureAwait(false);
Interop.FunctionalTests (4)
Http2WebSocketInteropTests.cs (2)
83await wsClient.ConnectAsync(new Uri(url), client, default); 147await wsClient.ConnectAsync(new Uri(url), client, default);
src\Servers\Kestrel\shared\test\TransportTestHelpers\IHostPortExtensions.cs (1)
31.Select(a => new Uri(a));
src\Servers\Kestrel\shared\test\TransportTestHelpers\IWebHostPortExtensions.cs (1)
27.Select(a => new Uri(a));
Keycloak.Web (1)
Program.cs (1)
26client.BaseAddress = new("https+http://apiservice");
Microsoft.AspNetCore.Authentication.Google (1)
GoogleHandler.cs (1)
72var queryStrings = QueryHelpers.ParseQuery(new Uri(base.BuildChallengeUrl(properties, redirectUri)).Query);
Microsoft.AspNetCore.Authentication.Test (5)
CookieTests.cs (3)
368}, SignInAsAlice, baseAddress: new Uri("http://example.com/base")); 390}, SignInAsAlice, baseAddress: new Uri("http://example.com/base")); 1162new Uri("http://example.com/base"));
FacebookTests.cs (1)
341new Uri(customUserInfoEndpoint).GetComponents(UriComponents.SchemeAndServer | UriComponents.Path, UriFormat.UriEscaped))
TwitterTests.cs (1)
480new Uri(verifyCredentialsEndpoint).GetComponents(UriComponents.SchemeAndServer | UriComponents.Path, UriFormat.UriEscaped))
Microsoft.AspNetCore.Components.Endpoints.Tests (3)
Binding\FormDataMapperTests.cs (3)
228{ "http://www.example.com", new Uri("http://www.example.com") }, 229{ "http://www.example.com/path", new Uri("http://www.example.com/path") }, 230{ "http://www.example.com/path/", new Uri("http://www.example.com/path/") },
Microsoft.AspNetCore.Components.WebAssembly.Server (6)
TargetPickerUi.cs (5)
367var underlyingV8Endpoint = new Uri(tabToDebug.WebSocketDebuggerUrl); 368var proxyEndpoint = new Uri(_debugProxyUrl); 369var devToolsUrlAbsolute = new Uri(_browserHost + tabToDebug.DevtoolsFrontendUrl); 377var debuggerPort = new Uri(_browserHost).Port; 403var debuggerPort = new Uri(_browserHost).Port;
WebAssemblyNetDebugProxyAppBuilderExtensions.cs (1)
31browserUrl = new Uri(browserParam);
Microsoft.AspNetCore.Components.WebView (2)
StaticContentProvider.cs (1)
25var fileUri = new Uri(requestUri);
WebViewManager.cs (1)
244=> uri.AbsoluteUri.EndsWith('/') ? uri : new Uri(uri.AbsoluteUri + '/');
Microsoft.AspNetCore.Components.WebView.Maui (4)
Extensions\UriExtensions.cs (1)
16 var uri = new Uri(uriString!);
iOS\BlazorWebViewHandler.iOS.cs (1)
28 internal static Uri AppOriginUri { get; } = new(AppOrigin);
iOS\IOSWebViewManager.cs (1)
225 var uri = new Uri(requestUrl.ToString());
src\BlazorWebView\src\SharedSource\StaticContentHotReloadManager.cs (1)
86 var requestPath = new Uri(requestAbsoluteUri).AbsolutePath.Substring(1);
Microsoft.AspNetCore.Components.WebView.Photino (2)
BlazorWindow.cs (1)
59var appBaseUri = new Uri(new Uri(PhotinoWebViewManager.AppBaseOrigin), _pathBase);
PhotinoWebViewManager.cs (1)
53if (_appBaseUri.IsBaseOf(new Uri(url))
Microsoft.AspNetCore.Components.WebView.Test (2)
Infrastructure\TestWebViewManager.cs (1)
10private static readonly Uri AppBaseUri = new Uri("app://testhost/");
StaticContentProviderTests.cs (1)
24var scp = new StaticContentProvider(inMemoryFileProvider, new Uri(appBase), "fakehost.html");
Microsoft.AspNetCore.Components.WebView.WindowsForms (3)
src\BlazorWebView\src\SharedSource\StaticContentHotReloadManager.cs (1)
86 var requestPath = new Uri(requestAbsoluteUri).AbsolutePath.Substring(1);
src\BlazorWebView\src\SharedSource\WebView2WebViewManager.cs (2)
59 internal static readonly Uri AppOriginUri = new(AppOrigin); 291 _webview.CoreWebView2.WebMessageReceived += (s, e) => MessageReceived(new Uri(e.Source), e.TryGetWebMessageAsString());
Microsoft.AspNetCore.Components.WebView.Wpf (3)
src\BlazorWebView\src\SharedSource\StaticContentHotReloadManager.cs (1)
86 var requestPath = new Uri(requestAbsoluteUri).AbsolutePath.Substring(1);
src\BlazorWebView\src\SharedSource\WebView2WebViewManager.cs (2)
59 internal static readonly Uri AppOriginUri = new(AppOrigin); 291 _webview.CoreWebView2.WebMessageReceived += (s, e) => MessageReceived(new Uri(e.Source), e.TryGetWebMessageAsString());
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)
HeaderPropagationIntegrationTest.cs (1)
209var client = services.AddHttpClient("example.com", c => c.BaseAddress = new Uri("http://example.com"))
HeaderPropagationMessageHandlerTest.cs (1)
29BaseAddress = new Uri("http://example.com")
Microsoft.AspNetCore.Http.Abstractions.Microbenchmarks (3)
PathStringBenchmark.cs (3)
16public IEnumerable<object> TestUris => new[] { new Uri($"https://localhost:5001/{TestPath}"), new Uri($"https://localhost:5001/{LongTestPath}"), new Uri($"https://localhost:5001/{LongTestPathEarlyPercent}") };
Microsoft.AspNetCore.Http.Abstractions.Tests (3)
PathStringTests.cs (3)
331var uri = new Uri($"https://localhost:5001{input}"); 352var uri = new Uri($"https://localhost:5001{input}"); 401var sut = PathString.FromUriComponent(new Uri(localhost + testString));
Microsoft.AspNetCore.Http.Connections.Client (1)
HttpConnection.cs (1)
335uri = new Uri(negotiationResponse.Url);
Microsoft.AspNetCore.Http.Connections.Tests (9)
HttpConnectionDispatcherTests.cs (8)
3257client.BaseAddress = new Uri(url); 3268Url = new Uri(url), 3320client.BaseAddress = new Uri(url); 3330Url = new Uri(url), 3419client.BaseAddress = new Uri(url); 3430Url = new Uri(url), 3471Url = new Uri(url), 3544Url = new Uri(url + "/foo"),
MapConnectionHandlerTests.cs (1)
402await client.ConnectAsync(new Uri(address), CancellationToken.None);
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"]);
RequestDelegateGenerator\RequestDelegateCreationTests.Arrays.cs (2)
132new object[] { "Uri[]", new[] { "https://example.org" }, new[] { new Uri("https://example.org") } }, 146new object[] { "MyTryParseRecord[]", new[] { "https://example.org" },new[] { new MyTryParseRecord(new Uri("https://example.org")) } },
RequestDelegateGenerator\RequestDelegateCreationTests.BindAsync.cs (2)
60Assert.Equal(new Uri("https://example.org"), httpContext.Items["uri"]); 81Assert.Equal(new Uri("https://example.org"), httpContext.Items["uri"]);
RequestDelegateGenerator\RequestDelegateCreationTests.Forms.cs (1)
905Assert.Equal(new Uri("https://example.org"), content.Uri);
RequestDelegateGenerator\RequestDelegateCreationTests.TryParse.cs (3)
39new object[] { "Uri", "https://example.org", new Uri("https://example.org") }, 40new object[] { "Uri?", "https://example.org", new Uri("https://example.org") }, 56new object[] { "MyTryParseRecord", "https://example.org", new MyTryParseRecord(new Uri("https://example.org")) },
Microsoft.AspNetCore.Http.Results.Tests (7)
ResultsTests.cs (3)
630var uri = new Uri("https://example.com/entity"); 646var uri = new Uri("https://example.com/entity"); 662var uri = new Uri("https://example.com/entity");
TypedResultsTests.cs (4)
70var uri = new Uri("https://example.org"); 86var uri = new Uri("https://example.org"); 611var uri = new Uri("https://example.com/entity"); 627var uri = new Uri("https://example.com/entity");
Microsoft.AspNetCore.HttpsPolicy.Tests (9)
HstsMiddlewareTests.cs (8)
64client.BaseAddress = new Uri("https://example.com:5050"); 111client.BaseAddress = new Uri("https://example.com:5050"); 157client.BaseAddress = new Uri("https://example.com:5050"); 202client.BaseAddress = new Uri($"https://{hostUrl}:5050"); 257client.BaseAddress = new Uri($"https://{hostUrl}:5050"); 312client.BaseAddress = new Uri($"https://{hostUrl}:5050"); 359client.BaseAddress = new Uri("http://example.com:5050"); 405client.BaseAddress = new Uri("https://example.com:5050");
HttpsPolicyTests.cs (1)
73client.BaseAddress = new Uri(response.Headers.Location.ToString());
Microsoft.AspNetCore.Identity.FunctionalTests (2)
Infrastructure\ServerFactory.cs (1)
29ClientOptions.BaseAddress = new Uri("https://localhost");
MapIdentityApiTests.cs (1)
37private static Uri BaseAddress { get; } = new Uri("http://example.com");
Microsoft.AspNetCore.InternalTesting (2)
HttpClientSlim.cs (2)
26=> await GetStringAsync(new Uri(requestUri), validateCertificate).ConfigureAwait(false); 69=> await PostAsync(new Uri(requestUri), content, validateCertificate).ConfigureAwait(false);
Microsoft.AspNetCore.InternalTesting.Tests (2)
HttpClientSlimTest.cs (2)
57var requestUri = new Uri("http://[fe80::5d2a:d070:6fd6:1bac%7]:5003/"); 64var requestUri = new Uri("http://[fe80::5d2a:d070:6fd6:1bac%7]:80/");
Microsoft.AspNetCore.JsonPatch.Tests (1)
Internal\DictionaryAdapterTest.cs (1)
280var uriKey = new Uri("http://www.test.com/name");
Microsoft.AspNetCore.Mvc.Core.Test (9)
ControllerBaseTest.cs (2)
1324var uri = new Uri("http://test/url"); 1534var uri = new Uri("http://test/url");
ModelBinding\Validation\DefaultObjectValidatorTests.cs (3)
889new Uri("http://example.com/1"), 890new Uri("http://example.com/2"), 891new Uri("http://example.com/3"),
RequireHttpsAttributeTests.cs (1)
169var uri = new Uri(url);
TypeFilterAttributeTest.cs (3)
16var uri = new Uri("http://www.asp.net"); 38var uri = new Uri("http://www.asp.net"); 63var uri = new Uri("http://www.asp.net");
Microsoft.AspNetCore.Mvc.FunctionalTests (5)
JsonPatchInputFormatterTest.cs (1)
169RequestUri = new Uri("http://localhost/jsonpatch/PatchProduct")
LinkGenerationTests.cs (1)
68TestPlatformHelper.IsMono ? new Uri(expected) : new Uri(expected, UriKind.Relative),
RequestSizeLimitTest.cs (1)
84request.RequestUri = new Uri("http://localhost/RequestSizeLimit/DisableRequestSizeLimit");
RoutingTestsBase.cs (2)
563var expectedUrl = new Uri(url).AbsolutePath; 606var expectedUrl = new Uri(url).AbsolutePath;
Microsoft.AspNetCore.Mvc.NewtonsoftJson.Test (3)
BsonTempDataSerializerTest.cs (3)
78{ new Uri("http://Foo") }, 84{ new Uri[] { new Uri("http://Foo"), new Uri("http://Bar") } },
Microsoft.AspNetCore.Mvc.Testing (2)
WebApplicationFactory.cs (1)
514client.BaseAddress = new Uri("http://localhost");
WebApplicationFactoryClientOptions.cs (1)
38public Uri BaseAddress { get; set; } = new Uri("http://localhost");
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]
Services\OpenApiSchemaService\OpenApiSchemaService.ResponseSchemas.cs (1)
29[() => new Uri("http://example.com"), "application/json", "string", "uri"]
Microsoft.AspNetCore.ResponseCompression.Tests (3)
ResponseCompressionMiddlewareTest.cs (3)
470server.BaseAddress = new Uri("https://localhost/"); 533server.BaseAddress = new Uri("https://localhost/"); 596server.BaseAddress = new Uri("https://localhost/");
Microsoft.AspNetCore.Rewrite.Tests (30)
ApacheModRewrite\ModRewriteMiddlewareTest.cs (2)
431server.BaseAddress = new Uri("http://localhost:5000/foo"); 461server.BaseAddress = new Uri("http://localhost:5000/foo");
IISUrlRewrite\MiddleWareTests.cs (7)
249var response = await server.CreateClient().GetAsync(new Uri("http://example.com")); 289var response = await server.CreateClient().GetStringAsync(new Uri("http://example.com")); 326var response = await server.CreateClient().GetStringAsync(new Uri("http://example.com/")); 363var response = await server.CreateClient().GetAsync(new Uri("http://example.com/")); 397var response = await server.CreateClient().GetStringAsync(new Uri("http://example.com/")); 430server.BaseAddress = new Uri("http://localhost:5000/foo"); 661var response = await server.CreateClient().GetStringAsync(new Uri(requestUri));
MiddlewareTests.cs (21)
169server.BaseAddress = new Uri(baseAddress); 254var response = await server.CreateClient().GetAsync(new Uri("http://example.com")); 281var response = await server.CreateClient().GetAsync(new Uri("http://example.com")); 324server.BaseAddress = new Uri("http://" + baseAddress); 327var response = await server.CreateClient().GetAsync(new Uri("http://" + hostPathAndQuery)); 354server.BaseAddress = new Uri("http://example.com"); 355var response = await server.CreateClient().GetAsync(new Uri(hostSchemePathAndQuery)); 381var response = await server.CreateClient().GetAsync(new Uri("http://example.com")); 408var response = await server.CreateClient().GetAsync(new Uri("http://example.com")); 437var response = await server.CreateClient().GetAsync(new Uri("https://example.com")); 466var response = await server.CreateClient().GetAsync(new Uri(requestUri)); 491var response = await server.CreateClient().GetAsync(new Uri("https://example.com")); 526var response = await server.CreateClient().GetAsync(new Uri(requestUri)); 554var response = await server.CreateClient().GetAsync(new Uri("https://www.example.com")); 583var response = await server.CreateClient().GetAsync(new Uri(requestUri)); 608var response = await server.CreateClient().GetAsync(new Uri("https://www.example.com")); 722server.BaseAddress = new Uri("http://localhost:5000/foo"); 753var response = await server.CreateClient().GetAsync(new Uri(requestUri)); 781var response = await server.CreateClient().GetAsync(new Uri(requestUri)); 806var response = await server.CreateClient().GetAsync(new Uri("https://example.com")); 835var response = await server.CreateClient().GetAsync(new Uri("https://example.com"));
Microsoft.AspNetCore.Routing.FunctionalTests (6)
Benchmarks\EndpointRoutingBenchmarkTest.cs (1)
35_client.BaseAddress = new Uri("http://localhost");
Benchmarks\RouterBenchmarkTest.cs (1)
36_client.BaseAddress = new Uri("http://localhost");
EndpointRoutingSampleTest.cs (1)
27_client.BaseAddress = new Uri("http://localhost");
RouterSampleTest.cs (1)
25_client.BaseAddress = new Uri("http://localhost");
RoutingTestFixture.cs (2)
31Client.BaseAddress = new Uri("http://localhost"); 39client.BaseAddress = new Uri(baseAddress);
Microsoft.AspNetCore.Server.HttpSys.FunctionalTests (26)
Http3Tests.cs (2)
67altsvc = $@"h3="":{new Uri(address).Port}"""; 107altsvc = $@"h3="":{new Uri(address).Port}""";
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);
Listener\RequestTests.cs (1)
174var uri = new Uri(address);
OpaqueUpgradeTests.cs (2)
328Uri uri = new Uri(address); 381Uri uri = new Uri(address);
RequestBodyTests.cs (1)
312Uri uri = new Uri(address);
RequestHeaderTests.cs (2)
57var uri = new Uri(address); 254var uri = new Uri(address);
RequestTests.cs (5)
374var uri = new Uri(root); 530var uri = new Uri(address); 577var uri = new Uri(address); 605var rootUri = new Uri(root); 627var uri = new Uri(address);
ResponseTests.cs (1)
255var uri = new Uri(address);
ServerTests.cs (1)
658Uri uri = new Uri(address);
Microsoft.AspNetCore.Server.IntegrationTesting (5)
Common\DeploymentResult.cs (1)
67BaseAddress = new Uri(ApplicationBaseUri),
Common\TestUriHelper.cs (1)
52var uriHint = new Uri(hint);
Deployers\NginxDeployer.cs (2)
35new Uri("http://localhost:0") : 36new Uri(DeploymentParameters.ApplicationBaseUriHint);
Deployers\SelfHostDeployer.cs (1)
158actualUrl = new Uri(m.Groups["url"].Value);
Microsoft.AspNetCore.Server.IntegrationTesting.IIS (1)
IISExpressDeployer.cs (1)
214url = new Uri(m.Groups["url"].Value);
Microsoft.AspNetCore.Server.Kestrel.Core.Tests (2)
KestrelServerTests.cs (1)
425var customEndpoint = new UriEndPoint(new("http://localhost:5000"));
ListenOptionsTests.cs (1)
71var listenOptions = new ListenOptions(new UriEndPoint(new Uri("http://127.0.0.1:5555")));
Microsoft.AspNetCore.Server.Kestrel.Transport.Quic.Tests (1)
src\Servers\Kestrel\shared\test\TransportTestHelpers\IHostPortExtensions.cs (1)
31.Select(a => new Uri(a));
Microsoft.AspNetCore.SignalR.Client (4)
HubConnectionBuilderHttpExtensions.cs (4)
42hubConnectionBuilder.WithUrlCore(new Uri(url), null, null); 55hubConnectionBuilder.WithUrlCore(new Uri(url), null, configureHttpConnection); 68hubConnectionBuilder.WithUrlCore(new Uri(url), transports, null); 82hubConnectionBuilder.WithUrlCore(new Uri(url), transports, configureHttpConnection);
Microsoft.AspNetCore.SignalR.Client.FunctionalTests (8)
HubConnectionTests.cs (1)
1715cookieJar.Add(new System.Net.Cookie("Foo", "Bar", "/", new Uri(server.Url).Host));
HubConnectionTests.Tracing.cs (6)
128var port = new Uri(server.Url).Port; 300var port = new Uri(server.Url).Port; 429var port = new Uri(server.Url).Port; 526var port = new Uri(server.Url).Port; 621var port = new Uri(server.Url).Port; 720var port = new Uri(server.Url).Port;
HubProtocolVersionTests.cs (1)
118.WithUrl(new Uri(server.Url + "/version"))
Microsoft.AspNetCore.SignalR.Client.Tests (29)
HttpConnectionFactoryTests.cs (4)
40await Assert.ThrowsAnyAsync<Exception>(async () => await factory.ConnectAsync(new UriEndPoint(new Uri("http://example.com")))); 61var url1 = new Uri("http://example.com/1"); 62var url2 = new Uri("http://example.com/2"); 90{ $"{nameof(HttpConnectionOptions.Url)}", new Uri("https://example.com") },
HttpConnectionTests.cs (4)
66var connection = new HttpConnection(new Uri("http://fakeuri.org/")); 87httpOptions.Url = new Uri("http://fakeuri.org/"); 133httpOptions.Url = new Uri("http://fakeuri.org/"); 181Url = new Uri("http://fakeurl.org/"),
HttpConnectionTests.Helpers.cs (2)
37httpOptions.Url = new Uri(url); 51httpConnectionOptions.Url ??= new Uri("http://fakeuri.org/");
HubConnectionBuilderExtensionsTests.cs (3)
29Assert.Equal(new Uri("http://tempuri.org"), value.Url); 49var uri = new Uri("http://tempuri.org"); 65var uri = new Uri("http://tempuri.org");
HubConnectionTests.Tracing.cs (2)
147connection.RemoteEndPoint = new UriEndPoint(new Uri("http://example.net")); 187connection.RemoteEndPoint = new UriEndPoint(new Uri("http://example.net:5050"));
LongPollingTransportTests.cs (1)
28private static readonly Uri TestUri = new Uri("http://example.com/?id=1234");
SendUtilsTests.cs (1)
44await SendUtils.SendMessages(new Uri("http://fakeuri.org"), application, httpClient, logger: Logger).DefaultTimeout();
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();
WebSocketsTransportTests.cs (1)
33new 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);
WebSocketsTransportTests.cs (9)
47await webSocketsTransport.StartAsync(new Uri(server.WebSocketsUrl + "/echo"), 81await webSocketsTransport.StartAsync(new Uri("http://FakeEndpot.com/echo"), TransferFormat.Binary).DefaultTimeout(); 95await webSocketsTransport.StartAsync(new Uri(server.WebSocketsUrl + "/echo"), 109await webSocketsTransport.StartAsync(new Uri(server.WebSocketsUrl + "/httpheader"), 140await webSocketsTransport.StartAsync(new Uri(server.WebSocketsUrl + "/httpheader"), 163await webSocketsTransport.StartAsync(new Uri(server.WebSocketsUrl + "/echo"), 179await webSocketsTransport.StartAsync(new Uri(server.WebSocketsUrl + "/echoAndClose"), transferFormat); 202await webSocketsTransport.StartAsync(new Uri(server.WebSocketsUrl + "/echo"), 220webSocketsTransport.StartAsync(new Uri("http://fakeuri.org"), transferFormat));
Microsoft.AspNetCore.SpaProxy (1)
SpaProxyMiddleware.cs (1)
46if (context.Request.Path.Equals(new Uri(_options.Value.ServerUrl).LocalPath))
Microsoft.AspNetCore.SpaServices.Extensions (3)
AngularCli\AngularCliMiddleware.cs (1)
88var uri = new Uri(openBrowserLine.Groups[1].Value);
Proxying\SpaProxy.cs (1)
72var targetUri = new Uri((baseUriAsString.EndsWith("/", StringComparison.OrdinalIgnoreCase) ? baseUriAsString[..^1] : baseUriAsString)
Proxying\SpaProxyingExtensions.cs (1)
30new Uri(baseUri));
Microsoft.AspNetCore.SpaServices.Extensions.Tests (1)
SpaProxyTests.cs (1)
57var baseUriTask = Task.FromResult(new Uri(baseUrl));
Microsoft.AspNetCore.StaticFiles.FunctionalTests (8)
FallbackStaticFileTest.cs (2)
57using (var client = new HttpClient { BaseAddress = new Uri(Helpers.GetAddress(host)) }) 106using (var client = new HttpClient { BaseAddress = new Uri(Helpers.GetAddress(host)) })
StaticFileMiddlewareTests.cs (6)
36using (var client = new HttpClient { BaseAddress = new Uri(Helpers.GetAddress(host)) }) 81using (var client = new HttpClient { BaseAddress = new Uri(Helpers.GetAddress(host)) }) 106using (var client = new HttpClient { BaseAddress = new Uri(Helpers.GetAddress(host)) }) 156using (var client = new HttpClient { BaseAddress = new Uri(Helpers.GetAddress(host)) }) 198using (var client = new HttpClient { BaseAddress = new Uri(Helpers.GetAddress(host)) }) 295var uri = new Uri(address);
Microsoft.AspNetCore.TestHost (2)
TestServer.cs (1)
107public Uri BaseAddress { get; set; } = new Uri("http://localhost/");
TestServerOptions.cs (1)
26public Uri BaseAddress { get; set; } = new Uri("http://localhost/");
Microsoft.AspNetCore.TestHost.Tests (11)
HttpContextBuilderTests.cs (2)
22server.BaseAddress = new Uri("https://example.com/A/Path/"); 53server.BaseAddress = new Uri("https://example.com/");
TestClientTests.cs (5)
615var clientSocket = await client.ConnectAsync(new System.Uri("http://localhost"), CancellationToken.None); 682var clientSocket = await client.ConnectAsync(new Uri("wss://localhost"), CancellationToken.None); 734await Assert.ThrowsAnyAsync<OperationCanceledException>(async () => await client.ConnectAsync(new Uri("http://localhost"), tokenSource.Token)); 774var clientSocket = await client.ConnectAsync(new System.Uri("http://localhost"), CancellationToken.None); 807var clientSocket = await client.ConnectAsync(new System.Uri("http://localhost"), CancellationToken.None);
TestServerTests.cs (1)
365var baseAddress = new Uri("http://localhost/test");
WebSocketClientTests.cs (3)
42uri: new Uri(requestUri), 82uri: new Uri("http://localhost/connect"), 118uri: new Uri("http://localhost/connect"),
Microsoft.AspNetCore.Testing (1)
ServiceFakesHostExtensions.cs (1)
79.Select(x => new Uri(x.Replace("[::]", "localhost", StringComparison.OrdinalIgnoreCase)));
Microsoft.AspNetCore.WebSockets.Tests (29)
IHostPortExtensions.cs (1)
27.Select(a => new Uri(a));
WebSocketCompressionMiddlewareTests.cs (4)
30var uri = new UriBuilder(new Uri($"ws://127.0.0.1:{port}/")); 58var uri = new UriBuilder(new Uri($"ws://127.0.0.1:{port}/")); 92var uri = new UriBuilder(new Uri($"ws://127.0.0.1:{port}/")); 142await client.ConnectAsync(new Uri($"ws://127.0.0.1:{port}/"), CancellationToken.None);
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)
BuildEventFileInfo.cs (1)
88_file = (e.SourceUri.Length == 0) ? String.Empty : new Uri(e.SourceUri).LocalPath;
Microsoft.Build.Tasks.Core (6)
BootstrapperUtil\Util.cs (1)
49var uri = new Uri(path);
GetSDKReferenceFiles.cs (1)
1098var codeBase = new Uri(currentAssembly);
ManifestUtil\PathUtil.cs (3)
27Uri uri = new Uri(url); 48Uri u = new Uri(resolvedPath); 220var u = new Uri(path);
SignFile.cs (1)
55TimestampUrl == null ? null : new Uri(TimestampUrl),
Microsoft.Build.Tasks.UnitTests (4)
FormatUrl_Tests.cs (3)
78t.OutputUrl.ShouldBe(new Uri(Path.Combine(Environment.CurrentDirectory, t.InputUrl)).AbsoluteUri); 120t.OutputUrl.ShouldBe(new Uri(t.InputUrl).AbsoluteUri); 135t.OutputUrl.ShouldBe(new Uri(Environment.CurrentDirectory).AbsoluteUri);
SecurityUtil_Tests.cs (1)
30Uri timestampUrl = new("http://timestamp.comodoca.com/rfc3161");
Microsoft.CodeAnalysis (1)
CommandLine\SarifErrorLogger.cs (1)
123private static readonly Uri s_fileRoot = new Uri("file:///");
Microsoft.CodeAnalysis.CSharp.Emit3.UnitTests (1)
Semantics\PatternMatchingTests.cs (1)
526Uri u = new Uri("http://www.microsoft.com");
Microsoft.CodeAnalysis.CSharp.Syntax.UnitTests (1)
LexicalAndXml\XmlDocCommentTests.cs (1)
3017SyntaxFactory.XmlSeeAlsoElement(new Uri("https://dotnet.microsoft.com/"),
Microsoft.CodeAnalysis.LanguageServer.Protocol (1)
Protocol\Converters\DocumentUriConverter.cs (1)
17=> new(reader.GetString());
Microsoft.CodeAnalysis.LanguageServer.Protocol.UnitTests (3)
Miscellaneous\LspMiscellaneousFilesWorkspaceTests.cs (2)
233var looseFileUri = new Uri("untitled:untitledFile"); 266var looseFileUri = new Uri("untitled:untitledFile");
UriTests.cs (1)
142var gitDocumentUri = new Uri(fileDocumentUri.ToString().Replace("file", "git"));
Microsoft.CodeAnalysis.Workspaces (1)
Storage\SQLite\v2\Interop\SqlConnection.cs (1)
137? $"attach database '{new Uri(databasePath.Replace("'", "''")).AbsoluteUri}?mode=memory&cache=shared' as {Database.WriteCache.GetName()};"
Microsoft.Data.Analysis.Tests (1)
test\Microsoft.ML.TestFramework\BaseTestClass.cs (1)
51string path = new Uri(codeBaseUri).AbsolutePath;
Microsoft.DotNet.Build.Tasks.Feed (5)
src\BlobUrlInfo.cs (2)
31: this(new Uri(url)) 81Uri = new Uri($"https://{accountName}.{endpoint}/{containerName}/{blobPath}");
src\common\AzureStorageUtils.cs (2)
67Uri endpoint = new($"https://{AccountName}.blob.core.windows.net"); 74Uri endpoint = new($"https://{accountName}.blob.core.windows.net");
src\CreateAzureDevOpsFeed.cs (1)
134BaseAddress = new Uri(azureDevOpsFeedsBaseUrl)
Microsoft.DotNet.Git.IssueManager (2)
Clients\AzureDevOpsClient.cs (1)
54BaseAddress = new Uri($"https://dev.azure.com/{accountName}/{projectName}/")
Clients\GitHubClient.cs (1)
100Uri uri = new Uri(repositoryUri);
Microsoft.DotNet.Helix.Client (4)
ApiFactory.cs (2)
46return new HelixApi(new HelixApiOptions(new Uri(baseUri), new HelixApiTokenCredential(accessToken))); 59return new HelixApi(new HelixApiOptions(new Uri(baseUri)));
generated-code\HelixApi.cs (2)
49: this(new Uri("https://helix.dot.net/")) 59: this(new Uri("https://helix.dot.net/"), credentials)
Microsoft.DotNet.Helix.JobSender (1)
StorageHelpers\ApiBlobHelper.cs (1)
26Uri containerUri = new Uri($"https://{info.StorageAccountName}.blob.core.windows.net/{info.ContainerName}");
Microsoft.DotNet.Helix.JobSender.Tests (1)
Payloads\ArchivePayloadTests.cs (1)
23.Returns(Task.FromResult(new Uri("http://microsoft.com/blob")));
Microsoft.DotNet.Helix.Sdk (6)
DownloadFromResultsContainer.cs (2)
114blob = new BlobClient(new Uri(fileAvailableForDownload.Link), blobClientOptions); 118var strippedFileUri = new Uri(fileAvailableForDownload.Link.Substring(0, fileAvailableForDownload.Link.LastIndexOf('?')));
ProvisioningProfileProvider.cs (1)
193var uri = new Uri(GetProvisioningProfileUrl(platform));
SendHelixJob.cs (3)
374wi = wiWithPayload.WithPayloadUri(new Uri(payloadUri)); 518return def.WithCorrelationPayloadUris(new Dictionary<Uri, string>() { { new Uri(uri), destination } }); 522return def.WithCorrelationPayloadUris(new Uri(uri));
Microsoft.Extensions.Http.Diagnostics.PerformanceTests (2)
NoRemoteCallHandler.cs (1)
24var uri = new Uri(assemblyFileLocation).LocalPath;
NoRemoteCallNotSeekableHandler.cs (1)
27var uri = new Uri(assemblyFileLocation).LocalPath;
Microsoft.Extensions.Http.Diagnostics.Tests (28)
Latency\Internal\HttpLatencyTelemetryHandlerTest.cs (1)
60RequestUri = new($"http://default-uri.com/foo")
Logging\AcceptanceTests.cs (4)
25private static readonly Uri _unreachableRequestUri = new("https://we.wont.hit.this.domain.anyway"); 311RequestUri = new Uri(RequestPath), 358RequestUri = new Uri(RequestPath) 423RequestUri = new Uri(RequestPath),
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"),
Logging\HttpRequestReaderTest.cs (7)
83RequestUri = new Uri("http://default-uri.com/foo"), 209RequestUri = new Uri("http://default-uri.com/foo/bar/123"), 284RequestUri = new Uri($"http://{RequestedHost}/foo/bar/123"), 356RequestUri = new Uri("http://default-uri.com/foo/bar/123"), 414RequestUri = new Uri("http://default-uri.com/foo/bar/123"), 485RequestUri = new Uri("http://default-uri.com/foo/bar/123"), 552RequestUri = new Uri("http://default-uri.com/foo/bar/123"),
Logging\Internal\NoRemoteCallHandler.cs (1)
20var uri = new Uri(assemblyFileLocation).LocalPath;
Telemetry\DownstreamDependencyMetadataManagerTests.cs (2)
51RequestUri = new Uri(uriString: urlString) 71RequestUri = new Uri(uriString: urlString)
Microsoft.Extensions.Http.Polly.Tests (8)
DependencyInjection\PollyHttpClientBuilderExtensionsTest.cs (8)
46serviceCollection.AddHttpClient("example.com", c => c.BaseAddress = new Uri("http://example.com")) 81serviceCollection.AddHttpClient("example.com", c => c.BaseAddress = new Uri("http://example.com")) 119serviceCollection.AddHttpClient("example.com", c => c.BaseAddress = new Uri("http://example.com")) 160serviceCollection.AddHttpClient("example.com", c => c.BaseAddress = new Uri("http://example.com")) 199serviceCollection.AddHttpClient("example.com", c => c.BaseAddress = new Uri("http://example.com")) 257serviceCollection.AddHttpClient("example.com", c => c.BaseAddress = new Uri("http://example.com")) 302serviceCollection.AddHttpClient("example.com", c => c.BaseAddress = new Uri("http://example.com")) 416serviceCollection.AddHttpClient("example.com", c => c.BaseAddress = new Uri("http://example.com"))
Microsoft.Extensions.Http.Resilience.PerformanceTests (8)
HedgingBenchmark.cs (1)
15private static readonly Uri _uri = new(HttpClientFactory.PrimaryEndpoint);
HttpClientFactory.cs (4)
90Uri = new Uri(PrimaryEndpoint) 94Uri = new Uri(SecondaryEndpoint) 113Uri = new Uri(PrimaryEndpoint) 117Uri = new Uri(SecondaryEndpoint)
HttpResilienceBenchmark.cs (1)
15private static readonly Uri _uri = new(HttpClientFactory.PrimaryEndpoint);
RetryBenchmark.cs (1)
19private static readonly Uri _uri = new(HttpClientFactory.PrimaryEndpoint);
StandardResilienceBenchmark.cs (1)
19private static readonly Uri _uri = new(HttpClientFactory.PrimaryEndpoint);
Microsoft.Extensions.Http.Resilience.Tests (17)
Hedging\HedgingTests.cs (1)
371uri = new Uri(string.Format(CultureInfo.InvariantCulture, pattern, attemptCount));
Hedging\StandardHedgingTests.cs (2)
317Endpoints = [new WeightedUriEndpoint { Uri = new Uri($"https://{FailingEndpoint}:3000") }] 322Endpoints = [new WeightedUriEndpoint { Uri = new Uri("https://microsoft.com") }]
Resilience\RequestMessageSnapshotTests.cs (2)
23RequestUri = new Uri("https://dummy-uri.com?query=param"), 57RequestUri = new Uri("https://dummy-uri.com?query=param"),
Resilience\UriExtensionsTests.cs (6)
25var fallbackUri = new Uri("https://fallback-uri.com"); 26var initialUri = new Uri(initialUriString); 28initialUri.ReplaceHost(fallbackUri).Should().Be(new Uri(expectedUriString)); 40var initialUri = new Uri(initialUriString); 44initialUri.ReplaceHost(new Uri(replacementUri)).Should().BeSameAs(initialUri); 48initialUri.ReplaceHost(new Uri(replacementUri)).Should().NotBeSameAs(initialUri);
Routing\EndpointTests.cs (2)
17Uri = new Uri("https://localhost:5001") 20endpoint.Uri.Should().Be(new Uri("https://localhost:5001"));
Routing\OrderedRoutingStrategyTest.cs (3)
62CreateGroup(new WeightedUriEndpoint { Uri = new Uri("https://b/"), Weight = 20 }), 70options.Groups.Add(CreateGroup(new WeightedUriEndpoint { Uri = new Uri("https://c/"), Weight = 30 })); 109return CreateGroup(endpoints.Select(v => new WeightedUriEndpoint { Uri = new Uri(v) }).ToArray());
Routing\WeightedRoutingStrategyTest.cs (1)
169return CreateGroup(endpoints.Select(v => new WeightedUriEndpoint { Uri = new Uri(v) }).ToArray());
Microsoft.Extensions.ML (4)
Builder\BuilderExtensions.cs (4)
28return builder.FromUri(string.Empty, new Uri(uri)); 49return builder.FromUri(modelName, new Uri(uri)); 87return builder.FromUri(string.Empty, new Uri(uri), period); 111return builder.FromUri(modelName, new Uri(uri), period);
Microsoft.Extensions.ML.Tests (2)
UriLoaderTests.cs (2)
48loaderUnderTest.Start(new Uri("https://microsoft.com"), TimeSpan.FromMilliseconds(1)); 70loaderUnderTest.Start(new Uri("https://microsoft.com"), TimeSpan.FromMilliseconds(1));
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);
PassThroughServiceEndpointResolverTests.cs (1)
72Assert.Equal(new UriEndPoint(new Uri("http://localhost:8080")), initialResult.EndpointSource.Endpoints[0].EndPoint);
ServiceEndpointResolverTests.cs (1)
60serviceCollection.AddHttpClient("foo", c => c.BaseAddress = new("http://foo")).AddServiceDiscovery();
ServiceEndpointTests.cs (2)
15new UriEndPoint(new Uri("https://microsoft.com")) 22new UriEndPoint(new Uri("https://microsoft.com:8443"))
Microsoft.Extensions.ServiceDiscovery.Yarp (3)
ServiceDiscoveryDestinationResolver.cs (3)
57var originalUri = new Uri(originalConfig.Address); 63var healthUri = originalConfig.Health is { Length: > 0 } health ? new Uri(health) : null; 72uri = new Uri($"{scheme}://{addressString}");
Microsoft.Gen.Logging.Generated.Tests (1)
LogPropertiesTests.cs (1)
95P5 = new Uri("https://www.microsoft.com"),
Microsoft.Maui (6)
Handlers\HybridWebView\HybridWebViewHandler.cs (1)
63 internal static readonly Uri AppOriginUri = new(AppOrigin);
Handlers\HybridWebView\HybridWebViewHandler.iOS.cs (2)
176 if (new Uri(url) is Uri uri && AppOriginUri.IsBaseOf(uri)) 185 var fullUri = new Uri(fullUrl!);
Handlers\HybridWebView\HybridWebViewQueryStringHelper.cs (1)
35 var query = new Uri(url).Query;
Handlers\WebView\WebViewHandler.iOS.cs (1)
148 var uri = new Uri(url);
Platform\iOS\MauiWKWebView.cs (1)
108 var uri = new Uri(url ?? string.Empty);
Microsoft.Maui.Controls (2)
Shell\ShellUriHandler.cs (2)
160 return new Uri(uri); 794 return new Uri($"{Shell.RouteScheme}://{uri}");
Microsoft.Maui.Controls.Compatibility (2)
iOS\FormsApplicationDelegate.cs (1)
177 _application.SendOnAppLinkRequestReceived(new Uri(strLink));
iOS\Renderers\WkWebViewRenderer.cs (1)
179 var uri = new Uri(url);
Microsoft.Maui.Essentials (7)
Browser\Browser.shared.cs (3)
96 browser.OpenAsync(new Uri(uri), new BrowserLaunchOptions()); 106 browser.OpenAsync(new Uri(uri), new BrowserLaunchOptions { LaunchMode = launchMode }); 116 browser.OpenAsync(new Uri(uri), options);
Launcher\Launcher.shared.cs (3)
187 launcher.CanOpenAsync(new Uri(uri)); 197 launcher.OpenAsync(new Uri(uri)); 207 launcher.TryOpenAsync(new Uri(uri));
Types\Shared\WebUtils.shared.cs (1)
87 return new Uri(uri.Scheme + "://" + idn.GetAscii(uri.Authority) + uri.PathAndQuery + uri.Fragment);
Microsoft.ML.AutoML.Tests (1)
DatasetUtil.cs (1)
199destFileName = Path.GetFileName(new Uri(url).AbsolutePath); ;
Microsoft.ML.Core (1)
Utilities\ResourceManagerUtils.cs (1)
160var t = Task.Run(() => DownloadResource(env, ch, client, new Uri(url), filePath, fileName, downloadCancel.Token));
Microsoft.ML.IntegrationTests (1)
IntegrationTestBaseClass.cs (1)
43string path = new Uri(codeBaseUri).AbsolutePath;
Microsoft.ML.Parquet (3)
PartitionedPathUtils.cs (3)
26Uri baseUri = new Uri(basepath); 27Uri uri = new Uri(path); 39baseUri = new Uri(baseUri.AbsoluteUri + "/");
Microsoft.ML.Samples (5)
Dynamic\TensorFlow\ImageClassification.cs (1)
125var response = await client.GetStreamAsync(new Uri($"{baseGitPath}")).ConfigureAwait(false);
Dynamic\Trainers\MulticlassClassification\ImageClassification\ImageClassificationDefault.cs (1)
274var response = await client.GetStreamAsync(new Uri($"{url}")).ConfigureAwait(false);
Dynamic\Trainers\MulticlassClassification\ImageClassification\LearningRateSchedulingCifarResnetTransferLearning.cs (1)
306var response = await client.GetStreamAsync(new Uri($"{url}")).ConfigureAwait(false);
Dynamic\Trainers\MulticlassClassification\ImageClassification\ResnetV2101TransferLearningEarlyStopping.cs (1)
262var response = await client.GetStreamAsync(new Uri($"{url}")).ConfigureAwait(false);
Dynamic\Trainers\MulticlassClassification\ImageClassification\ResnetV2101TransferLearningTrainTestSplit.cs (1)
283var response = await client.GetStreamAsync(new Uri($"{url}")).ConfigureAwait(false);
Microsoft.ML.Samples.GPU (5)
docs\samples\Microsoft.ML.Samples\Dynamic\TensorFlow\ImageClassification.cs (1)
125var response = await client.GetStreamAsync(new Uri($"{baseGitPath}")).ConfigureAwait(false);
docs\samples\Microsoft.ML.Samples\Dynamic\Trainers\MulticlassClassification\ImageClassification\ImageClassificationDefault.cs (1)
274var response = await client.GetStreamAsync(new Uri($"{url}")).ConfigureAwait(false);
docs\samples\Microsoft.ML.Samples\Dynamic\Trainers\MulticlassClassification\ImageClassification\LearningRateSchedulingCifarResnetTransferLearning.cs (1)
306var response = await client.GetStreamAsync(new Uri($"{url}")).ConfigureAwait(false);
docs\samples\Microsoft.ML.Samples\Dynamic\Trainers\MulticlassClassification\ImageClassification\ResnetV2101TransferLearningEarlyStopping.cs (1)
262var response = await client.GetStreamAsync(new Uri($"{url}")).ConfigureAwait(false);
docs\samples\Microsoft.ML.Samples\Dynamic\Trainers\MulticlassClassification\ImageClassification\ResnetV2101TransferLearningTrainTestSplit.cs (1)
283var response = await client.GetStreamAsync(new Uri($"{url}")).ConfigureAwait(false);
Microsoft.ML.SamplesUtils (1)
SamplesDatasetUtils.cs (1)
198var response = await client.GetStreamAsync(new Uri($"{baseGitPath}")).ConfigureAwait(false);
Microsoft.VisualBasic.Tests (1)
Microsoft\VisualBasic\Devices\NetworkTests.cs (1)
45network.Ping(new Uri("http://127.0.0.1")).Should().BeTrue();
Microsoft.VisualStudio.LanguageServices (1)
Implementation\VirtualMemoryNotificationListener.cs (1)
168() => VisualStudioNavigateToLinkService.StartBrowser(new Uri(LowVMMoreInfoLink)), closeAfterAction: false));
Microsoft.VisualStudio.LanguageServices.LiveShare (2)
ProjectsHandler.cs (2)
31var uri = new Uri(sourceFile.FilePath); 46SourceFiles = project.Documents.Select(d => requestContext.ProtocolConverter.ToProtocolUri(new Uri(d.FilePath))).ToArray(),
Microsoft.VisualStudio.LanguageServices.Xaml (2)
Implementation\LanguageServer\Handler\Definitions\GoToDefinitionHandler.cs (2)
135Uri = new Uri(sourceDefinition.FilePath), 147Uri = new Uri(sourceDefinition.FilePath),
MSBuild (3)
ProjectSchemaValidationHandler.cs (3)
136(e.SourceUri.Length == 0) ? String.Empty : new Uri(e.SourceUri).LocalPath, 149(e.SourceUri.Length == 0) ? String.Empty : new Uri(e.SourceUri).LocalPath, 261filePath = (new Uri(args.Exception.SourceUri)).LocalPath;
MyFrontend (3)
Components\NavigationManagerExtensions.cs (1)
13return new Uri(uri).PathAndQuery;
Program.cs (2)
11builder.Services.AddHttpClient<CatalogServiceClient>(c => c.BaseAddress = new("https+http://catalogservice")); 16.AddGrpcClient<Basket.BasketClient>(o => o.Address = new($"{(isHttps ? "https" : "http")}://basketservice"));
Negotiate.Client (2)
Controllers\AuthTestController.cs (2)
333BaseAddress = new Uri(remote), 347BaseAddress = new Uri(remote)
PresentationBuildTasks (2)
src\Microsoft.DotNet.Wpf\src\PresentationFramework\System\Windows\Markup\ParserContext.cs (1)
463Uri sameUri = new Uri(serializedSafe);
src\Microsoft.DotNet.Wpf\src\Shared\MS\Internal\ResourceIDHelper.cs (1)
25Uri baseUri = new Uri("http://foo/");
PresentationCore (19)
MS\Internal\AppModel\SiteOfOriginContainer.cs (1)
43Uri siteOfOrigin = BaseUriHelper.FixFileUri(new Uri(System.AppDomain.CurrentDomain.BaseDirectory));
MS\Internal\FontCache\DWriteFactory.cs (1)
84return DWriteFactory.Instance.GetFontCollection(new Uri(localPath));
MS\Internal\FontCache\FamilyCollection.cs (1)
115Uri criticalSxSFontsLocation = new Uri(FamilyCollection.SxSFontsResourcePrefix);
MS\Internal\FontCache\FontCacheUtil.cs (5)
503fontSourceUri = new Uri(fontUri.GetComponents(Util.UriWithoutFragment, UriFormat.SafeUnescaped)); 516return new Uri(fontUri); 520string canonicalPathUri = new Uri(fontUri).GetComponents(UriComponents.AbsoluteUri, UriFormat.SafeUnescaped); 522return new Uri(canonicalPathUri + '#' + faceIndexString); 849throw new FileFormatException(new Uri(fileName));
MS\Internal\FontCache\FontSource.cs (1)
28return new FontSource(new Uri(uriString));
MS\Internal\FontCache\FontSourceCollection.cs (1)
24return new FontSourceCollection(new Uri(uriString));
MS\Internal\WpfWebRequestHelper.cs (1)
68uri = new Uri(uri.GetLeftPart(UriPartial.Path));
src\Microsoft.DotNet.Wpf\src\Shared\MS\Internal\MimeTypeMapper.cs (1)
29uri = new Uri("http://foo/bar/");
src\Microsoft.DotNet.Wpf\src\Shared\MS\Internal\SecurityHelper.cs (1)
72appBase = new Uri(domain.BaseDirectory);
System\Windows\Media\ColorContext.cs (1)
572profilePath = new Uri(Path.Combine(buffer.ToString(), profilePathString));
System\Windows\Media\GlyphTypeface.cs (1)
97Uri typefaceSource = new Uri(uriPath);
System\Windows\Navigation\BaseUriHelper.cs (4)
34private static readonly Uri _siteOfOriginBaseUri = PackUriHelper.Create(new Uri(SOOBASE)); 36private static readonly Uri _packAppBaseUri = PackUriHelper.Create(new Uri(APPBASE)); 360return (new Uri(sUri.GetComponents(UriComponents.SchemeAndServer, UriFormat.UriEscaped))).MakeRelativeUri(sUri); 393return new Uri(uri.AbsoluteUri);
PresentationFramework (18)
MS\Internal\Controls\WebBrowserEvent.cs (3)
64Uri source = String.IsNullOrEmpty(urlString) ? null : new Uri(urlString); 207Uri source = string.IsNullOrEmpty(urlString) ? null : new Uri(urlString); 235Uri source = string.IsNullOrEmpty(urlString) ? null : new Uri(urlString);
MS\Internal\Utility\BindUriHelper.cs (1)
30static private Uri placeboBase = new Uri(PLACEBOURI);
System\Windows\Annotations\Storage\XmlStreamStore.cs (3)
49_predefinedNamespaces.Add(new Uri(AnnotationXmlConstants.Namespaces.CoreSchemaNamespace), null); 50_predefinedNamespaces.Add(new Uri(AnnotationXmlConstants.Namespaces.BaseSchemaNamespace), null); 51_predefinedNamespaces.Add(new Uri(XamlReaderHelper.DefaultNamespaceURI), null);
System\Windows\Controls\WebBrowser.cs (3)
145Uri uri = new Uri(source); 379return (string.IsNullOrEmpty(urlString) ? null : new Uri(urlString)); 863source = new Uri(AboutBlankUriString);
System\Windows\Documents\FixedPage.cs (1)
628workuri = new Uri(new Uri("http://microsoft.com/"), inputUri);
System\Windows\Documents\Serialization\SerializerDescriptor.cs (1)
162sd._manufacturerWebsite = new Uri(GetNonEmptyRegistryString(key, "manufacturerWebsite"));
System\Windows\Documents\Speller.cs (2)
1542fileUri = new Uri(new Uri($"{Directory.GetCurrentDirectory()}/"), uri); 1618return new Uri(tmpFilePath);
System\Windows\Markup\ParserContext.cs (2)
133BaseUri = new Uri( xmlReader.BaseURI ); 463Uri sameUri = new Uri(serializedSafe);
System\Windows\Markup\XamlReader.cs (2)
337parserContext.BaseUri = new Uri(reader.BaseURI); 878parserContext.BaseUri = new Uri(reader.BaseURI);
PresentationUI (6)
MS\Internal\Documents\Application\AddressUtility.cs (1)
68return new Uri(string.Format(
MS\Internal\Documents\Application\DocumentStream.cs (1)
841return new Uri(temp);
MS\Internal\Documents\Application\FilePresentation.cs (1)
93Uri file = new Uri(filePath);
MS\Internal\Documents\RightsManagementManager.cs (1)
655NavigationHelper.NavigateToExternalUri(new Uri(rmClientInstallLocation));
MS\Internal\Documents\RMPublishingDialog.cs (2)
349newUri = new Uri(path); 392templateList.Add(new Uri(file.FullName));
ReachFramework (5)
Packaging\XpsDocument.cs (1)
168Uri = new Uri( new Uri(Directory.GetCurrentDirectory()+"/"), this.Uri );
Packaging\XpsManager.cs (2)
119_uri = new Uri( new Uri(Directory.GetCurrentDirectory()+"/"), path ); 1508Uri dummyAbsoluteUri = new Uri("http://dummy");
Serialization\ImageSourceTypeConverter.cs (1)
230Uri sourceUri = new Uri(decoder.ToString());
SerializerFactory\XpsSerializerFactory.cs (1)
68return new Uri(SR.XpsSerializerFactory_ManufacturerWebsite);
RunTests (1)
TestHistoryManager.cs (1)
55var connection = new VssConnection(new Uri(projectUri), credentials);
Security.TransportSecurity.IntegrationTests (33)
Https\HttpsTests.4.1.0.cs (5)
242endpointAddress = new EndpointAddress(new Uri(Endpoints.Https_DefaultBinding_Address_Text)); 290endpointAddress = new EndpointAddress(new Uri(Endpoints.Https_DefaultBinding_Address_Text), identity); 331endpointAddress = new EndpointAddress(new Uri(Endpoints.Https_DefaultBinding_Address_Text), identity); 371endpointAddress = new EndpointAddress(new Uri(Endpoints.Https_ClientCertificateAuth_Address)); 420endpointAddress = new EndpointAddress(new Uri(Endpoints.Https_ClientCertificateAuth_Address));
Https\HttpsTests.4.1.1.cs (4)
39new Uri(Endpoints.Https_SecModeTrans_ClientCredTypeNone_ServerCertValModePeerTrust_Address)); 89endpointAddress = new EndpointAddress(new Uri( 148new Uri(Endpoints.Https_SecModeTrans_ClientCredTypeNone_ServerCertValModeChainTrust_Address)); 193endpointAddress = new EndpointAddress(new Uri(Endpoints.Https_SecModeTrans_ClientCredTypeNone_ServerCertValModeChainTrust_Address));
Negotiate\NegotiateStream_Http_Tests.4.1.0.cs (5)
185new EndpointAddress(new Uri(Endpoints.Https_WindowsAuth_Address), new SpnEndpointIdentity(spn))); 235new Uri(Endpoints.Https_WindowsAuth_Address), 279new Uri(Endpoints.Https_WindowsAuth_Address), 331new Uri(Endpoints.Https_WindowsAuth_Address), 381new Uri(Endpoints.Https_WindowsAuth_Address),
Negotiate\NegotiateStream_Tcp_Tests.4.1.0.cs (4)
163new Uri(Endpoints.Tcp_DefaultBinding_Address), 204new Uri(Endpoints.Tcp_DefaultBinding_Address), 255new Uri(Endpoints.Tcp_DefaultBinding_Address), 302new Uri(Endpoints.Tcp_DefaultBinding_Address),
Tcp\ClientCredentialTypeCertificateCanonicalNameTests.4.1.0.cs (4)
32var localhostEndpointUri = new Uri(Endpoints.Tcp_ClientCredentialType_Certificate_With_CanonicalName_Localhost_Address); 103var domainNameEndpointUri = new Uri(Endpoints.Tcp_ClientCredentialType_Certificate_With_CanonicalName_DomainName_Address); 181var domainNameEndpointUri = new Uri(Endpoints.Tcp_ClientCredentialType_Certificate_With_CanonicalName_DomainName_Address); 185var fqdnEndpointUri = new Uri(Endpoints.Tcp_ClientCredentialType_Certificate_With_CanonicalName_Fqdn_Address);
Tcp\ClientCredentialTypeTests.4.1.0.cs (3)
33endpointAddress = new EndpointAddress(new Uri(Endpoints.Tcp_ClientCredentialType_Certificate_Address), 82endpointAddress = new EndpointAddress(new Uri(Endpoints.Tcp_ClientCredentialType_Certificate_CustomValidation_Address), 134endpointAddress = new EndpointAddress(new Uri(Endpoints.Tcp_ClientCredentialType_Certificate_With_ServerAltName_Address));
Tcp\ClientCredentialTypeTests.4.1.1.cs (5)
40new Uri(Endpoints.NetTcp_SecModeTrans_ClientCredTypeNone_ServerCertValModePeerTrust_Address)); 89endpointAddress = new EndpointAddress(new Uri( 146endpointAddress = new EndpointAddress(new Uri( 192endpointAddress = new EndpointAddress(new Uri( 240endpointAddress = new EndpointAddress(new Uri(
Tcp\ClientCredentialTypeTests.OSX.cs (1)
66new Uri(Endpoints.NetTcp_SecModeTrans_ClientCredTypeNone_ServerCertValModePeerTrust_Address));
Tcp\IdentityTests.4.1.0.cs (1)
29EndpointAddress endpointAddress = new EndpointAddress(new Uri(Endpoints.Tcp_VerifyDNS_Address), new DnsEndpointIdentity(Endpoints.Tcp_VerifyDNS_HostName));
Tcp\IdentityTests.4.1.1.cs (1)
29EndpointAddress endpointAddress = new EndpointAddress(new Uri(Endpoints.Tcp_VerifyDNS_Address), new DnsEndpointIdentity("wrongone"));
Sockets.BindTests (11)
SocketTransportFactoryTests.cs (1)
21await Assert.ThrowsAsync<NotImplementedException>(async () => await socketTransportFactory.BindAsync(new UriEndPoint(new Uri("http://127.0.0.1:5554"))));
src\Servers\Kestrel\shared\test\TransportTestHelpers\IHostPortExtensions.cs (1)
31.Select(a => new Uri(a));
src\Servers\Kestrel\shared\test\TransportTestHelpers\IWebHostPortExtensions.cs (1)
27.Select(a => new Uri(a));
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)
src\Servers\Kestrel\shared\test\TransportTestHelpers\IHostPortExtensions.cs (1)
31.Select(a => new Uri(a));
src\Servers\Kestrel\shared\test\TransportTestHelpers\IWebHostPortExtensions.cs (1)
27.Select(a => new Uri(a));
System.ComponentModel.TypeConverter (1)
System\ComponentModel\Design\DesigntimeLicenseContext.cs (1)
54Uri uri = new Uri(fileName);
System.Data.Common (3)
System\Data\Common\ObjectStorage.cs (1)
337return (new Uri(s));
System\Data\Common\SQLConvert.cs (2)
548return new Uri((string)value); 636return new Uri((string)value);
System.Drawing.Common.Tests (1)
System\Drawing\IconTests.cs (1)
372Assert.True(new Uri(bitmapUncPath).IsUnc);
System.IO.IsolatedStorage (1)
System\IO\IsolatedStorage\Helper.cs (1)
132Uri locationUri = new Uri(location);
System.IO.Packaging (5)
System\IO\Packaging\PackUriHelper.cs (1)
600private static readonly Uri s_defaultUri = new Uri("http://defaultcontainer/");
System\IO\Packaging\PackUriHelper.PackUriScheme.cs (4)
104Uri packUri = new Uri(absolutePackageUri); 112packUri = new Uri(string.Concat(packUri.GetComponents(UriComponents.AbsoluteUri, UriFormat.UriEscaped), fragment)); 118return new Uri(packUri.GetComponents(UriComponents.AbsoluteUri, UriFormat.UriEscaped)); 313Uri packageUri = new Uri(Uri.UnescapeDataString(hostAndPort));
System.Net.Http (1)
System\Net\Http\SocketsHttpHandler\HttpEnvironmentProxy.cs (1)
240uri = new Uri($"{uriSpan[tokens[0]]}//:@{uriSpan[tokens[2]]}");
System.Net.HttpListener (1)
System\Net\ServiceNameStore.cs (1)
222Uri hostUri = new Uri(uriPrefix);
System.Net.Mail (1)
System\Net\Mail\SmtpClient.cs (1)
275return _servicePoint ??= ServicePointManager.FindServicePoint(new Uri($"mailto:{_host}:{_port}"));
System.Net.Requests (3)
System\Net\ServicePoint\ServicePointManager.cs (1)
105public static ServicePoint FindServicePoint(string uriString, IWebProxy? proxy) => FindServicePoint(new Uri(uriString), proxy);
System\Net\WebRequest.cs (2)
156return Create(new Uri(requestUriString), false); 201return CreateHttp(new Uri(requestUriString));
System.Net.Security (1)
src\libraries\Common\src\System\Net\Http\X509ResourceClient.cs (1)
156Uri uri = new Uri(uriString);
System.Net.WebClient (3)
System\Net\WebClient.cs (3)
166_baseAddress = new Uri(value); 787return new Uri(Path.GetFullPath(address)); 792return new Uri(Path.GetFullPath(address));
System.Net.WebProxy (1)
System\Net\WebProxy.cs (1)
120var proxyUri = new Uri(address);
System.Private.DataContractSerialization (1)
System\Runtime\Serialization\Globals.cs (1)
338s_dataContractXsdBaseNamespaceUri ??= new Uri(DataContractXsdBaseNamespace);
System.Private.Uri (2)
System\UriBuilder.cs (2)
36_uri = new Uri(Uri.UriSchemeHttp + Uri.SchemeDelimiter + uri); 241_uri = new Uri(ToString());
System.Private.Xml (4)
System\Xml\Core\XmlTextReaderImpl.Unix.cs (1)
26url = new Uri(url).ToString();
System\Xml\XmlResolver.cs (1)
48uri = new Uri(Path.GetFullPath(relativeUri!));
System\Xml\Xsl\Runtime\XmlCollation.cs (2)
169collationUri = new Uri(collationLiteral); 202else if (collationUri.IsBaseOf(new Uri(XmlReservedNs.NsCollCodePoint)))
System.Runtime.Serialization.Schema (1)
System\Runtime\Serialization\Schema\ImportGlobals.cs (1)
88internal static Uri DataContractXsdBaseNamespaceUri => s_dataContractXsdBaseNamespaceUri ??= new Uri(DataContractXsdBaseNamespace);
System.Security.Cryptography (1)
src\libraries\Common\src\System\Net\Http\X509ResourceClient.cs (1)
156Uri uri = new Uri(uriString);
System.ServiceModel.Federation.Tests (2)
WSTrustChannelSecurityTokenProviderTest.cs (2)
28var issuerAddress = new EndpointAddress(new Uri("http://localhost/issuer.svc")); 29var targetAddress = new EndpointAddress(new Uri("http://localhost/target.svc"));
System.ServiceModel.Http.Tests (2)
ServiceModel\HttpIdentityTests.cs (2)
15var endpointAddress = new EndpointAddress(new Uri("https://serverhostname/fakeService.svc"), identity); 27var endpointAddress = new EndpointAddress(new Uri("https://serverhostname/fakeService.svc"), identity);
System.ServiceModel.NetFramingBase (5)
System\ServiceModel\Channels\AddressingVersionExtensions.cs (3)
21"Addressing200408 (http://schemas.xmlsoap.org/ws/2004/08/addressing)" => new Uri("http://schemas.xmlsoap.org/ws/2004/08/addressing/role/anonymous"), 22"Addressing10 (http://www.w3.org/2005/08/addressing)" => new Uri("http://www.w3.org/2005/08/addressing/anonymous"), 35"Addressing10 (http://www.w3.org/2005/08/addressing)" => new Uri("http://www.w3.org/2005/08/addressing/none"),
System\ServiceModel\Channels\FramingChannels.cs (1)
29: this(factory, settings, s_anonymousEndpointAddress, settings.MessageVersion.Addressing == AddressingVersion.None ? null : new Uri("http://www.w3.org/2005/08/addressing/anonymous"),
System\ServiceModel\Channels\FramingDecoders.cs (1)
231_via = new Uri(value);
System.Windows.Forms (15)
System\Windows\Forms\Controls\PictureBox\PictureBox.cs (2)
161return new Uri(path); 167return new Uri(path);
System\Windows\Forms\Controls\WebBrowser\HtmlDocument.cs (1)
154return string.IsNullOrEmpty(hrefString) ? null : new Uri(hrefString);
System\Windows\Forms\Controls\WebBrowser\HtmlElementErrorEventArgs.cs (1)
40public Uri Url => _url ??= new Uri(_urlString);
System\Windows\Forms\Controls\WebBrowser\HtmlWindow.cs (1)
237return string.IsNullOrEmpty(hrefString) ? null : new(hrefString);
System\Windows\Forms\Controls\WebBrowser\WebBrowser.cs (3)
240Uri url = new(hrefString); 292Url = new Uri("about:blank"); 582return new Uri(urlString);
System\Windows\Forms\Controls\WebBrowser\WebBrowser.WebBrowserEvent.cs (3)
64new Uri(urlString), targetFrameName is null ? string.Empty : (string)targetFrameName); 96new Uri(urlString)); 117new Uri(urlString));
System\Windows\Forms\Controls\WebBrowser\WebBrowserUriTypeConverter.cs (1)
19uri = new Uri($"http://{uri.OriginalString.AsSpan().Trim()}");
System\Windows\Forms\Help\Help.cs (3)
208file = new Uri($"{file}#{stringParam}"); 244file = new Uri(partialUri); 268file = new Uri(new Uri(AppContext.BaseDirectory),
System.Windows.Forms.IntegrationTests.Common (1)
TestHelpers.cs (1)
242Uri codeBaseUrl = new(Assembly.GetExecutingAssembly().Location);
System.Windows.Forms.Tests (46)
System\Windows\Forms\HtmlDocumentTests.cs (1)
1261Assert.Equal(new Uri(file.Path), document.Url);
System\Windows\Forms\WebBrowserDocumentCompletedEventArgsTests.cs (1)
12Uri url = new("http://google.com");
System\Windows\Forms\WebBrowserNavigatedEventArgsTests.cs (1)
12Uri url = new("http://google.com");
System\Windows\Forms\WebBrowserNavigatingEventArgsTests.cs (1)
15Uri url = new("http://google.com");
System\Windows\Forms\WebBrowserTests.cs (42)
1938Assert.Equal(new Uri(file.Path), control.Url); 1980Assert.Equal(new Uri(file.Path), e.Url); 1989Assert.Equal(new Uri(file.Path), e.Url); 2003Assert.Equal(new Uri(file.Path), e.Url); 2026await Task.Run(() => control.Url = new Uri(file.Path)); 2028Assert.Equal(new Uri(file.Path), control.Url); 2040await Task.Run(() => control.Url = new Uri(file.Path)); 2042Assert.Equal(new Uri(file.Path), control.Url); 2073await Task.Run(() => control.Url = new Uri(file.Path)); 2075Assert.Equal(new Uri(file.Path), control.Url); 3202Assert.Equal(new Uri(file.Path), e.Url); 3211Assert.Equal(new Uri(file.Path), e.Url); 3225Assert.Equal(new Uri(file.Path), e.Url); 3250Assert.Equal(new Uri(file.Path), control.Url); 3264Assert.Equal(new Uri(file.Path), control.Url); 3289await Task.Run(() => control.Navigate(new Uri(file.Path))); 3291Assert.Equal(new Uri(file.Path), control.Url); 3314Assert.Equal(new Uri(file.Path), e.Url); 3323Assert.Equal(new Uri(file.Path), e.Url); 3337Assert.Equal(new Uri(file.Path), e.Url); 3360await Task.Run(() => control.Navigate(new Uri(file.Path))); 3362Assert.Equal(new Uri(file.Path), control.Url); 3374await Task.Run(() => control.Navigate(new Uri(file.Path))); 3376Assert.Equal(new Uri(file.Path), control.Url); 3407await Task.Run(() => control.Navigate(new Uri(file.Path))); 3409Assert.Equal(new Uri(file.Path), control.Url); 3475Assert.Throws<ObjectDisposedException>(() => control.Navigate(new Uri("http://google.com"))); 3476Assert.Throws<ObjectDisposedException>(() => control.Navigate(new Uri("http://google.com"), "targetFrameName")); 3477Assert.Throws<ObjectDisposedException>(() => control.Navigate(new Uri("http://google.com"), false)); 3478Assert.Throws<ObjectDisposedException>(() => control.Navigate(new Uri("http://google.com"), "targetFrameName", null, null)); 3491Assert.Throws<InvalidOperationException>(() => control.Navigate(new Uri("http://google.com"))); 3492Assert.Throws<InvalidOperationException>(() => control.Navigate(new Uri("http://google.com"), "targetFrameName")); 3493Assert.Throws<InvalidOperationException>(() => control.Navigate(new Uri("http://google.com"), false)); 3494Assert.Throws<InvalidOperationException>(() => control.Navigate(new Uri("http://google.com"), "targetFrameName", null, null)); 3557yield return new object[] { new WebBrowserDocumentCompletedEventArgs(new Uri("http://microsoft.com")) }; 3594yield return new object[] { allowWebBrowserDrop, new WebBrowserDocumentCompletedEventArgs(new Uri("http://microsoft.com")) }; 3751yield return new object[] { new WebBrowserNavigatedEventArgs(new Uri("http://microsoft.com")) }; 3786yield return new object[] { new WebBrowserNavigatingEventArgs(new Uri("http://microsoft.com"), "targetFrameName") }; 3988Assert.Equal(new Uri(file.Path), control.Url); 4000Assert.Equal(new Uri(file.Path), control.Url); 4135Assert.Equal(new Uri(file.Path), control.Url); 4147Assert.Equal(new Uri(file.Path), control.Url);
System.Xaml (3)
System\Xaml\InfosetObjects\XamlObjectWriter.cs (2)
1614ctx.BaseUri = new Uri((string)value); 2037ctx.BaseUri = new Uri((string)value);
System\Xaml\InfosetObjects\XamlXmlReader.cs (1)
185_mergedSettings.BaseUri = new Uri(myXmlReader.BaseURI);
System.Xaml.Tests (1)
System\Windows\Markup\ValueSerializerTests.cs (1)
388public CustomUri(string uriString) : base(uriString) { }
Templates.Blazor.Tests (1)
BlazorTemplateTest.cs (1)
173await page.GotoAsync(new Uri(page.Url).GetLeftPart(UriPartial.Authority));
WaitFor.Frontend (1)
Program.cs (1)
9builder.Services.AddHttpClient<ApiClient>(c => c.BaseAddress = new("http://api"));
WebSocketSample (1)
Program.cs (1)
28await ws.ConnectAsync(new Uri(url), CancellationToken.None);