694 references to Uri
aspire (3)
Commands\TelemetryCommandHelpers.cs (1)
148var uri = new Uri(dashboardUrlWithToken);
Projects\AppHostServerProject.cs (1)
41normalizedPath = new Uri(normalizedPath).LocalPath;
Projects\DotNetBasedAppHostServerProject.cs (1)
59_appPath = new Uri(_appPath).LocalPath;
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)
128TableServiceClient tableClient = new(new Uri(ServiceUri), new DefaultAzureCredential(), clientOptions);
Aspire.Azure.Messaging.EventHubs (1)
EventHubsComponent.cs (1)
95: new Uri(settings.FullyQualifiedNamespace).Host;
Aspire.Azure.Messaging.EventHubs.Tests (2)
AspireEventHubsExtensionsTests.cs (2)
62var blobClient = new BlobServiceClient(new Uri(BlobsConnectionString), new DefaultAzureCredential()); 617var blobClient = new BlobServiceClient(new Uri(BlobsConnectionString), new BlobClientOptions() { Transport = mockTransport });
Aspire.Azure.Messaging.WebPubSub (1)
AzureMessagingWebPubSubSettings.cs (1)
78Endpoint = new Uri(endpoint.ToString()!);
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 (11)
AspireKeyVaultExtensionsTests.cs (8)
24var vaultUri = new Uri(ConformanceConstants.VaultUri); 75Assert.Equal(new Uri(ConformanceConstants.VaultUri), client.VaultUri); 203Assert.Equal(new Uri("https://aspiretests2.vault.azure.net/"), client2.VaultUri); 204Assert.Equal(new Uri("https://aspiretests3.vault.azure.net/"), client3.VaultUri); 228var vaultUri = new Uri(ConformanceConstants.VaultUri); 268Assert.Equal(secretClient.VaultUri, new Uri(secretClientUri)); 269Assert.Equal(keyClient.VaultUri, new Uri(keyClientUri)); 270Assert.Equal(certClient.VaultUri, new Uri(certClientUri));
CertificateClientConformanceTests.cs (1)
116CertificateClient certClient = new(new Uri(VaultUri), new DefaultAzureCredential(), clientOptions);
KeyClientConformanceTests.cs (1)
118KeyClient keyClient = new(new Uri(VaultUri), new DefaultAzureCredential(), clientOptions);
SecretClientConformanceTests.cs (1)
117SecretClient secretClient = new(new Uri(VaultUri), new DefaultAzureCredential(), clientOptions);
Aspire.Azure.Storage.Blobs.Tests (1)
ConformanceTests.cs (1)
132BlobServiceClient tableClient = new(new Uri(ServiceUri), new DefaultAzureCredential(), clientOptions);
Aspire.Azure.Storage.Files.DataLake.Tests (1)
ConformanceTests.cs (1)
137DataLakeServiceClient tableClient = new(new Uri(ServiceUri), new DefaultAzureCredential(), clientOptions);
Aspire.Azure.Storage.Queues.Tests (1)
ConformanceTests.cs (1)
133QueueServiceClient tableClient = new(new Uri(ServiceUri), new DefaultAzureCredential(), clientOptions);
Aspire.Dashboard (7)
Components\Dialogs\McpServerDialog.razor.cs (1)
69var uri = new Uri(baseUri: new Uri(mcpUrl), relativeUri: "/mcp");
Components\Dialogs\SettingsDialog.razor.cs (2)
87var uri = new Uri(NavigationManager.Uri) 124var uri = new Uri(NavigationManager.Uri)
Model\Assistant\ChatClientFactory.cs (1)
203endpoint = new Uri(url);
Model\DebugSessionHelpers.cs (1)
67debugSessionUri = new Uri($"{scheme}://localhost:{debugSession.Port}");
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)
132loadRedirect = new Uri(a.Location);
Aspire.Dashboard.Tests (69)
Integration\FrontendBrowserTokenAuthTests.cs (9)
39using var client = new HttpClient { BaseAddress = new Uri($"http://{app.FrontendSingleEndPointAccessor().EndPoint}") }; 61using var client = new HttpClient { BaseAddress = new Uri($"http://{app.FrontendSingleEndPointAccessor().EndPoint}") }; 92using var client = new HttpClient { BaseAddress = new Uri($"http://{app.OtlpServiceHttpEndPointAccessor().EndPoint}") }; 116using var client = new HttpClient { BaseAddress = new Uri($"http://{app.FrontendSingleEndPointAccessor().EndPoint}") }; 141using var client = new HttpClient { BaseAddress = new Uri($"http://{app.FrontendSingleEndPointAccessor().EndPoint}") }; 180var uri = new Uri((string)LogTestHelpers.GetValue(w, "DashboardUri")!); 187var uri = new Uri((string)LogTestHelpers.GetValue(w, "OtlpEndpointUri")!); 194var uri = new Uri((string)LogTestHelpers.GetValue(w, "OtlpEndpointUri")!); 201var uri = new Uri((string)LogTestHelpers.GetValue(w, "McpEndpointUri")!);
Integration\FrontendOpenIdConnectAuthTests.cs (2)
36using var client = new HttpClient(handler) { BaseAddress = new Uri($"http://{app.FrontendSingleEndPointAccessor().EndPoint}") }; 81using var client = new HttpClient(handler) { BaseAddress = new Uri($"http://{app.OtlpServiceHttpEndPointAccessor().EndPoint}") };
Integration\HealthTests.cs (1)
27using var client = new HttpClient(httpClientHandler) { BaseAddress = new Uri(basePath) };
Integration\IntegrationTestHelpers.cs (1)
135return new HttpClient(handler) { BaseAddress = new Uri(address) };
Integration\OtlpHttpServiceTests.cs (6)
231using var client = new HttpClient { BaseAddress = new Uri($"http://{endpoint.EndPoint}") }; 262using var client = new HttpClient { BaseAddress = new Uri($"http://{endpoint.EndPoint}") }; 309using var client = new HttpClient { BaseAddress = new Uri($"http://{endpoint.EndPoint}") }; 334using var client = new HttpClient { BaseAddress = new Uri($"http://{endpoint.EndPoint}") }; 363using var client = new HttpClient { BaseAddress = new Uri($"http://{endpoint.EndPoint}") }; 392using var client = new HttpClient { BaseAddress = new Uri($"http://{endpoint.EndPoint}") };
Integration\Playwright\BrowserTokenAuthenticationTests.cs (3)
41var uri = new Uri(response!.Url); 53await page.WaitForURLAsync(url => new Uri(url).AbsolutePath == "/").DefaultTimeout(TestConstants.LongTimeoutTimeSpan); 72var uri = new Uri(response!.Url);
Integration\ResponseCompressionTests.cs (2)
22using var client = new HttpClient(httpClientHandler) { BaseAddress = new Uri($"http://{app.FrontendSingleEndPointAccessor().EndPoint}") }; 44using var client = new HttpClient(httpClientHandler) { BaseAddress = new Uri($"http://{app.FrontendSingleEndPointAccessor().EndPoint}") };
Integration\StartupTests.cs (14)
340BaseAddress = new Uri($"https://{app.FrontendSingleEndPointAccessor().EndPoint}") 396BaseAddress = new Uri($"https://{app.FrontendSingleEndPointAccessor().EndPoint}") 417BaseAddress = new Uri($"https://{app.McpEndPointAccessor().EndPoint}") 521BaseAddress = new Uri($"http://{app.FrontendSingleEndPointAccessor().EndPoint}") 695var uri = new Uri((string)LogTestHelpers.GetValue(w, "DashboardUri")!); 702var uri = new Uri((string)LogTestHelpers.GetValue(w, "OtlpEndpointUri")!); 709var uri = new Uri((string)LogTestHelpers.GetValue(w, "OtlpEndpointUri")!); 716var uri = new Uri((string)LogTestHelpers.GetValue(w, "McpEndpointUri")!); 910var uri = new Uri((string)LogTestHelpers.GetValue(w, "DashboardUri")!); 919var uri = new Uri((string)LogTestHelpers.GetValue(w, "OtlpEndpointUri")!); 926var uri = new Uri((string)LogTestHelpers.GetValue(w, "OtlpEndpointUri")!); 933var uri = new Uri((string)LogTestHelpers.GetValue(w, "McpEndpointUri")!); 984using var client = new HttpClient { BaseAddress = new Uri($"http://{app.FrontendSingleEndPointAccessor().EndPoint}") }; 1061using var client = new HttpClient { BaseAddress = new Uri($"http://{endpointString}") };
Integration\TelemetryApiTests.cs (3)
102using var httpClient = new HttpClient(handler) { BaseAddress = new Uri($"http://{app.FrontendSingleEndPointAccessor().EndPoint}") }; 174using var httpClient = new HttpClient(handler) { BaseAddress = new Uri($"http://{app.FrontendSingleEndPointAccessor().EndPoint}") }; 343using var httpClient = new HttpClient(handler) { BaseAddress = new Uri($"http://{app.FrontendSingleEndPointAccessor().EndPoint}") };
Model\ExportHelpersTests.cs (1)
21urls: [new UrlViewModel("http", new Uri("http://localhost:5000"), isInternal: false, isInactive: false, UrlDisplayPropertiesViewModel.Empty)],
Model\ResourceUrlHelpersTests.cs (25)
28var endpoints = GetUrls(ModelTestHelpers.CreateResource(urls: [new("Test", new("http://localhost:8080"), isInternal: false, isInactive: false, displayProperties: UrlDisplayPropertiesViewModel.Empty)])); 45new("Test", new("http://localhost:8080"), isInternal: false, isInactive: false, displayProperties: UrlDisplayPropertiesViewModel.Empty), 46new("Test2", new("http://localhost:8081"), isInternal: false, isInactive: false, displayProperties: UrlDisplayPropertiesViewModel.Empty)]) 72new("Test", new("http://localhost:8080"), isInternal: false, isInactive: false, displayProperties: UrlDisplayPropertiesViewModel.Empty), 73new("Test2", new("tcp://localhost:8081"), isInternal: false, isInactive: false, displayProperties: UrlDisplayPropertiesViewModel.Empty)]) 99new("Email", new("mailto:test@example.com"), isInternal: false, isInactive: false, displayProperties: UrlDisplayPropertiesViewModel.Empty), 100new("FTP", new("ftp://files.example.com/path"), isInternal: false, isInactive: false, displayProperties: UrlDisplayPropertiesViewModel.Empty), 101new("Custom", new("myapp://resource/123"), isInternal: false, isInactive: false, displayProperties: UrlDisplayPropertiesViewModel.Empty)]) 135new("First", new("https://localhost:8080/test"), isInternal:false, isInactive: false, displayProperties: UrlDisplayPropertiesViewModel.Empty), 136new("Test", new("https://localhost:8081/test2"), isInternal:false, isInactive: false, displayProperties: UrlDisplayPropertiesViewModel.Empty) 162new("First", new("https://localhost:8080/test"), isInternal:true, isInactive : false, displayProperties: UrlDisplayPropertiesViewModel.Empty), 163new("Test", new("https://localhost:8081/test2"), isInternal:false, isInactive : false, displayProperties: UrlDisplayPropertiesViewModel.Empty) 181new("First", new("https://localhost:8080/test"), isInternal: false, isInactive : true, displayProperties: UrlDisplayPropertiesViewModel.Empty), 182new("Test", new("https://localhost:8081/test2"), isInternal: false, isInactive: false, displayProperties: UrlDisplayPropertiesViewModel.Empty) 200new("First", new("https://localhost:8080/test"), isInternal:true, isInactive: false, displayProperties: UrlDisplayPropertiesViewModel.Empty), 201new("Test", new("https://localhost:8081/test2"), isInternal:false, isInactive: false, displayProperties: UrlDisplayPropertiesViewModel.Empty) 228new("a", new("http://localhost:8080"), isInternal: false, isInactive: false, displayProperties: UrlDisplayPropertiesViewModel.Empty), 229new("C", new("http://localhost:8080"), isInternal: false, isInactive: false, displayProperties: UrlDisplayPropertiesViewModel.Empty), 230new("D", new("tcp://localhost:8080"), isInternal: false, isInactive: false, displayProperties: UrlDisplayPropertiesViewModel.Empty), 231new("B", new("tcp://localhost:8080"), isInternal: false, isInactive: false, displayProperties: UrlDisplayPropertiesViewModel.Empty), 232new("Z", new("https://localhost:8080"), isInternal: false, isInactive: false, displayProperties: UrlDisplayPropertiesViewModel.Empty) 247new("Zero-Https", new("https://localhost:8079"), isInternal: false, isInactive: false, displayProperties: new UrlDisplayPropertiesViewModel(string.Empty, 0)), 248new("Zero-Http", new("http://localhost:8080"), isInternal: false, isInactive: false, displayProperties: new UrlDisplayPropertiesViewModel(string.Empty, 0)), 249new("Positive", new("http://localhost:8082"), isInternal: false, isInactive: false, displayProperties: new UrlDisplayPropertiesViewModel(string.Empty, 1)), 250new("Negative", new("http://localhost:8083"), isInternal: false, isInactive: false, displayProperties: new UrlDisplayPropertiesViewModel(string.Empty, -1))
Model\TelemetryExportServiceTests.cs (1)
1185urls: [new UrlViewModel("http", new Uri("http://localhost:5000"), isInternal: false, isInactive: false, UrlDisplayPropertiesViewModel.Empty)],
ResourceOutgoingPeerResolverTests.cs (1)
23urls: serviceAddress is null || servicePort is null ? [] : [new UrlViewModel(name, new($"http://{serviceAddress}:{servicePort}"), isInternal: false, isInactive: false, displayProperties: UrlDisplayPropertiesViewModel.Empty)]);
Aspire.Hosting (3)
Devcontainers\Codespaces\CodespacesResourceUrlRewriterService.cs (1)
34var uri = new Uri(originalUrlSnapshot.Url);
Devcontainers\Codespaces\CodespacesUrlRewriter.cs (1)
19return RewriteUrl(new Uri(url));
ProjectResourceBuilderExtensions.cs (1)
639var baseUri = new Uri(url.Url);
Aspire.Hosting.Azure (1)
Provisioning\Provisioners\BicepProvisioner.cs (1)
308var client = secretClientProvider.GetSecretClient(new(vaultUri));
Aspire.Hosting.Azure.Tests (3)
AzureBicepProvisionerTests.cs (1)
167var vaultUri = new Uri("https://test.vault.azure.net/");
FoundryConnectionPropertiesTests.cs (1)
35aiFoundry.Resource.EmulatorServiceUri = new Uri("http://localhost:8080");
FoundryDeploymentConnectionPropertiesTests.cs (1)
21deployment.Resource.Parent.EmulatorServiceUri = new Uri("http://localhost:8080");
Aspire.Hosting.Foundry (2)
HostedAgent\AzureHostedAgentResource.cs (1)
143var projectClient = new AIProjectClient(new Uri(projectEndpoint), new DefaultAzureCredential());
HostedAgent\AzurePromptAgentResource.cs (1)
130var projectClient = new AIProjectClient(new Uri(projectEndpoint), new DefaultAzureCredential());
Aspire.Hosting.GitHub.Models (1)
GitHubModelsHealthCheck.cs (1)
38using var request = new HttpRequestMessage(HttpMethod.Post, new Uri($"{builder["Endpoint"]}/chat/completions"));
Aspire.Hosting.Nats.Tests (1)
NatsFunctionalTests.cs (1)
131? connectionString!.Replace(new Uri(connectionString).UserInfo, null)
Aspire.Hosting.OpenAI (3)
OpenAIHealthCheck.cs (2)
14private static readonly Uri s_defaultEndpointUri = new("https://api.openai.com/v1"); 15private static readonly Uri s_statusPageUri = new("https://status.openai.com/api/v2/status.json");
OpenAIModelHealthCheck.cs (1)
40using var request = new HttpRequestMessage(HttpMethod.Get, new Uri($"{endpoint}/models/{model}"));
Aspire.Hosting.RabbitMQ (1)
RabbitMQBuilderExtensions.cs (1)
69Uri = new Uri(connectionString)
Aspire.Hosting.Seq.Tests (1)
SeqFunctionalTests.cs (1)
44BaseAddress = new Uri(url)
Aspire.Hosting.Testing (2)
DistributedApplicationHostingTestingExtensions.cs (2)
32client.BaseAddress = new(baseUri); 109return new(GetEndpointUriStringCore(app, resourceName, endpointName, networkIdentifier));
Aspire.Hosting.Tests (14)
ApplicationModel\EndpointHostHelpersTests.cs (4)
46var result = EndpointHostHelpers.IsLocalhost(new Uri($"http://{host}:12345")); 95var result = EndpointHostHelpers.IsLocalhostTld(new Uri($"http://{host}:12345")); 145var result = EndpointHostHelpers.IsDevLocalhostTld(new Uri($"http://{host}:12345")); 200var result = EndpointHostHelpers.IsLocalhostOrLocalhostTld(new Uri($"http://{host}:12345"));
ApplicationModel\McpServerEndpointAnnotationTests.cs (1)
20var expectedUri = new Uri("http://custom.example.com:9000/mcp");
Dashboard\DashboardLifecycleHookTests.cs (1)
262var uri = new Uri(dashboardUrlValue);
ExternalServiceTests.cs (4)
32var uri = new Uri("https://nuget.org/"); 86var uriWithPath = new Uri("https://api.example.com/api/v1"); 553var uri = new Uri("https://api.example.com/service"); 565var uri = new Uri("https://api.example.com/service/");
ResourceNotificationTests.cs (1)
62nameof(ExternalServiceResource) => new ExternalServiceResource("test", new Uri("http://localhost/")),
Utils\PasswordGeneratorTests.cs (1)
111Exception? exception = Record.Exception(() => new Uri($"https://guest:{password}@localhost:12345"));
WithReferenceTests.cs (2)
536Assert.Throws<InvalidOperationException>(() => builder.AddProject<ProjectA>("projecta").WithReference("petstore", new Uri("https://petstore.swagger.io/v2"))); 545.WithReference("petstore", new Uri("https://petstore.swagger.io/"));
Aspire.Hosting.Yarp.Tests (4)
YarpClusterTests.cs (3)
113var uri = new Uri("https://example.com:8080"); 129var destinations = new object[] { "http://localhost:5000", new Uri("http://localhost:5001") }; 195var uri = new Uri("https://example.com");
YarpConfigGeneratorTests.cs (1)
181Address = new Uri("http://localhost:8080"),
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)
src\Components\Aspire.RabbitMQ.Client\AspireRabbitMQExtensions.cs (1)
105factory.Uri = new(connectionString);
Aspire.RabbitMQ.Client.Tests (1)
AspireRabbitMQExtensionsTests.cs (1)
266var uri = new Uri(expectedUri);
Aspire.RabbitMQ.Client.v6.Tests (1)
tests\Aspire.RabbitMQ.Client.Tests\AspireRabbitMQExtensionsTests.cs (1)
266var uri = new Uri(expectedUri);
Aspire.Seq (3)
AspireSeqExtensions.cs (2)
57settings.Logs.Endpoint = new Uri($"{settings.ServerUrl}/ingest/otlp/v1/logs"); 58settings.Traces.Endpoint = new Uri($"{settings.ServerUrl}/ingest/otlp/v1/traces");
SeqHealthCheck.cs (1)
14readonly HttpClient _client = new(new SocketsHttpHandler { ActivityHeadersPropagator = null }) { BaseAddress = new Uri(seqUri) };
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"));
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)
38issuerAddress = new EndpointAddress(new Uri(Endpoints.WSFederationAuthorityLocalSTS + endpointSuffix)); 40serviceEndpointAddress = new EndpointAddress(new Uri(tokenTargetAddress)); 99issuerAddress = new EndpointAddress(new Uri(Endpoints.WSFederationAuthorityLocalSTS + "wsHttp/wstrustFeb2005")); 101serviceEndpointAddress = new EndpointAddress(new Uri(tokenTargetAddress)); 151issuerAddress = new EndpointAddress(new Uri(Endpoints.WSFederationAuthorityLocalSTS + "wsHttp/wstrust13")); 153serviceEndpointAddress = new EndpointAddress(new Uri(tokenTargetAddress));
CdkSample.ApiService (1)
Program.cs (1)
31clients.AddConfigurationClient(new Uri(builder.Configuration.GetConnectionString("appConfig")!));
Client.ChannelLayer.IntegrationTests (3)
DuplexChannelWithSynchronizationContext.cs (3)
35EndpointAddress endpointAddress = new EndpointAddress(new Uri(Endpoints.Tcp_Certificate_Duplex_Address)); 96EndpointAddress endpointAddress = new EndpointAddress(new Uri(Endpoints.Tcp_Certificate_Duplex_Address)); 175EndpointAddress 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)); 63Uri 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));
DevTunnels.ApiService (1)
Program.cs (1)
8builder.Services.AddHttpClient("frontend", client => client.BaseAddress = new("https://frontend"));
dotnet (1)
Commands\Sdk\Check\SdkCheckCommand.cs (1)
54_sdkCheckConfig?.ReleasesUri == null ? null : new Uri(_sdkCheckConfig.ReleasesUri),
dotnet-svcutil-lib (25)
CommandProcessorOptions.cs (1)
746this.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)
203options.Inputs.Add(new Uri(url));
Keycloak.Web (1)
Program.cs (1)
26client.BaseAddress = new("https+http://apiservice");
Microsoft.AspNetCore.Components.WebView.Maui (2)
Extensions\UriExtensions.cs (1)
16 var uri = new Uri(uriString!);
src\BlazorWebView\src\SharedSource\StaticContentHotReloadManager.cs (1)
93 var requestPath = new Uri(requestAbsoluteUri).AbsolutePath.Substring(1);
Microsoft.AspNetCore.Components.WebView.WindowsForms (3)
src\BlazorWebView\src\SharedSource\StaticContentHotReloadManager.cs (1)
93 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)
93 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.Testing (1)
ServiceFakesHostExtensions.cs (1)
79.Select(x => new Uri(x.Replace("[::]", "localhost", StringComparison.OrdinalIgnoreCase)));
Microsoft.Build (2)
Logging\TerminalLogger\TerminalLogger.cs (1)
1383private static Uri GenerateLinkForHelpKeyword(string helpKeyword) => new($"https://go.microsoft.com/fwlink/?LinkId={helpKeyword}");
src\msbuild\src\Shared\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)
31Uri uri = new Uri(url); 52Uri u = new Uri(resolvedPath); 222var u = new Uri(path);
SignFile.cs (1)
56TimestampUrl == null ? null : new Uri(TimestampUrl),
Microsoft.Build.Tasks.Git (2)
GitOperations.cs (2)
176return new Uri("file:///" + url + "/"); 199var rootUri = new Uri(root.EndWithSeparator('/'));
Microsoft.CodeAnalysis (1)
CommandLine\SarifErrorLogger.cs (1)
123private static readonly Uri s_fileRoot = new Uri("file:///");
Microsoft.Deployment.DotNet.Releases (6)
Cve.cs (1)
81new(id, new Uri(address));
JsonExtensions.cs (1)
56return new Uri(p.GetString());
ProductCollection.cs (2)
22public static readonly Uri ReleasesIndexDefaultUrl = new Uri("https://builds.dotnet.microsoft.com/dotnet/release-metadata/releases-index.json"); 66return await GetAsync(new Uri(releasesIndexUri)).ConfigureAwait(false);
ReleaseFile.cs (2)
27get => _address ??= _addressString != null ? new Uri(_addressString) : null; 170new ReleaseFile(new Uri(address), hash, name, rid);
Microsoft.DotNet.Cli.Utils (1)
PathUtility.cs (1)
240Uri resultUri = new(new Uri(basePath), new Uri(relativePath, UriKind.Relative));
Microsoft.Extensions.AI.Abstractions (1)
Contents\UriContent.cs (1)
40: this(new Uri(Throw.IfNull(uri)), mediaType)
Microsoft.Extensions.AI.Abstractions.Tests (24)
ChatCompletion\ChatClientMetadataTests.cs (1)
23var uri = new Uri("https://example.com");
ChatCompletion\ChatMessageTests.cs (1)
259new DataContent(new Uri("data:text/plain;base64,aGVsbG8="), "mime-type/2")
Contents\CitationAnnotationTests.cs (2)
59Uri url = new("https://example.com"); 74Url = new("https://example.com"),
Contents\DataContentTests.cs (3)
83content = new DataContent(new Uri("data:text/plain,"), mediaType); 106content = new DataContent(new Uri("data:image/png;base64,aGVsbG8=")); 128Validate(new DataContent(new Uri(uri)), expectedData);
Contents\UriContentTests.cs (3)
23Assert.Throws<ArgumentNullException>("mediaType", () => new UriContent(new Uri("data:image/png;base64,aGVsbG8="), null!)); 24Assert.Throws<ArgumentException>("mediaType", () => new UriContent(new Uri("data:image/png;base64,aGVsbG8="), "")); 25Assert.Throws<ArgumentException>("mediaType", () => new UriContent(new Uri("data:image/png;base64,aGVsbG8="), "audio"));
Embeddings\EmbeddingGeneratorMetadataTests.cs (1)
24var uri = new Uri("https://example.com");
Image\ImageGenerationResponseTests.cs (4)
33content.Add(new UriContent(new Uri($"https://example.com/image-{i}.png"), "image/png")); 73new UriContent(new Uri("https://example.com/image1.png"), "image/png"), 99new UriContent(new Uri("https://example.com/image1.png"), "image/png"), 137new UriContent(new Uri("https://example.com/image.png"), "image/png"),
Image\ImageGeneratorMetadataTests.cs (1)
23var uri = new Uri("https://example.com");
SpeechToText\SpeechToTextClientMetadataTests.cs (1)
23var uri = new Uri("https://example.com");
test\Shared\JsonSchemaExporter\TestTypes.cs (1)
99yield return new TestData<Uri>(new("http://example.com"), """{"type":["string","null"], "format":"uri"}""");
Tools\HostedMcpServerToolTests.cs (6)
15HostedMcpServerTool tool = new("serverName", new Uri("https://localhost/")); 46HostedMcpServerTool tool = new("serverName", new Uri("https://localhost/"), props); 116HostedMcpServerTool tool = new("serverName", new Uri("https://localhost/")); 137HostedMcpServerTool tool2 = new("serverName", new Uri("https://localhost/")); 191Assert.Throws<ArgumentException>("serverName", () => new HostedMcpServerTool(string.Empty, new Uri("https://localhost/"))); 193Assert.Throws<ArgumentNullException>("serverName", () => new HostedMcpServerTool(null!, new Uri("https://localhost/")));
Microsoft.Extensions.AI.Evaluation.Integration.Tests (3)
Setup.cs (1)
29Endpoint = new Uri(new Uri(Settings.Current.Endpoint), "/openai/v1")
test\Shared\ImageDataUri\ImageDataUri.cs (2)
22return new Uri($"data:image/png;base64,{Convert.ToBase64String(ms.ToArray())}"); 31return new Uri($"data:application/pdf;base64,{Convert.ToBase64String(builder.Build())}");
Microsoft.Extensions.AI.Evaluation.Reporting.Tests (2)
AzureStorage\AzureResponseCacheTests.cs (1)
25baseUri: new Uri(Settings.Current.StorageAccountEndpoint),
AzureStorage\AzureResultStoreTests.cs (1)
25baseUri: new Uri(Settings.Current.StorageAccountEndpoint),
Microsoft.Extensions.AI.Evaluation.Safety (2)
ContentSafetyService.cs (1)
237Uri discoveryUri = new Uri(discoveryUrl);
ContentSafetyServiceConfiguration.cs (1)
212endpoint: new Uri(Throw.IfNullOrWhitespace(endpointUrl)),
Microsoft.Extensions.AI.Evaluation.Tests (4)
ModelInfoTests.cs (4)
49Uri? uri = providerUri != null ? new Uri(providerUri) : null; 101Uri? uri = providerUri != null ? new Uri(providerUri) : null; 140var metadata = new ChatClientMetadata(providerName, new Uri(providerUri)); 160var metadata = new ChatClientMetadata(providerName: "some-provider", new Uri(providerUri));
Microsoft.Extensions.AI.Integration.Tests (2)
test\Shared\ImageDataUri\ImageDataUri.cs (2)
22return new Uri($"data:image/png;base64,{Convert.ToBase64String(ms.ToArray())}"); 31return new Uri($"data:application/pdf;base64,{Convert.ToBase64String(builder.Build())}");
Microsoft.Extensions.AI.OllamaSharp.Integration.Tests (1)
IntegrationTestHelpers.cs (1)
17? new Uri(endpoint)
Microsoft.Extensions.AI.OpenAI (1)
OpenAIClientExtensions.cs (1)
34internal static Uri DefaultOpenAIEndpoint { get; } = new("https://api.openai.com/v1");
Microsoft.Extensions.AI.OpenAI.Tests (28)
IntegrationTestHelpers.cs (1)
31var options = new OpenAIClientOptions { Endpoint = new Uri(new Uri(endpoint), "/openai/v1") };
OpenAIAssistantChatClientTests.cs (1)
31Uri endpoint = new("http://localhost/some/endpoint");
OpenAIChatClientTests.cs (1)
35Uri endpoint = new("http://localhost/some/endpoint");
OpenAIConversionTests.cs (4)
410Assert.Equal(new Uri("http://localhost:8000"), tool.ServerUri); 470var expectedUri = new Uri("http://localhost:8000"); 806cc.Content.Add(ChatMessageContentPart.CreateImagePart(new Uri("http://example.com/image.png"))); 865ChatMessageContentPart.CreateImagePart(new Uri("http://example.com/image.png"))),
OpenAIEmbeddingGeneratorTests.cs (1)
30Uri endpoint = new("http://localhost/some/endpoint");
OpenAIImageGeneratorTests.cs (1)
23Uri endpoint = new("http://localhost/some/endpoint");
OpenAIResponseClientIntegrationTests.cs (3)
110Tools = [new HostedMcpServerTool("deepwiki", new Uri("https://mcp.deepwiki.com/mcp")) { ApprovalMode = HostedMcpServerToolApprovalMode.NeverRequire }], 132Tools = [new HostedMcpServerTool("deepwiki", new Uri("https://mcp.deepwiki.com/mcp")) 172Tools = [new HostedMcpServerTool("deepwiki", new Uri("https://mcp.deepwiki.com/mcp"))
OpenAIResponseClientTests.cs (13)
38Uri endpoint = new("http://localhost/some/endpoint"); 1398Tools = [new HostedMcpServerTool("deepwiki", new Uri("https://mcp.deepwiki.com/mcp"))] 1773ResponseTool.CreateMcpTool("deepwiki", serverUri: new("https://mcp.deepwiki.com/mcp"), toolCallApprovalPolicy: new McpToolCallApprovalPolicy(GlobalMcpToolCallApprovalPolicy.NeverRequireApproval)).AsAITool() : 1774new HostedMcpServerTool("deepwiki", new Uri("https://mcp.deepwiki.com/mcp")) 2189Tools = [new HostedMcpServerTool("deepwiki", new Uri("https://mcp.deepwiki.com/mcp")) 2310var mcpTool = new HostedMcpServerTool("deepwiki", new Uri("https://mcp.deepwiki.com/mcp")) 2411Uri = new Uri("https://api.openai.com/v1/responses/resp_68d3d2c9ef7c8195863e4e2b2ec226a205007262ecbbfed8"), 2663Uri = new Uri("https://api.openai.com/v1/responses/resp_68d40dc671a0819cb0ee920078333451029e611c3cc4a34b?stream=true&starting_after=9"), 4368new FunctionResultContent("call_uri", new UriContent(new Uri("https://example.com/image.png"), "image/png")) 4487new UriContent(new Uri("https://example.com/result.png"), "image/png"), 4714new FunctionResultContent("call_file_uri", new UriContent(new Uri("https://example.com/document.pdf"), "application/pdf")) 4938new UriContent(new Uri("https://example.com/image.png"), "image/png"), 4939new UriContent(new Uri("https://example.com/image.png"), "image/png") { AdditionalProperties = new AdditionalPropertiesDictionary { ["detail"] = "high" }},
OpenAISpeechToTextClientTests.cs (1)
31Uri endpoint = new("http://localhost/some/endpoint");
test\Shared\ImageDataUri\ImageDataUri.cs (2)
22return new Uri($"data:image/png;base64,{Convert.ToBase64String(ms.ToArray())}"); 31return new Uri($"data:application/pdf;base64,{Convert.ToBase64String(builder.Build())}");
Microsoft.Extensions.AI.Tests (10)
ChatCompletion\OpenTelemetryChatClientTests.cs (7)
59serviceType == typeof(ChatClientMetadata) ? new ChatClientMetadata("testservice", new Uri("http://localhost:12345/something"), "amazingmodel") : 411new UriContent(new Uri("https://example.com/image.jpg"), "image/jpeg"), 427yield return new() { Contents = [new UriContent(new Uri("https://example.com/image.jpg"), "image/jpeg")] }; 447new UriContent(new Uri("https://example.com/video.mp4"), "video/mp4"), 664new ImageGenerationToolResultContent { ImageId = "img-123", Outputs = [new UriContent(new Uri("https://example.com/image.png"), "image/png")] }, 680yield return new() { Contents = [new ImageGenerationToolResultContent { ImageId = "img-123", Outputs = [new UriContent(new Uri("https://example.com/image.png"), "image/png")] }] }; 900serviceType == typeof(ChatClientMetadata) ? new ChatClientMetadata("testprovider", new Uri("http://localhost:5000/api"), "testmodel") :
Embeddings\OpenTelemetryEmbeddingGeneratorTests.cs (1)
53serviceType == typeof(EmbeddingGeneratorMetadata) ? new EmbeddingGeneratorMetadata("testservice", new Uri("http://localhost:12345/something"), "defaultmodel", 1234) :
Image\OpenTelemetryImageGeneratorTests.cs (1)
59serviceType == typeof(ImageGeneratorMetadata) ? new ImageGeneratorMetadata("testservice", new Uri("http://localhost:12345/something"), "amazingmodel") :
SpeechToText\OpenTelemetrySpeechToTextClientTests.cs (1)
59serviceType == typeof(SpeechToTextClientMetadata) ? new SpeechToTextClientMetadata("testservice", new Uri("http://localhost:12345/something"), "amazingmodel") :
Microsoft.Extensions.DataIngestion.Tests (7)
Readers\DocumentReaderConformanceTests.cs (3)
81using HttpResponseMessage response = await DownloadAsync(new(source)); 94FileInfo inputFile = await DownloadToFileAsync(new Uri(source)); 110new("https://winprotocoldocs-bhdugrdyduf5h2e4.b02.azurefd.net/MC-SQLR/%5bMC-SQLR%5d.pdf")); // SQL Server Resolution Protocol
Readers\MarkItDownMcpReaderTests.cs (3)
22var reader = new MarkItDownMcpReader(new Uri("http://localhost:3001/sse")); 35var reader = new MarkItDownMcpReader(new Uri("http://localhost:3001/sse")); 44var reader = new MarkItDownMcpReader(new Uri("http://localhost:3001/sse"));
Readers\MarkItDownReaderTests.cs (1)
45new("https://winprotocoldocs-bhdugrdyduf5h2e4.b02.azurefd.net/MC-SQLR/%5bMC-SQLR%5d-240423.docx")); // SQL Server Resolution Protocol.
Microsoft.Extensions.DotNetDeltaApplier (1)
src\sdk\src\Dotnet.Watch\HotReloadAgent.Host\WebSocketTransport.cs (1)
61await _webSocket.ConnectAsync(new Uri(serverUrl), connectCts.Token).ConfigureAwait(false);
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 (35)
Latency\Internal\HttpLatencyTelemetryHandlerTest.cs (1)
61RequestUri = 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}"), 283RequestUri = new($"http://{expectedLogRecord.Host}/{expectedLogRecord.Path}"), 390RequestUri = new($"http://{expectedLogRecord.Host}/{expectedLogRecord.Path}"), 487RequestUri = new($"http://{expectedLogRecord.Host}/{expectedLogRecord.Path}"), 603RequestUri = new($"http://{expectedLogRecord.Host}/{expectedLogRecord.Path}"), 696RequestUri = new($"http://default-uri.com/foo/bar"), 739RequestUri = new($"http://default-uri.com/foo/bar"), 777RequestUri = new($"http://default-uri.com/foo/bar"), 821RequestUri = new($"http://default-uri.com/foo/bar"), 871RequestUri = new($"http://{expectedLogRecord.Host}/{expectedLogRecord.Path}"), 968RequestUri = new($"http://default-uri.com/foo/bar"),
Logging\HttpRequestReaderTest.cs (14)
86RequestUri = new Uri("https://default-uri.com/foo"), 216RequestUri = new Uri("https://default-uri.com/foo/bar/123"), 292RequestUri = new Uri($"https://{RequestedHost}/foo/bar/123"), 365RequestUri = new Uri("https://default-uri.com/foo/bar/123"), 425RequestUri = new Uri("https://default-uri.com/foo/bar/123"), 498RequestUri = new Uri("https://default-uri.com/foo/bar/123"), 567RequestUri = new Uri("https://default-uri.com/foo/bar/123"), 624var uri = new Uri($"https://{RequestedHost}/api/resource?{queryParamName}={queryParamValue}"); 659var uri = new Uri($"https://{RequestedHost}/api/resource?userId=12345"); 689var uri = new Uri($"https://{RequestedHost}/api/resource?userId=12345"); 725var uri = new Uri($"https://{RequestedHost}/api/resource?userId=12345&token=abc&other=not_logged"); 773var uri = new Uri($"https://{RequestedHost}/api/resource?userId=12345"); 814var uri = new Uri($"https://{RequestedHost}/api/resource?userId="); 860var uri = new Uri($"https://{RequestedHost}/api/orders/{pathParamValue}/details?{queryParamName}={queryParamValue}");
Logging\Internal\NoRemoteCallHandler.cs (1)
20var uri = new Uri(assemblyFileLocation).LocalPath;
Telemetry\HttpDependencyMetadataResolverTests.cs (2)
51RequestUri = new Uri(uriString: urlString) 71RequestUri = new Uri(uriString: urlString)
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)
15(EndPoint)new UriEndPoint(new Uri("https://microsoft.com")) 22(EndPoint)new UriEndPoint(new Uri("https://microsoft.com:8443"))
Microsoft.Extensions.ServiceDiscovery.Yarp (4)
ServiceDiscoveryDestinationResolver.cs (4)
57var originalUri = new Uri(originalConfig.Address); 63var healthUri = originalConfig.Health is { Length: > 0 } health ? new Uri(health) : null; 72uri = new Uri($"{scheme}://{addressString}"); 76uri = new Uri(addressString);
Microsoft.Gen.Logging.Generated.Tests (1)
LogPropertiesTests.cs (1)
95P5 = new Uri("https://www.microsoft.com"),
Microsoft.Maui (2)
Handlers\HybridWebView\HybridWebViewHandler.cs (1)
66 internal static readonly Uri AppOriginUri = new(AppOrigin);
Handlers\HybridWebView\HybridWebViewQueryStringHelper.cs (1)
35 var query = new Uri(url).Query;
Microsoft.Maui.Controls (2)
Shell\ShellUriHandler.cs (2)
160 return new Uri(uri); 794 return new Uri($"{Shell.RouteScheme}://{uri}");
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.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.NET.Build.Containers (3)
FallbackToHttpMessageHandler.cs (1)
85return new Uri($"container://{registryName}").Port != -1;
Registry\Registry.cs (2)
93this(new Uri($"https://{registryName}"), logger, registryAPI, settings) 97this(new Uri($"https://{registryName}"), logger, new RegistryApiFactory(mode), settings)
Microsoft.NET.Sdk.Publish.Tasks (6)
MsDeploy\CommonUtility.cs (1)
814Uri uri = new(physicalPath);
Tasks\MsDeploy\ImportParameterFile.cs (1)
190Uri sourceUri = new(ex.SourceUri);
Tasks\OneDeploy\DeploymentResponse.cs (1)
85Uri logUrl = new(deploymentResponse.LogUrl);
Tasks\Xdt\TransformXml.cs (1)
146Uri sourceUri = new(ex.SourceUri);
Tasks\ZipDeploy\DeploymentResponse.cs (1)
33Uri logUrl = new(deploymentResponse.LogUrl);
WebConfigTelemetry.cs (1)
108projectFullPathConstructed = Path.GetFullPath((new Uri(projectFullPathConstructed)).LocalPath);
Microsoft.SourceLink.AzureDevOpsServer.Git (1)
src\sourcelink\src\Common\GitProvider\GetSourceLinkUrlGitTask.cs (1)
269contentUri = new Uri($"{contentUri.Scheme}://{contentUri.Host}:{repoUri.Port}{contentUri.PathAndQuery}");
Microsoft.SourceLink.AzureRepos.Git (1)
src\sourcelink\src\Common\GitProvider\GetSourceLinkUrlGitTask.cs (1)
269contentUri = new Uri($"{contentUri.Scheme}://{contentUri.Host}:{repoUri.Port}{contentUri.PathAndQuery}");
Microsoft.SourceLink.Bitbucket.Git (1)
src\sourcelink\src\Common\GitProvider\GetSourceLinkUrlGitTask.cs (1)
269contentUri = new Uri($"{contentUri.Scheme}://{contentUri.Host}:{repoUri.Port}{contentUri.PathAndQuery}");
Microsoft.SourceLink.Gitea (1)
src\sourcelink\src\Common\GitProvider\GetSourceLinkUrlGitTask.cs (1)
269contentUri = new Uri($"{contentUri.Scheme}://{contentUri.Host}:{repoUri.Port}{contentUri.PathAndQuery}");
Microsoft.SourceLink.Gitee (1)
src\sourcelink\src\Common\GitProvider\GetSourceLinkUrlGitTask.cs (1)
269contentUri = new Uri($"{contentUri.Scheme}://{contentUri.Host}:{repoUri.Port}{contentUri.PathAndQuery}");
Microsoft.SourceLink.GitHub (1)
src\sourcelink\src\Common\GitProvider\GetSourceLinkUrlGitTask.cs (1)
269contentUri = new Uri($"{contentUri.Scheme}://{contentUri.Host}:{repoUri.Port}{contentUri.PathAndQuery}");
Microsoft.SourceLink.GitLab (1)
src\sourcelink\src\Common\GitProvider\GetSourceLinkUrlGitTask.cs (1)
269contentUri = new Uri($"{contentUri.Scheme}://{contentUri.Host}:{repoUri.Port}{contentUri.PathAndQuery}");
Microsoft.SourceLink.GitWeb (1)
src\sourcelink\src\Common\GitProvider\GetSourceLinkUrlGitTask.cs (1)
269contentUri = new Uri($"{contentUri.Scheme}://{contentUri.Host}:{repoUri.Port}{contentUri.PathAndQuery}");
Microsoft.TemplateSearch.Common (3)
Providers\NuGetMetadataSearchProvider.cs (3)
31new Uri("https://go.microsoft.com/fwlink/?linkid=2168770&clcid=0x409"), //v2 search cache 32new Uri("https://go.microsoft.com/fwlink/?linkid=2087906&clcid=0x409") //v1 search cache 57_searchMetadataUris = searchCacheUri.Select(s => new Uri(s)).ToArray();
Microsoft.TestPlatform.CommunicationUtilities (4)
Serialization\AttachmentConverters.cs (2)
25var uri = new Uri(element.GetProperty("Uri").GetString()!); 65var uri = new Uri(element.GetProperty("Uri").GetString()!);
Serialization\TestCaseConverter.cs (1)
78testCase.ExecutorUri = new Uri(propertyData!); break;
Serialization\TestCaseConverterV2.cs (1)
32testCase.ExecutorUri = new Uri(uri.GetString()!);
Microsoft.TestPlatform.CrossPlatEngine (1)
Client\TestLoggerManager.cs (1)
403loggerUri = new Uri(extension.Metadata.ExtensionUri);
Microsoft.TestPlatform.Utilities (1)
CodeCoverageDataAttachmentsHandler.cs (1)
34private static readonly Uri CodeCoverageDataCollectorUri = new(CoverageUri);
Microsoft.VisualStudio.TestPlatform.Common (3)
DataCollection\DataCollectorConfig.cs (1)
90return new Uri(typeUriAttribute.TypeUri);
ExtensionFramework\TestDiscoveryExtensionManager.cs (1)
155DefaultExecutorUri = new Uri(defaultExecutorUri);
ExtensionFramework\TestExtensionManager.cs (1)
147uri = new Uri(extension.Metadata.ExtensionUri);
Microsoft.VisualStudio.TestPlatform.ObjectModel (3)
DataCollector\DataCollectorSettings.cs (1)
160settings.Uri = new Uri(reader.Value);
Logger\LoggerSettings.cs (1)
145settings.Uri = new Uri(reader.Value);
TestCase.cs (1)
257ExecutorUri = value as Uri ?? new Uri((value as string)!);
Microsoft.Web.XmlTransform (1)
XmlTransformationLogger.cs (1)
226Uri uri = new Uri(fileName);
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"));
NuGet.Commands (1)
SignCommand\SignCommandRunner.cs (1)
175timestampProvider = new Rfc3161TimestampProvider(new Uri(timestamper));
NuGet.Common (1)
PathUtil\PathUtility.cs (1)
292Uri resultUri = new Uri(new Uri(basePath), new Uri(relativePath, UriKind.Relative));
NuGet.Configuration (1)
Proxy\WebProxy.cs (1)
102return new Uri(address);
NuGet.Credentials (1)
CredentialService.cs (1)
230return new Uri(uri.GetComponents(UriComponents.SchemeAndServer, UriFormat.SafeUnescaped));
NuGet.PackageManagement (2)
Utility\PackagesConfigLockFileUtility.cs (2)
57var projectUri = new Uri(msbuildProject.MSBuildProjectPath); 58var lockFileUri = new Uri(lockFileName);
NuGet.Packaging (10)
PackageCreation\Authoring\LicenseMetadata.cs (3)
20public static readonly Uri LicenseFileDeprecationUrl = new Uri("https://aka.ms/deprecateLicenseUrl"); 104return new Uri(GenerateLicenseServiceLink(License)); 114return new Uri(string.Format(CultureInfo.InvariantCulture, LicenseServiceLinkTemplate, license)).AbsoluteUri;
PackageCreation\Authoring\ManifestMetadata.cs (3)
121return new Uri(_iconUrl); 141return new Uri(_licenseUrl); 159return new Uri(_projectUrl);
PackageCreation\Authoring\PackageBuilder.cs (1)
29private static readonly Uri DefaultUri = new Uri("http://defaultcontainer/");
Rules\DefaultManifestValuesRule.cs (3)
14internal static readonly Uri SampleProjectUrl = new Uri("http://PROJECT_URL_HERE_OR_DELETE_THIS_LINE"); 15internal static readonly Uri SampleLicenseUrl = new Uri("http://LICENSE_URL_HERE_OR_DELETE_THIS_LINE"); 16internal static readonly Uri SampleIconUrl = new Uri("http://ICON_URL_HERE_OR_DELETE_THIS_LINE");
NuGet.Protocol (23)
Converters\ParserConstants.cs (8)
10public static readonly Uri PackageSearchResult = new Uri("http://schema.nuget.org/schema#PackageSearchResult"); 11public static readonly Uri PackageIdentity = new Uri("http://schema.nuget.org/schema#PackageIdentity"); 12public static readonly Uri PackageDescription = new Uri("http://schema.nuget.org/schema#PackageDescription"); 13public static readonly Uri PackageLicensing = new Uri("http://schema.nuget.org/schema#PackageLicensing"); 14public static readonly Uri PackageDependencies = new Uri("http://schema.nuget.org/schema#PackageDependencies"); 15public static readonly Uri DependencyGroup = new Uri("http://schema.nuget.org/schema#DependencyGroup"); 16public static readonly Uri Dependency = new Uri("http://schema.nuget.org/schema#Dependency"); 17public static readonly Uri Stats = new Uri("http://schema.nuget.org/schema#Stats");
DependencyInfo\ResolverMetadataClient.cs (1)
148PackageContent = new Uri(item.ContentUri)
HttpSource\TokenStore.cs (1)
67return new Uri(uri.GetComponents(UriComponents.SchemeAndServer, UriFormat.SafeUnescaped));
LegacyFeed\DependencyInfoResourceV2Feed.cs (1)
125new Uri(packageVersion.DownloadUrl),
LegacyFeed\V2FeedParser.cs (1)
304new Uri(packageInfo.DownloadUrl),
Providers\PackageUpdateResourceV3Provider.cs (1)
39if (!(new Uri(sourceUri)).IsFile)
Providers\SymbolPackageUpdateResourceV3Provider.cs (1)
36if (!(new Uri(sourceUri)).IsFile)
RemoteRepositories\HttpFileSystemBasedFindPackageByIdResource.cs (1)
84.Select(uri => uri.OriginalString.EndsWith("/", StringComparison.Ordinal) ? uri : new Uri(uri.OriginalString + "/"))
Resources\DownloadResourceV3.cs (2)
92downloadUri = new Uri(url); 104downloadUri = new Uri(blob["packageContent"].ToString());
Resources\OwnerDetailsUriTemplateResourceV3.cs (1)
58return new Uri(uriString);
Resources\PackageDetailsUriResourceV3.cs (1)
65return new Uri(uriString);
Resources\RegistrationResourceV3.cs (2)
60return new Uri(string.Format(CultureInfo.InvariantCulture, "{0}/{1}/index.json", 96return new Uri(string.Format(CultureInfo.InvariantCulture, "{0}/{1}/{2}.json", BaseUri.AbsoluteUri.TrimEnd('/'),
Resources\ReportAbuseResourceV3.cs (1)
48return new Uri(uriString);
Utility\OfflineFeedUtility.cs (1)
102pathUri = new Uri(path);
Pipelines.AppHost (1)
AppHost.cs (1)
283var fileShareUri = new Uri($"https://{storageAccountName}.file.core.windows.net/{fileShareName}");
PresentationBuildTasks (2)
src\wpf\src\Microsoft.DotNet.Wpf\src\PresentationFramework\System\Windows\Markup\ParserContext.cs (1)
460Uri sameUri = new Uri(serializedSafe);
src\wpf\src\Microsoft.DotNet.Wpf\src\Shared\MS\Internal\ResourceIDHelper.cs (1)
24Uri baseUri = new Uri("http://foo/");
PresentationCore (20)
MS\Internal\AppModel\SiteOfOriginContainer.cs (1)
42Uri siteOfOrigin = BaseUriHelper.FixFileUri(new Uri(System.AppDomain.CurrentDomain.BaseDirectory));
MS\Internal\FontCache\DWriteFactory.cs (1)
83return DWriteFactory.Instance.GetFontCollection(new Uri(localPath));
MS\Internal\FontCache\FamilyCollection.cs (1)
111Uri criticalSxSFontsLocation = new Uri(FamilyCollection.SxSFontsResourcePrefix);
MS\Internal\FontCache\FontCacheUtil.cs (5)
499fontSourceUri = new Uri(fontUri.GetComponents(Util.UriWithoutFragment, UriFormat.SafeUnescaped)); 512return new Uri(fontUri); 516string canonicalPathUri = new Uri(fontUri).GetComponents(UriComponents.AbsoluteUri, UriFormat.SafeUnescaped); 518return new Uri(canonicalPathUri + '#' + faceIndexString); 837throw new FileFormatException(new Uri(fileName));
MS\Internal\FontCache\FontSource.cs (1)
27return new FontSource(new Uri(uriString));
MS\Internal\FontCache\FontSourceCollection.cs (1)
23return new FontSourceCollection(new Uri(uriString));
MS\Internal\WpfWebRequestHelper.cs (1)
61uri = new Uri(uri.GetLeftPart(UriPartial.Path));
src\wpf\src\Microsoft.DotNet.Wpf\src\Shared\MS\Internal\MimeTypeMapper.cs (1)
28uri = new Uri("http://foo/bar/");
src\wpf\src\Microsoft.DotNet.Wpf\src\Shared\MS\Internal\SecurityHelper.cs (1)
71appBase = new Uri(domain.BaseDirectory);
src\wpf\src\Microsoft.DotNet.Wpf\src\Shared\MS\Win32\WinInet.cs (1)
46return new Uri(icci.CachePath);
System\Windows\Media\ColorContext.cs (1)
567profilePath = new Uri(Path.Combine(buffer.ToString(), profilePathString));
System\Windows\Media\GlyphTypeface.cs (1)
96Uri typefaceSource = new Uri(uriPath);
System\Windows\Navigation\BaseUriHelper.cs (4)
25private static readonly Uri _siteOfOriginBaseUri = PackUriHelper.Create(new Uri(SOOBASE)); 27private static readonly Uri _packAppBaseUri = PackUriHelper.Create(new Uri(APPBASE)); 352return (new Uri(sUri.GetComponents(UriComponents.SchemeAndServer, UriFormat.UriEscaped))).MakeRelativeUri(sUri); 385return new Uri(uri.AbsoluteUri);
PresentationFramework (18)
MS\Internal\Controls\WebBrowserEvent.cs (3)
58Uri source = String.IsNullOrEmpty(urlString) ? null : new Uri(urlString); 197Uri source = string.IsNullOrEmpty(urlString) ? null : new Uri(urlString); 225Uri source = string.IsNullOrEmpty(urlString) ? null : new Uri(urlString);
MS\Internal\Utility\BindUriHelper.cs (1)
23private static Uri placeboBase = new Uri(PLACEBOURI);
System\Windows\Annotations\Storage\XmlStreamStore.cs (3)
48_predefinedNamespaces.Add(new Uri(AnnotationXmlConstants.Namespaces.CoreSchemaNamespace), null); 49_predefinedNamespaces.Add(new Uri(AnnotationXmlConstants.Namespaces.BaseSchemaNamespace), null); 50_predefinedNamespaces.Add(new Uri(XamlReaderHelper.DefaultNamespaceURI), null);
System\Windows\Controls\WebBrowser.cs (3)
144Uri uri = new Uri(source); 380return (string.IsNullOrEmpty(urlString) ? null : new Uri(urlString)); 861source = new Uri(AboutBlankUriString);
System\Windows\Documents\FixedPage.cs (1)
629workuri = 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)
1535fileUri = new Uri(new Uri($"{Directory.GetCurrentDirectory()}/"), uri); 1611return new Uri(tmpFilePath);
System\Windows\Markup\ParserContext.cs (2)
132BaseUri = new Uri( xmlReader.BaseURI ); 460Uri sameUri = new Uri(serializedSafe);
System\Windows\Markup\XamlReader.cs (2)
338parserContext.BaseUri = new Uri(reader.BaseURI); 880parserContext.BaseUri = new Uri(reader.BaseURI);
PresentationUI (6)
MS\Internal\Documents\Application\AddressUtility.cs (1)
67return new Uri(string.Format(
MS\Internal\Documents\Application\DocumentStream.cs (1)
827return new Uri(temp);
MS\Internal\Documents\Application\FilePresentation.cs (1)
92Uri file = new Uri(filePath);
MS\Internal\Documents\RightsManagementManager.cs (1)
639NavigationHelper.NavigateToExternalUri(new Uri(rmClientInstallLocation));
MS\Internal\Documents\RMPublishingDialog.cs (2)
346newUri = new Uri(path); 389templateList.Add(new Uri(file.FullName));
Publishers.Frontend (1)
Program.cs (1)
9builder.Services.AddHttpClient<ApiClient>(c => c.BaseAddress = new("http://api"));
ReachFramework (5)
Packaging\XpsDocument.cs (1)
167Uri = new Uri( new Uri(Directory.GetCurrentDirectory()+"/"), this.Uri );
Packaging\XpsManager.cs (2)
118_uri = new Uri( new Uri(Directory.GetCurrentDirectory()+"/"), path ); 1507Uri dummyAbsoluteUri = new Uri("http://dummy");
Serialization\ImageSourceTypeConverter.cs (1)
229Uri sourceUri = new Uri(decoder.ToString());
SerializerFactory\XpsSerializerFactory.cs (1)
67return new Uri(SR.XpsSerializerFactory_ManufacturerWebsite);
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)
188new EndpointAddress(new Uri(Endpoints.Https_WindowsAuth_Address), new SpnEndpointIdentity(spn))); 239new Uri(Endpoints.Https_WindowsAuth_Address), 283new Uri(Endpoints.Https_WindowsAuth_Address), 336new Uri(Endpoints.Https_WindowsAuth_Address), 386new Uri(Endpoints.Https_WindowsAuth_Address),
Negotiate\NegotiateStream_Tcp_Tests.4.1.0.cs (4)
161new Uri(Endpoints.Tcp_DefaultBinding_Address), 201new Uri(Endpoints.Tcp_DefaultBinding_Address), 252new Uri(Endpoints.Tcp_DefaultBinding_Address), 300new Uri(Endpoints.Tcp_DefaultBinding_Address),
Tcp\ClientCredentialTypeCertificateCanonicalNameTests.4.1.0.cs (4)
33var localhostEndpointUri = new Uri(Endpoints.Tcp_ClientCredentialType_Certificate_With_CanonicalName_Localhost_Address); 105var domainNameEndpointUri = new Uri(Endpoints.Tcp_ClientCredentialType_Certificate_With_CanonicalName_DomainName_Address); 183var domainNameEndpointUri = new Uri(Endpoints.Tcp_ClientCredentialType_Certificate_With_CanonicalName_DomainName_Address); 187var 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( 241endpointAddress = 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"));
Shared.Tests (3)
ImageDataUri\ImageDataUri.cs (2)
22return new Uri($"data:image/png;base64,{Convert.ToBase64String(ms.ToArray())}"); 31return new Uri($"data:application/pdf;base64,{Convert.ToBase64String(builder.Build())}");
JsonSchemaExporter\TestTypes.cs (1)
99yield return new TestData<Uri>(new("http://example.com"), """{"type":["string","null"], "format":"uri"}""");
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.Diagnostics.EventLog (1)
System\Diagnostics\Reader\ProviderMetadata.cs (1)
123return new Uri(helpLinkStr);
System.DirectoryServices.Protocols (5)
System\DirectoryServices\Protocols\common\DirectoryResponse.cs (1)
59tempReferral[i] = new Uri(_directoryReferral[i].AbsoluteUri);
System\DirectoryServices\Protocols\common\SearchResults.cs (1)
26tempUri[i] = new Uri(_resultReferences[i].AbsoluteUri);
System\DirectoryServices\Protocols\ldap\LdapConnection.cs (2)
1641responseReferral[j] = new Uri((string)referralList[j]); 1844uris[i] = new Uri((string)referralList[i]);
System\DirectoryServices\Protocols\ldap\LdapSessionOptions.cs (1)
637responseReferral[j] = new Uri((string)referralList[j]);
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)
570private 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)); 309Uri packageUri = new Uri(Uri.UnescapeDataString(hostAndPort));
System.Net.Http (1)
System\Net\Http\SocketsHttpHandler\HttpEnvironmentProxy.cs (1)
239uri = new Uri($"{uriSpan[tokens[0]]}//:@{uriSpan[tokens[2]]}");
System.Net.Http.WinHttpHandler (1)
System\Net\Http\WinHttpRequestCallback.cs (1)
101var redirectUri = new Uri(Marshal.PtrToStringUni(statusInformation)!);
System.Net.HttpListener (1)
System\Net\ServiceNameStore.cs (1)
222Uri hostUri = new Uri(uriPrefix);
System.Net.Mail (1)
System\Net\Mail\SmtpClient.cs (1)
267return _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\runtime\src\libraries\Common\src\System\Net\Http\X509ResourceClient.cs (1)
184Uri 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)
289var proxyUri = new Uri(address);
System.Private.DataContractSerialization (1)
System\Runtime\Serialization\Globals.cs (1)
122internal static Uri DataContractXsdBaseNamespaceUri => field ??= new Uri(DataContractXsdBaseNamespace);
System.Private.Uri (2)
System\UriBuilder.cs (2)
36_uri = new Uri(Uri.UriSchemeHttp + Uri.SchemeDelimiter + uri); 265_uri = new Uri(ToString());
System.Private.Xml (3)
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)
87internal static Uri DataContractXsdBaseNamespaceUri => field ??= new Uri(DataContractXsdBaseNamespace);
System.Security.Cryptography (1)
src\runtime\src\libraries\Common\src\System\Net\Http\X509ResourceClient.cs (1)
184Uri 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 (1)
System\ServiceModel\Channels\HttpChannelFactory.cs (1)
1232_httpRequestMessage.Headers.Referrer = new Uri(value);
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.ServiceModel.Primitives (10)
System\IdentityModel\Claims\X509CertificateClaimSet.cs (1)
223claims.Add(Claim.CreateUriClaim(new Uri(value)));
System\ServiceModel\Channels\Addressing.cs (2)
477return new Uri(toString); 794internal static readonly Uri ReplyRelationshipType = new Uri(Addressing10Strings.ReplyRelationship);
System\ServiceModel\Channels\AddressingVersion.cs (2)
38AnonymousUri = new Uri(anonymous); 43_noneUri = new Uri(none);
System\ServiceModel\Channels\BinaryMessageEncoder.cs (1)
1428_toHeader = ToHeader.Create(new Uri(toString.Value), _messageVersion.Addressing);
System\ServiceModel\Channels\Message.cs (1)
2225uri = new Uri(uriString);
System\ServiceModel\EndpointAddress.cs (3)
94Uri u = new Uri(uri); 219s_anonymousUri = new Uri(AddressingStrings.AnonymousUri); 232s_noneUri = new Uri(AddressingStrings.NoneUri);
System.Speech (7)
Internal\SrgsCompiler\SRGSCompiler.cs (1)
46uri = new Uri(xmlReaders[iReader].BaseURI);
Internal\SrgsParser\XmlParser.cs (2)
34uri = new Uri(_xmlTextReader.BaseURI); 379grammar.XmlBase = new Uri(reader.Value);
Recognition\DictationGrammar.cs (1)
53private static readonly Uri s_defaultDictationUri = new("grammar:dictation");
Recognition\SrgsGrammar\SrgsDocument.cs (1)
320_baseUri = new Uri(srgsGrammar.BaseURI);
Recognition\SrgsGrammar\SrgsRuleRef.cs (2)
120public static readonly SrgsRuleRef Dictation = new(new Uri("grammar:dictation")); 121public static readonly SrgsRuleRef MnemonicSpelling = new(new Uri("grammar:dictation#spelling"));
System.Windows.Extensions (2)
System\Media\SoundPlayer.cs (2)
352result = new Uri(partialUri); 364result = new Uri(Path.GetFullPath(partialUri));
System.Windows.Forms (15)
System\Windows\Forms\Controls\PictureBox\PictureBox.cs (2)
156return new Uri(path); 162return 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)
237Uri url = new(hrefString); 289Url = new Uri("about:blank"); 579return 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.Xaml (3)
System\Xaml\InfosetObjects\XamlObjectWriter.cs (2)
1654ctx.BaseUri = new Uri((string)value); 2097ctx.BaseUri = new Uri((string)value);
System\Xaml\InfosetObjects\XamlXmlReader.cs (1)
187_mergedSettings.BaseUri = new Uri(myXmlReader.BaseURI);
vstest.console (4)
Processors\Utilities\LoggerUtilities.cs (1)
39var loggerUri = new Uri(loggerIdentifier);
TestPlatformHelpers\TestRequestManager.cs (3)
1173Uri = new Uri(ConsoleLogger.ExtensionUri), 1199Uri = new Uri(ConsoleLogger.ExtensionUri) 1234Uri = new Uri(MSBuildLogger.ExtensionUri)
vstest.console.arm64 (4)
src\vstest\src\vstest.console\Processors\Utilities\LoggerUtilities.cs (1)
39var loggerUri = new Uri(loggerIdentifier);
src\vstest\src\vstest.console\TestPlatformHelpers\TestRequestManager.cs (3)
1173Uri = new Uri(ConsoleLogger.ExtensionUri), 1199Uri = new Uri(ConsoleLogger.ExtensionUri) 1234Uri = new Uri(MSBuildLogger.ExtensionUri)
WaitFor.Frontend (1)
Program.cs (1)
9builder.Services.AddHttpClient<ApiClient>(c => c.BaseAddress = new("http://api"));
WebFrontEnd (3)
Program.cs (3)
10builder.Services.AddHttpClient("gateway", client => client.BaseAddress = new Uri("https+http://gateway")); 12builder.Services.AddHttpClient("nuget", client => client.BaseAddress = new Uri("https://nuget")); 17client.BaseAddress = new Uri(builder.Configuration["EXTERNAL_SERVICE_URL"]
Yarp.Frontend (1)
Program.cs (1)
11client.BaseAddress = new Uri("https+http://gateway");