1 type derived from Uri
System.IO.Packaging (1)
System\IO\Packaging\PackUriHelper.cs (1)
604internal sealed class ValidatedPartUri : Uri, IComparable<ValidatedPartUri>, IEquatable<ValidatedPartUri>
917 instantiations of Uri
aspire (5)
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;
src\Shared\IConfigurationExtensions.cs (2)
118return new Uri(uri, UriKind.Absolute); 154.Select(url => new Uri(url, UriKind.Absolute))
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 (12)
Components\Dialogs\McpServerDialog.razor.cs (2)
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 (2)
133var ghcpInfoAddress = new Uri(_endpoint, "/ghcp_info"); 203endpoint = new Uri(url);
Model\DebugSessionHelpers.cs (1)
67debugSessionUri = new Uri($"{scheme}://localhost:{debugSession.Port}");
Model\TargetLocationInterceptor.cs (3)
16var uri = new Uri(originalTargetLocation, UriKind.RelativeOrAbsolute); 22var targetBaseUri = new Uri(uri.GetLeftPart(UriPartial.Authority)); 23if (targetBaseUri != new Uri(appBaseUri))
src\Shared\IConfigurationExtensions.cs (2)
118return new Uri(uri, UriKind.Absolute); 154.Select(url => new Uri(url, UriKind.Absolute))
Aspire.Dashboard.Components.Tests (1)
Pages\MetricsTests.cs (1)
132loadRedirect = new Uri(a.Location);
Aspire.Dashboard.Tests (71)
Integration\FrontendBrowserTokenAuthTests.cs (11)
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")!); 223var uri = new Uri((string)LogTestHelpers.GetValue(w, "DashboardLoginUrl")!, UriKind.Absolute); 253var uri = new Uri((string)LogTestHelpers.GetValue(loginLinkLog, "DashboardLoginUrl")!, UriKind.Absolute);
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 (16)
ApplicationModel\McpServerEndpointAnnotation.cs (2)
56return new Uri(baseUrl, UriKind.Absolute); 66return new Uri(combined, UriKind.Absolute);
Dcp\DcpKubernetesClient.cs (2)
99RequestUri = new Uri(this.BaseUri, ExecutionDocumentPath) 125RequestUri = new Uri(this.BaseUri, ExecutionDocumentPath)
Devcontainers\Codespaces\CodespacesResourceUrlRewriterService.cs (1)
34var uri = new Uri(originalUrlSnapshot.Url);
Devcontainers\Codespaces\CodespacesUrlRewriter.cs (1)
19return RewriteUrl(new Uri(url));
ExternalServiceBuilderExtensions.cs (2)
241targetUri = new Uri(uri, path); 298uri = new Uri(uri, _path);
McpServerResourceBuilderExtensions.cs (2)
96return new Uri(baseUrl, UriKind.Absolute); 106return new Uri(combined, UriKind.Absolute);
ProjectResourceBuilderExtensions.cs (2)
639var baseUri = new Uri(url.Url); 640url.Url = (new Uri(baseUri, launchUri)).ToString();
ResourceBuilderExtensions.cs (2)
2104var baseUri = new Uri(endpoint.Url, UriKind.Absolute); 2105uri = new Uri(baseUri, path);
src\Shared\IConfigurationExtensions.cs (2)
118return new Uri(uri, UriKind.Absolute); 154.Select(url => new Uri(url, UriKind.Absolute))
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 (3)
GitHubModelsHealthCheck.cs (1)
38using var request = new HttpRequestMessage(HttpMethod.Post, new Uri($"{builder["Endpoint"]}/chat/completions"));
src\Shared\IConfigurationExtensions.cs (2)
118return new Uri(uri, UriKind.Absolute); 154.Select(url => new Uri(url, UriKind.Absolute))
Aspire.Hosting.Maui (2)
src\Shared\IConfigurationExtensions.cs (2)
118return new Uri(uri, UriKind.Absolute); 154.Select(url => new Uri(url, UriKind.Absolute))
Aspire.Hosting.Nats.Tests (1)
NatsFunctionalTests.cs (1)
131? connectionString!.Replace(new Uri(connectionString).UserInfo, null)
Aspire.Hosting.OpenAI (5)
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}"));
src\Shared\IConfigurationExtensions.cs (2)
118return new Uri(uri, UriKind.Absolute); 154.Select(url => new Uri(url, UriKind.Absolute))
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 (16)
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 (5)
32var uri = new Uri("https://nuget.org/"); 76var relativeUri = new Uri("/relative", UriKind.Relative); 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 (3)
528Assert.Throws<InvalidOperationException>(() => builder.AddProject<ProjectA>("projecta").WithReference("petstore", new Uri("petstore.swagger.io", UriKind.Relative))); 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.Microsoft.Extensions.Configuration.AzureAppConfiguration.Tests (3)
AspireAppConfigurationExtensionsTest.cs (3)
18var endpoint = new Uri(ConformanceTests.Endpoint); 73settings.Endpoint = new Uri("https://unused.azconfig.io/"); 86var endpoint = new Uri("https://aspiretests.azconfig.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)
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));
Binding.WS.TransportWithMessageCredentialSecurity.IntegrationTests (11)
BasicHttpsTransportWithMessageCredentialSecurityTests.cs (1)
28endpointAddress = new EndpointAddress(new Uri(Endpoints.BasicHttpsBinding_SecModeTransWithMessCred_ClientCredTypeCert));
BasicHttpTransportWithMessageCredentialSecurityTests.cs (4)
29endpointAddress = new EndpointAddress(new Uri(Endpoints.BasicHttps_SecModeTransWithMessCred_ClientCredTypeCert)); 80endpointAddress = new EndpointAddress(new Uri(Endpoints.BasicHttps_SecModeTransWithMessCred_ClientCredTypeUserName + $"/{Enum.GetName(typeof(TransferMode), transferMode)}")); 129endpointAddress = new EndpointAddress(new Uri(Endpoints.Https_SecModeTransWithMessCred_ClientCredTypeUserName)); 182endpointAddress = new EndpointAddress(new Uri(Endpoints.BasicHttps_SecModeTransWithMessCred_ClientCredTypeUserName + $"/{Enum.GetName(typeof(TransferMode), transferMode)}"));
WS2007HttpTransportWithMessageCredentialsSecurityTests.cs (2)
33endpointAddress = new EndpointAddress(new Uri(Endpoints.Https2007_SecModeTransWithMessCred_ClientCredTypeCert)); 81endpointAddress = new EndpointAddress(new Uri(Endpoints.Https2007_SecModeTransWithMessCred_ClientCredTypeUserName));
WSHttpTransportWithMessageCredentialSecurityTests.cs (2)
34endpointAddress = new EndpointAddress(new Uri(Endpoints.Https_SecModeTransWithMessCred_ClientCredTypeCert)); 82endpointAddress = new EndpointAddress(new Uri(Endpoints.Https_SecModeTransWithMessCred_ClientCredTypeUserName));
WSNetTcpTransportWithMessageCredentialSecurityTests.cs (2)
36endpointAddress = new EndpointAddress(new Uri(Endpoints.Tcp_SecModeTransWithMessCred_ClientCredTypeCert)); 85endpointAddress = new EndpointAddress(new Uri(Endpoints.Tcp_SecModeTransWithMessCred_ClientCredTypeUserName));
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-openapi (1)
Commands\BaseCommand.cs (1)
382var uri = new Uri(url);
dotnet-svcutil-lib (47)
CommandProcessorOptions.cs (1)
746this.Inputs.Insert(idx, new Uri(file));
FrameworkFork\Microsoft.Xml\Xml\Core\XmlValidatingReaderImpl.cs (1)
1067_validator.BaseUri = (resolver == null) ? new Uri(_outerReader.BaseURI, UriKind.RelativeOrAbsolute) : resolver.ResolveUri(null, _outerReader.BaseURI);
FrameworkFork\Microsoft.Xml\Xml\Resolvers\XmlPreloadedResolver.cs (4)
207return new Uri(relativeUri, UriKind.Relative); 217return new Uri(relativeUri, UriKind.Relative); 379_mappings.Add(new Uri(dtdInfo.publicId, UriKind.RelativeOrAbsolute), dtdInfo); 380_mappings.Add(new Uri(dtdInfo.systemId, UriKind.RelativeOrAbsolute), dtdInfo);
FrameworkFork\Microsoft.Xml\Xml\schema\Parser.cs (1)
89_schema.BaseUri = new Uri(reader.BaseURI, UriKind.RelativeOrAbsolute);
FrameworkFork\Microsoft.Xml\Xml\schema\ParserAsync.cs (1)
54_schema.BaseUri = new Uri(reader.BaseURI, UriKind.RelativeOrAbsolute);
FrameworkFork\Microsoft.Xml\Xml\schema\XmlSchemaSet.cs (3)
374Uri schemaUri = new Uri(schemaDocument.BaseURI, UriKind.RelativeOrAbsolute); 951if (FindSchemaByNSAndUrl(new Uri(reader.BaseURI, UriKind.RelativeOrAbsolute), targetNamespace, null) != null) 963if (IsSchemaLoaded(new Uri(reader.BaseURI, UriKind.RelativeOrAbsolute), targetNamespace, out schema))
FrameworkFork\Microsoft.Xml\Xml\XmlResolver.cs (3)
46Uri uri = new Uri(relativeUri, UriKind.RelativeOrAbsolute); 49uri = new Uri(Path.GetFullPath(relativeUri)); 64return new Uri(baseUri, relativeUri);
FrameworkFork\System.Runtime.Serialization\System\Runtime\Serialization\DataContract.cs (1)
1788return new Uri(Globals.DataContractXsdBaseNamespaceUri, clrNs).AbsoluteUri;
FrameworkFork\System.Runtime.Serialization\System\Runtime\Serialization\Globals.cs (1)
1000s_dataContractXsdBaseNamespaceUri = new Uri(DataContractXsdBaseNamespace);
FrameworkFork\System.Runtime.Serialization\System\Runtime\Serialization\XmlReaderDelegator.cs (1)
579return new Uri(str, UriKind.RelativeOrAbsolute);
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\Channels\TransportSecurityHelpers.cs (1)
293fullUri = new Uri(baseAddress, relativeAddress);
FrameworkFork\System.ServiceModel\System\ServiceModel\Description\MetadataExchangeClient.cs (2)
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);
Metadata\MetadataDocumentLoader.cs (2)
107this.metadataSourceFiles.AddRange(fileInfoList.Select(fi => new Uri(fi.FullName, UriKind.Absolute))); 148this.metadataSourceFiles.AddRange(fileInfoList.Select(fi => new Uri(fi.FullName, UriKind.Absolute)));
Metadata\MetadataFileNameManager.cs (2)
225var baseUri = new Uri(baseUrl, UriKind.RelativeOrAbsolute); 230return (new Uri(baseUri, relUrl)).GetComponents(UriComponents.AbsoluteUri, UriFormat.SafeUnescaped);
Shared\Options\OptionValueParser.cs (1)
52value = CreateValue<Uri>(() => new Uri(stringValue, UriKind.RelativeOrAbsolute), option, stringValue);
Shared\Options\UpdateOptions.cs (1)
103this.Inputs[idx] = new Uri(relPath, UriKind.Relative);
dotnet-svcutil-lib.Tests (1)
GlobalToolTests.cs (1)
203options.Inputs.Add(new Uri(url));
Infrastructure.Common (1)
ServiceUtilHelper.cs (1)
566return new Uri(baseUri, $"{TestHostUtilitiesService}/{resource}").ToString();
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.Components (2)
NavigationManager.cs (2)
86_baseUri = new Uri(value!, UriKind.Absolute); 315return new Uri(_baseUri!, relativeUri);
Microsoft.AspNetCore.Components.Web (1)
HtmlRendering\StaticHtmlRenderer.HtmlWriting.cs (1)
374return new Uri(navigationManager.Uri, UriKind.Absolute).PathAndQuery;
Microsoft.AspNetCore.Components.WebAssembly.Authentication (1)
Services\AuthorizationMessageHandler.cs (1)
107var uris = authorizedUrls.Select(uri => new Uri(uri, UriKind.Absolute)).ToArray();
Microsoft.AspNetCore.Components.WebAssembly.Server (7)
TargetPickerUi.cs (6)
368var underlyingV8Endpoint = new Uri(tabToDebug.WebSocketDebuggerUrl); 369var proxyEndpoint = new Uri(_debugProxyUrl); 370var devToolsUrlAbsolute = new Uri(new Uri(_browserHost), relativeUri: NormalizeDevtoolsFrontendUrl(tabToDebug.DevtoolsFrontendUrl)); 400var debuggerPort = new Uri(_browserHost).Port; 426var debuggerPort = new Uri(_browserHost).Port;
WebAssemblyNetDebugProxyAppBuilderExtensions.cs (1)
31browserUrl = new Uri(browserParam);
Microsoft.AspNetCore.Components.WebView (3)
StaticContentProvider.cs (1)
25var fileUri = new Uri(requestUri);
WebViewManager.cs (2)
69=> NavigateCore(new Uri(_appBaseUri, url)); 246=> uri.AbsoluteUri.EndsWith('/') ? uri : new Uri(uri.AbsoluteUri + '/');
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.Cors (1)
Infrastructure\CorsPolicyExtensions.cs (1)
32return new Uri(origin.Replace(_WildcardSubdomain, string.Empty), UriKind.Absolute);
Microsoft.AspNetCore.Http.Connections.Client (1)
HttpConnection.cs (1)
339uri = new Uri(negotiationResponse.Url);
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.Mvc.Testing (4)
Handlers\RedirectHandler.cs (1)
144location = new Uri(requestUri, location);
WebApplicationFactory.cs (2)
381_webHostAddress = new Uri(serverAddressFeature.Addresses.Last()); 798client.BaseAddress = new Uri("http://localhost");
WebApplicationFactoryClientOptions.cs (1)
17internal static readonly Uri DefaultBaseAddres = new Uri("http://localhost");
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.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.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.TestHost (2)
TestServer.cs (1)
112public Uri BaseAddress { get; set; } = new Uri("http://localhost/");
TestServerOptions.cs (1)
26public Uri BaseAddress { get; set; } = new Uri("http://localhost/");
Microsoft.AspNetCore.Testing (1)
ServiceFakesHostExtensions.cs (1)
79.Select(x => new Uri(x.Replace("[::]", "localhost", StringComparison.OrdinalIgnoreCase)));
Microsoft.Build (3)
Logging\TerminalLogger\TerminalLogger.cs (2)
645logger.OutputFilePaths.Select(outputPath => $"{AnsiCodes.LinkPrefix}{new Uri(outputPath).AbsoluteUri}{AnsiCodes.LinkInfix}{outputPath}{AnsiCodes.LinkSuffix}")); 1407private 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 (7)
BootstrapperUtil\Util.cs (1)
53var uri = new Uri(path);
GetSDKReferenceFiles.cs (1)
1098var codeBase = new Uri(currentAssembly);
ManifestUtil\PathUtil.cs (4)
32Uri uri = new Uri(url); 53Uri u = new Uri(resolvedPath); 128Uri u = new Uri(path, UriKind.RelativeOrAbsolute); 223var u = new Uri(path);
SignFile.cs (1)
61TimestampUrl == null ? null : new Uri(TimestampUrl),
Microsoft.Build.Tasks.Git (3)
GitOperations.cs (2)
176return new Uri("file:///" + url + "/"); 199var rootUri = new Uri(root.EndWithSeparator('/'));
src\sourcelink\src\Common\Utilities\UriUtilities.cs (1)
18=> new Uri("unknown://" + uri.GetAuthority(), UriKind.Absolute).Port;
Microsoft.CodeAnalysis (2)
CommandLine\SarifErrorLogger.cs (2)
123private static readonly Uri s_fileRoot = new Uri("file:///"); 161return s_fileRoot.MakeRelativeUri(new Uri(s_fileRoot, uri)).ToString();
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.Build.Tasks.VisualStudio (2)
Vsix\FinalizeInsertionVsixFile.cs (2)
47var part = package.GetPart(new Uri(VsixManifestPartName, UriKind.Relative)); 110var part = package.GetPart(new Uri("/manifest.json", UriKind.Relative));
Microsoft.DotNet.Cli.Telemetry (1)
Implementation\AzureMonitorConnectionString.cs (1)
21public Uri TrackUri { get; } = new Uri(IngestionEndpoint, "v2.1/track");
Microsoft.DotNet.Cli.Utils (3)
PathUtility.cs (3)
240Uri resultUri = new(new Uri(basePath), new Uri(relativePath, UriKind.Relative));
Microsoft.DotNet.HotReload.Watch (2)
Browser\BrowserLauncher.cs (1)
58Uri.TryCreate(outputLaunchUrl, UriKind.Absolute, out var launchUri) ? new Uri(launchUri, profileLaunchUrl).ToString() :
src\sdk\src\Dotnet.Watch\HotReloadClient\Web\KestrelWebSocketServer.cs (1)
75var uri = new Uri(httpUrl, UriKind.Absolute);
Microsoft.DotNet.HotReload.WebAssembly.Browser (1)
WebAssemblyHotReload.cs (1)
91BaseAddress = new Uri(baseUri, UriKind.Absolute)
Microsoft.Extensions.AI.Abstractions (1)
Contents\UriContent.cs (1)
40: this(new Uri(Throw.IfNull(uri)), mediaType)
Microsoft.Extensions.AI.Abstractions.Tests (25)
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 (7)
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/"))); 196Assert.Throws<ArgumentException>("serverUrl", () => new HostedMcpServerTool("name", new Uri("/api/mcp", UriKind.Relative)));
Microsoft.Extensions.AI.Evaluation.Integration.Tests (4)
Setup.cs (2)
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 (4)
AzureStorage\AzureResponseCacheTests.cs (2)
24new Uri( 25baseUri: new Uri(Settings.Current.StorageAccountEndpoint),
AzureStorage\AzureResultStoreTests.cs (2)
24new Uri( 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 (29)
IntegrationTestHelpers.cs (2)
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)
29return builder.FromUri(string.Empty, new Uri(uri)); 51return builder.FromUri(modelName, new Uri(uri)); 91return builder.FromUri(string.Empty, new Uri(uri), period); 116return 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 (15)
ResourceDictionary.cs (3)
438 return new Uri($"{value};assembly={assembly.GetName().Name}", UriKind.Relative); 446 ? new Uri($"{GetResourcePathUriScheme}{uri.OriginalString}", UriKind.Absolute) 447 : new Uri($"{GetResourcePathUriScheme}/{rootTargetPath}/../{uri.OriginalString}", UriKind.Absolute);
Routing.cs (1)
245 var uri = new Uri(route, UriKind.RelativeOrAbsolute);
Shell\ShellNavigationState.cs (2)
45 uri = new Uri($"/{uri.PathAndQuery}", UriKind.Relative); 101 return new Uri(string.Join(Routing.PathSeparator, toKeep), UriKind.Relative);
Shell\ShellUriHandler.cs (8)
71 var returnValue = ConvertToStandardFormat("scheme", "host", null, new Uri(result, UriKind.Relative)); 72 return new Uri(FormatUri(returnValue.PathAndQuery), UriKind.Relative); 77 return new Uri(FormatUri(path.OriginalString), UriKind.Absolute); 80 return new Uri(FormatUri(path.OriginalString), UriKind.Relative); 96 return new Uri(path, UriKind.Relative); 101 return new Uri(path, UriKind.Relative); 160 return new Uri(uri); 794 return new Uri($"{Shell.RouteScheme}://{uri}");
UriTypeConverter.cs (1)
23 return new Uri(strValue, UriKind.RelativeOrAbsolute);
Microsoft.Maui.Controls.Build.Tasks (2)
CompiledConverters\RDSourceTypeConverter.cs (1)
43 var uri = new Uri(value, UriKind.Relative);
CompiledValueProviders\StyleSheetProvider.cs (1)
56 var uri = new Uri(source, UriKind.Relative);
Microsoft.Maui.Controls.Xaml (4)
ApplyPropertiesVisitor.cs (1)
379 VisualDiagnostics.RegisterSourceInfo(target, new Uri($"{path};assembly={assemblyName}", UriKind.Relative), lineInfo.LineNumber, lineInfo.LinePosition);
CreateValuesVisitor.cs (2)
173 VisualDiagnostics.RegisterSourceInfo(value, new Uri($"{path};assembly={assemblyName}", UriKind.Relative), ((IXmlLineInfo)node).LineNumber, ((IXmlLineInfo)node).LinePosition); 192 VisualDiagnostics.RegisterSourceInfo(rnode.Root, new Uri($"{path};assembly={assemblyName}", UriKind.Relative), ((IXmlLineInfo)node).LineNumber, ((IXmlLineInfo)node).LinePosition);
ResourceDictionaryHelpers.cs (1)
32 var resourcePath = ResourceDictionary.RDSourceTypeConverter.GetResourcePath(new Uri(value, UriKind.Relative), rootTargetPath);
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\e4e90a0f3c9b109a\LearningRateSchedulingCifarResnetTransferLearning.cs (1)
306var response = await client.GetStreamAsync(new Uri($"{url}")).ConfigureAwait(false);
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\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 (13)
FallbackToHttpMessageHandler.cs (1)
85return new Uri($"container://{registryName}").Port != -1;
Registry\DefaultBlobOperations.cs (2)
33using HttpResponseMessage response = await _client.SendAsync(new HttpRequestMessage(HttpMethod.Head, new Uri(_baseUri, $"/v2/{repositoryName}/blobs/{digest}")), cancellationToken).ConfigureAwait(false); 65using HttpRequestMessage request = new HttpRequestMessage(HttpMethod.Get, new Uri(_baseUri, $"/v2/{repositoryName}/blobs/{digest}")).AcceptManifestFormats();
Registry\DefaultBlobUploadOperations.cs (5)
28UriBuilder builder = new(uploadUri.IsAbsoluteUri ? uploadUri : new Uri(_baseUri, uploadUri)); 45return await _client.GetAsync(uploadUri.IsAbsoluteUri ? uploadUri : new Uri(_baseUri, uploadUri), cancellationToken).ConfigureAwait(false); 51Uri startUploadUri = new(_baseUri, $"/v2/{repositoryName}/blobs/uploads/"); 69HttpResponseMessage pushResponse = await _client.PostAsync(new Uri(_baseUri, $"/v2/{destinationRepository}/blobs/uploads/?mount={digest}&from={sourceRepository}"), content: null, cancellationToken).ConfigureAwait(false); 96Uri finalUri = uploadUri.IsAbsoluteUri ? uploadUri : new Uri(_baseUri, uploadUri);
Registry\DefaultManifestOperations.cs (2)
30using HttpRequestMessage request = new HttpRequestMessage(HttpMethod.Get, new Uri(_baseUri, $"/v2/{repositoryName}/manifests/{reference}")).AcceptManifestFormats(); 46HttpResponseMessage putResponse = await _client.PutAsync(new Uri(_baseUri, $"/v2/{repositoryName}/manifests/{reference}"), manifestUploadContent, cancellationToken).ConfigureAwait(false);
Registry\HttpExtensions.cs (1)
41return new Uri(response.RequestMessage!.RequestUri!, response.Headers.Location?.OriginalString ?? "");
Registry\Registry.cs (2)
94this(new Uri($"https://{registryName}"), logger, registryAPI, settings) 98this(new Uri($"https://{registryName}"), logger, new RegistryApiFactory(mode), settings)
Microsoft.NET.Sdk.Publish.Tasks (9)
MsDeploy\CommonUtility.cs (1)
814Uri uri = new(physicalPath);
Tasks\Http\HttpClientExtensions.cs (1)
207response = await client.GetRequestAsync(new Uri(url, UriKind.RelativeOrAbsolute), username, password, userAgent, ct);
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);
Tasks\ZipDeploy\ZipDeploy.cs (1)
91Uri uri = new($"{zipDeployPublishUrl}?isAsync=true", UriKind.Absolute);
Tasks\ZipDeploy\ZipDeploymentStatus.cs (1)
79response = await _client.GetRequestAsync(new Uri(url, UriKind.RelativeOrAbsolute), userName, password, _userAgent, cts.Token);
WebConfigTelemetry.cs (1)
108projectFullPathConstructed = Path.GetFullPath((new Uri(projectFullPathConstructed)).LocalPath);
Microsoft.SourceLink.AzureDevOpsServer.Git (3)
src\sourcelink\src\Common\GitProvider\GetSourceLinkUrlGitTask.cs (2)
55=> new($"{gitUri.Scheme}://{authority}", UriKind.Absolute); 269contentUri = new Uri($"{contentUri.Scheme}://{contentUri.Host}:{repoUri.Port}{contentUri.PathAndQuery}");
src\sourcelink\src\Common\Utilities\UriUtilities.cs (1)
18=> new Uri("unknown://" + uri.GetAuthority(), UriKind.Absolute).Port;
Microsoft.SourceLink.AzureRepos.Git (6)
GetSourceLinkUrl.cs (3)
21new Uri($"{gitUri.Scheme}://{gitHost[..gitHost.IndexOf('.')]}.{authority}", UriKind.Absolute) : 22new Uri($"{gitUri.Scheme}://{authority}", UriKind.Absolute); 27=> new Uri($"{repositoryUri.Scheme}://{repositoryUri.GetAuthority()}", UriKind.Absolute);
src\sourcelink\src\Common\GitProvider\GetSourceLinkUrlGitTask.cs (2)
55=> new($"{gitUri.Scheme}://{authority}", UriKind.Absolute); 269contentUri = new Uri($"{contentUri.Scheme}://{contentUri.Host}:{repoUri.Port}{contentUri.PathAndQuery}");
src\sourcelink\src\Common\Utilities\UriUtilities.cs (1)
18=> new Uri("unknown://" + uri.GetAuthority(), UriKind.Absolute).Port;
Microsoft.SourceLink.Bitbucket.Git (3)
src\sourcelink\src\Common\GitProvider\GetSourceLinkUrlGitTask.cs (2)
55=> new($"{gitUri.Scheme}://{authority}", UriKind.Absolute); 269contentUri = new Uri($"{contentUri.Scheme}://{contentUri.Host}:{repoUri.Port}{contentUri.PathAndQuery}");
src\sourcelink\src\Common\Utilities\UriUtilities.cs (1)
18=> new Uri("unknown://" + uri.GetAuthority(), UriKind.Absolute).Port;
Microsoft.SourceLink.Common (1)
src\sourcelink\src\Common\Utilities\UriUtilities.cs (1)
18=> new Uri("unknown://" + uri.GetAuthority(), UriKind.Absolute).Port;
Microsoft.SourceLink.Gitea (3)
src\sourcelink\src\Common\GitProvider\GetSourceLinkUrlGitTask.cs (2)
55=> new($"{gitUri.Scheme}://{authority}", UriKind.Absolute); 269contentUri = new Uri($"{contentUri.Scheme}://{contentUri.Host}:{repoUri.Port}{contentUri.PathAndQuery}");
src\sourcelink\src\Common\Utilities\UriUtilities.cs (1)
18=> new Uri("unknown://" + uri.GetAuthority(), UriKind.Absolute).Port;
Microsoft.SourceLink.Gitee (4)
GetSourceLinkUrl.cs (1)
23=> new Uri($"{gitUri.Scheme}://{authority}", UriKind.Absolute);
src\sourcelink\src\Common\GitProvider\GetSourceLinkUrlGitTask.cs (2)
55=> new($"{gitUri.Scheme}://{authority}", UriKind.Absolute); 269contentUri = new Uri($"{contentUri.Scheme}://{contentUri.Host}:{repoUri.Port}{contentUri.PathAndQuery}");
src\sourcelink\src\Common\Utilities\UriUtilities.cs (1)
18=> new Uri("unknown://" + uri.GetAuthority(), UriKind.Absolute).Port;
Microsoft.SourceLink.GitHub (4)
GetSourceLinkUrl.cs (1)
23=> new Uri($"{gitUri.Scheme}://{authority}/raw", UriKind.Absolute);
src\sourcelink\src\Common\GitProvider\GetSourceLinkUrlGitTask.cs (2)
55=> new($"{gitUri.Scheme}://{authority}", UriKind.Absolute); 269contentUri = new Uri($"{contentUri.Scheme}://{contentUri.Host}:{repoUri.Port}{contentUri.PathAndQuery}");
src\sourcelink\src\Common\Utilities\UriUtilities.cs (1)
18=> new Uri("unknown://" + uri.GetAuthority(), UriKind.Absolute).Port;
Microsoft.SourceLink.GitLab (3)
src\sourcelink\src\Common\GitProvider\GetSourceLinkUrlGitTask.cs (2)
55=> new($"{gitUri.Scheme}://{authority}", UriKind.Absolute); 269contentUri = new Uri($"{contentUri.Scheme}://{contentUri.Host}:{repoUri.Port}{contentUri.PathAndQuery}");
src\sourcelink\src\Common\Utilities\UriUtilities.cs (1)
18=> new Uri("unknown://" + uri.GetAuthority(), UriKind.Absolute).Port;
Microsoft.SourceLink.GitWeb (4)
GetSourceLinkUrl.cs (1)
24=> new Uri($"https://{authority}/gitweb", UriKind.Absolute);
src\sourcelink\src\Common\GitProvider\GetSourceLinkUrlGitTask.cs (2)
55=> new($"{gitUri.Scheme}://{authority}", UriKind.Absolute); 269contentUri = new Uri($"{contentUri.Scheme}://{contentUri.Host}:{repoUri.Port}{contentUri.PathAndQuery}");
src\sourcelink\src\Common\Utilities\UriUtilities.cs (1)
18=> new Uri("unknown://" + uri.GetAuthority(), UriKind.Absolute).Port;
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 (4)
Client\MTP\MtpProxyExecutionManager.cs (2)
459var set = new AttachmentSet(new Uri(MtpConstants.DefaultExecutorUri), "Microsoft.Testing.Platform"); 501: new Uri(Path.GetFullPath(path));
Client\MTP\MtpTestNodeConverter.cs (1)
46var testCase = new TestCase(fullyQualifiedName, new Uri(executorUri), source)
Client\TestLoggerManager.cs (1)
415loggerUri = 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)
172DefaultExecutorUri = new Uri(defaultExecutorUri);
ExtensionFramework\TestExtensionManager.cs (1)
147uri = new Uri(extension.Metadata.ExtensionUri);
Microsoft.VisualStudio.TestPlatform.Extensions.Trx.TestLogger (2)
ObjectModel\UriDataAttachment.cs (1)
100var uriToUse = new Uri(TrxFileHelper.MakePathRelative(Uri.OriginalString, baseDirectory), UriKind.Relative);
Utility\Converter.cs (1)
475Uri sourceFileUri = new(fileName, UriKind.Relative);
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 (4)
PathUtil\PathUtility.cs (3)
292Uri resultUri = new Uri(new Uri(basePath), new Uri(relativePath, UriKind.Relative));
UriUtility.cs (1)
24return new Uri(source, kind);
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 (12)
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 (3)
29private static readonly Uri DefaultUri = new Uri("http://defaultcontainer/"); 1138var partUri = new Uri(DefaultUri, escapedPath); 1141Uri safeUnescapedUri = new Uri(partUri.GetComponents(UriComponents.Path, UriFormat.SafeUnescaped), UriKind.Relative);
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 (28)
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)
251PackageContent = new Uri(item.ContentUri)
HttpSource\TokenStore.cs (1)
67return new Uri(uri.GetComponents(UriComponents.SchemeAndServer, UriFormat.SafeUnescaped));
LegacyFeed\AutoCompleteResourceV2Feed.cs (2)
55var apiEndpointUri = new UriBuilder(new Uri(_baseUri, @"package-ids")) 71var apiEndpointUri = new UriBuilder(new Uri(_baseUri, @"package-versions/" + packageId))
LegacyFeed\DependencyInfoResourceV2Feed.cs (1)
125new Uri(packageVersion.DownloadUrl),
LegacyFeed\V2FeedParser.cs (1)
302new 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)
102downloadUri = new Uri(url); 142return new Uri(blob["packageContent"].ToString());
Resources\OwnerDetailsUriTemplateResourceV3.cs (1)
58return new Uri(uriString);
Resources\PackageDetailsUriResourceV3.cs (1)
65return new Uri(uriString);
Resources\PackageUpdateResource.cs (2)
855requestUri = new Uri(baseUri, ServiceEndpoint + '/' + path); 859requestUri = new Uri(baseUri, path);
Resources\RegistrationResourceV3.cs (2)
61return new Uri(string.Format(CultureInfo.InvariantCulture, "{0}/{1}/index.json", 97return new Uri(string.Format(CultureInfo.InvariantCulture, "{0}/{1}/{2}.json", BaseUri.AbsoluteUri.TrimEnd('/'),
Resources\ReportAbuseResourceV3.cs (1)
48return new Uri(uriString);
Utility\LocalFolderUtility.cs (1)
813var uriResult = new Uri(root, UriKind.RelativeOrAbsolute);
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}");
Publishers.Frontend (1)
Program.cs (1)
9builder.Services.AddHttpClient<ApiClient>(c => c.BaseAddress = new("http://api"));
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 (4)
System\ComponentModel\Design\DesigntimeLicenseContext.cs (1)
54Uri uri = new Uri(fileName);
System\ComponentModel\UriTypeConverter.cs (3)
50return new Uri(uriString, UriKind.RelativeOrAbsolute); 55return new Uri(uri.OriginalString, GetUriKind(uri)); 85return new Uri(uri.OriginalString, GetUriKind(uri));
System.Configuration.ConfigurationManager (1)
System\Configuration\ClientConfigPaths.cs (1)
92Uri externalConfigUri = new Uri(externalConfigPath, UriKind.Absolute);
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 (25)
System\IO\Packaging\FileFormatException.cs (1)
124_sourceUri = new Uri(sourceUriString, UriKind.RelativeOrAbsolute);
System\IO\Packaging\InternalRelationshipCollection.cs (1)
342Uri targetUri = new Uri(targetAttributeValue, DotNetRelativeOrAbsolute);
System\IO\Packaging\PackageRelationship.cs (1)
179private static readonly Uri s_containerRelationshipPartName = PackUriHelper.CreatePartUri(new Uri("/_rels/.rels", UriKind.Relative));
System\IO\Packaging\PackUriHelper.cs (12)
47Uri resolvedUri = new Uri(s_defaultUri, partUri); 87resolvedUri = new Uri(s_defaultUri, targetUri); 89resolvedUri = new Uri(new Uri(s_defaultUri, ValidatePartUri(sourcePartUri)), targetUri); 91return new Uri(resolvedUri.AbsolutePath, UriKind.Relative); 107sourcePartUri = new Uri(s_defaultUri, ValidatePartUri(sourcePartUri)); 108targetPartUri = new Uri(s_defaultUri, ValidatePartUri(targetPartUri)); 406new Uri(s_defaultUri, partName).GetComponents(UriComponents.Path | 532safeUnescapedUri = new Uri(partUri.GetComponents(UriComponents.SerializationInfoString, UriFormat.SafeUnescaped), UriKind.Relative); 537new Uri(partUri.GetComponents(UriComponents.Path | 570private static readonly Uri s_defaultUri = new Uri("http://defaultcontainer/"); 573private static readonly Uri s_packageRootUri = new Uri("/", UriKind.Relative);
System\IO\Packaging\PackUriHelper.PackUriScheme.cs (6)
104Uri packUri = new Uri(absolutePackageUri); 108packUri = new Uri(packUri, partUri); 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)); 327return ValidatePartUri(new Uri(partName, UriKind.Relative));
System\IO\Packaging\PartBasedPackageProperties.cs (1)
734return PackUriHelper.CreatePartUri(new Uri(propertyPartName, UriKind.Relative));
System\IO\Packaging\ZipPackage.cs (3)
214Uri partUri = new Uri(GetOpcNameFromZipItemName(zipArchiveEntry.FullName), UriKind.Relative); 1179new Uri(TemporaryPartNameWithoutExtension + extensionAttributeValue, UriKind.Relative)); 1202PackUriHelper.ValidatedPartUri partUri = PackUriHelper.ValidatePartUri(new Uri(partNameAttributeValue!, UriKind.Relative));
System.Net.Http (5)
System\Net\Http\HttpClient.cs (2)
784requestUri = new Uri(_baseAddress, request.RequestUri); 832string.IsNullOrEmpty(uri) ? null : new Uri(uri, UriKind.RelativeOrAbsolute);
System\Net\Http\HttpRequestMessage.cs (1)
144: this(method, string.IsNullOrEmpty(requestUri) ? null : new Uri(requestUri, UriKind.RelativeOrAbsolute))
System\Net\Http\SocketsHttpHandler\HttpEnvironmentProxy.cs (1)
239uri = new Uri($"{uriSpan[tokens[0]]}//:@{uriSpan[tokens[2]]}");
System\Net\Http\SocketsHttpHandler\RedirectHandler.cs (1)
118location = new Uri(requestUri, location);
System.Net.Http.Json (1)
System\Net\Http\Json\HttpClientJsonExtensions.cs (1)
112string.IsNullOrEmpty(uri) ? null : new Uri(uri, UriKind.RelativeOrAbsolute);
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 (2)
src\runtime\src\libraries\Common\src\System\Net\Http\X509ResourceClient.cs (2)
184Uri uri = new Uri(uriString); 292location = new Uri(requestUri, location);
System.Net.WebClient (4)
System\Net\WebClient.cs (4)
166_baseAddress = new Uri(value); 787return new Uri(Path.GetFullPath(address)); 792return new Uri(Path.GetFullPath(address)); 1168new Uri(_baseAddress, address) :
System.Net.WebProxy (1)
System\Net\WebProxy.cs (1)
289var proxyUri = new Uri(address);
System.Private.DataContractSerialization (4)
System\Runtime\Serialization\DataContract.cs (1)
1610return new Uri(Globals.DataContractXsdBaseNamespaceUri, clrNs ?? string.Empty).AbsoluteUri;
System\Runtime\Serialization\Globals.cs (1)
122internal static Uri DataContractXsdBaseNamespaceUri => field ??= new Uri(DataContractXsdBaseNamespace);
System\Runtime\Serialization\XmlReaderDelegator.cs (2)
810return new Uri(str, UriKind.RelativeOrAbsolute); 827return new Uri(str, UriKind.RelativeOrAbsolute);
System.Private.Uri (5)
System\Uri.cs (1)
1876return new Uri(relativeUriString, UriKind.Relative);
System\UriBuilder.cs (3)
32_uri = new Uri(uri, UriKind.RelativeOrAbsolute); 36_uri = new Uri(Uri.UriSchemeHttp + Uri.SchemeDelimiter + uri); 265_uri = new Uri(ToString());
System\UriExt.cs (1)
647Uri result = new();
System.Private.Xml (15)
System\Xml\Core\XmlValidatingReaderImpl.cs (1)
1069_validator.BaseUri = (resolver == null) ? new Uri(_outerReader.BaseURI, UriKind.RelativeOrAbsolute) : resolver.ResolveUri(null, _outerReader.BaseURI);
System\Xml\Resolvers\XmlPreloadedResolver.cs (4)
207return new Uri(relativeUri, UriKind.Relative); 217return new Uri(relativeUri, UriKind.Relative); 360_mappings.Add(new Uri(dtdInfo.publicId, UriKind.RelativeOrAbsolute), dtdInfo); 361_mappings.Add(new Uri(dtdInfo.systemId, UriKind.RelativeOrAbsolute), dtdInfo);
System\Xml\Schema\Parser.cs (1)
84_schema.BaseUri = new Uri(reader.BaseURI!, UriKind.RelativeOrAbsolute);
System\Xml\Schema\ParserAsync.cs (1)
45_schema.BaseUri = new Uri(reader.BaseURI!, UriKind.RelativeOrAbsolute);
System\Xml\Schema\XmlSchemaSet.cs (3)
264Uri schemaUri = new Uri(schemaDocument.BaseURI!, UriKind.RelativeOrAbsolute); 788if (FindSchemaByNSAndUrl(new Uri(reader.BaseURI!, UriKind.RelativeOrAbsolute), targetNamespace, null) != null) 800if (IsSchemaLoaded(new Uri(reader.BaseURI!, UriKind.RelativeOrAbsolute), targetNamespace, out _))
System\Xml\XmlResolver.cs (3)
45Uri uri = new Uri(relativeUri!, UriKind.RelativeOrAbsolute); 48uri = new Uri(Path.GetFullPath(relativeUri!)); 66return new Uri(baseUri, relativeUri);
System\Xml\Xsl\Runtime\XmlCollation.cs (2)
169collationUri = new Uri(collationLiteral); 202else if (collationUri.IsBaseOf(new Uri(XmlReservedNs.NsCollCodePoint)))
System.Runtime.Serialization.Schema (2)
System\Runtime\Serialization\Schema\ImportGlobals.cs (1)
87internal static Uri DataContractXsdBaseNamespaceUri => field ??= new Uri(DataContractXsdBaseNamespace);
System\Runtime\Serialization\Schema\SchemaImportHelper.cs (1)
110return new Uri(ImportGlobals.DataContractXsdBaseNamespaceUri, clrNs ?? string.Empty).AbsoluteUri;
System.Security.Cryptography (2)
src\runtime\src\libraries\Common\src\System\Net\Http\X509ResourceClient.cs (2)
184Uri uri = new Uri(uriString); 292location = new Uri(requestUri, location);
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 (6)
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\Channels\TransportSecurityHelpers.cs (1)
113fullUri = new Uri(baseAddress, relativeAddress);
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.ServiceModel.Syndication (8)
System\ServiceModel\Syndication\AtomPub10ServiceDocumentFormatter.cs (3)
114ReadReferencedCategories(reader, referencedCategories, baseUri, new Uri(link, UriKind.RelativeOrAbsolute), version, maxExtensionSize); 349result.Link = new Uri(reader.Value, UriKind.RelativeOrAbsolute); 427result.BaseUri = new Uri(reader.Value, UriKind.RelativeOrAbsolute);
System\ServiceModel\Syndication\FeedUtils.cs (2)
79Uri newBaseUri = new Uri(newBase, UriKind.RelativeOrAbsolute); 84return new Uri(rootBase, newBase);
System\ServiceModel\Syndication\SyndicationFeed.cs (1)
385textInput.Link = new SyndicationLink(new Uri(value, UriKind.RelativeOrAbsolute));
System\ServiceModel\Syndication\SyndicationFeedFormatter.cs (1)
376uri = new Uri(XmlUriData.UriString, XmlUriData.UriKind);
System\ServiceModel\Syndication\SyndicationLink.cs (1)
116return new Uri(BaseUri, Uri);
System.Speech (30)
Internal\GrammarBuilding\GrammarBuilderDictation.cs (2)
77ruleUri = new Uri("grammar:dictation#spelling", UriKind.RelativeOrAbsolute); 81ruleUri = new Uri("grammar:dictation", UriKind.RelativeOrAbsolute);
Internal\GrammarBuilding\GrammarBuilderRuleRef.cs (1)
51Uri ruleUri = new(_uri, UriKind.RelativeOrAbsolute);
Internal\GrammarBuilding\RuleRefElement.cs (1)
65return elementFactory.CreateRuleRef(parent, new Uri("#" + Rule.RuleName, UriKind.Relative), _semanticKey, null);
Internal\SrgsCompiler\BackEnd.cs (1)
713Uri uri = new(sBasePath, UriKind.RelativeOrAbsolute);
Internal\SrgsCompiler\SRGSCompiler.cs (1)
46uri = new Uri(xmlReaders[iReader].BaseURI);
Internal\SrgsParser\XmlParser.cs (3)
34uri = new Uri(_xmlTextReader.BaseURI); 379grammar.XmlBase = new Uri(reader.Value); 758ruleRef = _parser.CreateRuleRef(parent, new Uri(uri, UriKind.RelativeOrAbsolute), sAlias, sParams);
Internal\Synthesis\EngineSiteSapi.cs (1)
121Stream localStream = _site.LoadResource(new Uri(uri, UriKind.RelativeOrAbsolute), mediaType)!;
Internal\Synthesis\SSmlParser.cs (2)
1263Uri uri = new(sUri, UriKind.RelativeOrAbsolute); 1267uri = new Uri(sUri, UriKind.RelativeOrAbsolute);
Internal\Synthesis\TextFragmentEngine.cs (2)
67Uri uri = new(sUri, UriKind.RelativeOrAbsolute); 85uri = new Uri(sb.ToString(), UriKind.RelativeOrAbsolute);
Recognition\DictationGrammar.cs (2)
25public DictationGrammar(string topic) : base(new Uri(topic, UriKind.RelativeOrAbsolute), null, null) 53private static readonly Uri s_defaultDictationUri = new("grammar:dictation");
Recognition\Grammar.cs (1)
47_uri = new Uri(path, UriKind.Relative);
Recognition\GrammarBuilder.cs (2)
209uri = new Uri(path, UriKind.RelativeOrAbsolute); 230uri = new Uri(path, UriKind.RelativeOrAbsolute);
Recognition\RecognizerBase.cs (1)
1417baseUri = new Uri(uri.Substring(0, posSlash + 1), UriKind.RelativeOrAbsolute);
Recognition\SrgsGrammar\SrgsDocument.cs (1)
320_baseUri = new Uri(srgsGrammar.BaseURI);
Recognition\SrgsGrammar\SrgsGrammarCompiler.cs (2)
27using (XmlTextReader reader = new(new Uri(inputPath, UriKind.RelativeOrAbsolute).ToString())) 72readers[iFile] = new XmlTextReader(new Uri(inputPaths[iFile], UriKind.RelativeOrAbsolute).ToString());
Recognition\SrgsGrammar\SrgsRuleRef.cs (4)
45_uri = new Uri("#" + rule.Id, UriKind.Relative); 120public static readonly SrgsRuleRef Dictation = new(new Uri("grammar:dictation")); 121public static readonly SrgsRuleRef MnemonicSpelling = new(new Uri("grammar:dictation#spelling")); 253_uri = new Uri(uri.ToString() + "#" + rule, UriKind.RelativeOrAbsolute);
Synthesis\FilePrompt.cs (1)
13: this(new Uri(path, UriKind.Relative), media)
Synthesis\PromptBuilder.cs (2)
664uri = new Uri(path, UriKind.RelativeOrAbsolute); 732AppendSsml(new Uri(path, UriKind.Relative));
System.Windows.Extensions (2)
System\Media\SoundPlayer.cs (2)
352result = new Uri(partialUri); 364result = new Uri(Path.GetFullPath(partialUri));
System.Windows.Forms (16)
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 (4)
211file = new Uri($"{file}#{stringParam}"); 247file = new Uri(partialUri); 271file = new Uri(new Uri(AppContext.BaseDirectory),
vstest.console (4)
Processors\Utilities\LoggerUtilities.cs (1)
39var loggerUri = new Uri(loggerIdentifier);
TestPlatformHelpers\TestRequestManager.cs (3)
1043Uri = new Uri(ConsoleLogger.ExtensionUri), 1069Uri = new Uri(ConsoleLogger.ExtensionUri) 1104Uri = 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)
1043Uri = new Uri(ConsoleLogger.ExtensionUri), 1069Uri = new Uri(ConsoleLogger.ExtensionUri) 1104Uri = 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");
4483 references to Uri
aspire (24)
Commands\TelemetryCommandHelpers.cs (1)
148var uri = new Uri(dashboardUrlWithToken);
Mcp\Tools\McpToolHelpers.cs (2)
45if (Uri.TryCreate(url, UriKind.Absolute, out var uri))
Npm\SigstoreNpmProvenanceChecker.cs (3)
92var encodedPackage = Uri.EscapeDataString(packageName); 403if (!Uri.TryCreate(repositoryUrl, UriKind.Absolute, out var uri))
Packaging\PackagingService.cs (4)
112if (Uri.TryCreate(overrideFeed, UriKind.Absolute, out var uri) && 113(uri.Scheme == Uri.UriSchemeHttps || uri.Scheme == Uri.UriSchemeHttp))
src\Shared\DashboardUrls.cs (8)
51url += $"/resource/{Uri.EscapeDataString(resource)}"; 62url += $"/resource/{Uri.EscapeDataString(resource)}"; 90url += $"/resource/{Uri.EscapeDataString(resource)}"; 124url += $"/resource/{Uri.EscapeDataString(resource)}"; 143var url = $"/{TracesBasePath}/detail/{Uri.EscapeDataString(traceId)}"; 242var path = $"/{TelemetryApiBasePath}/traces/{Uri.EscapeDataString(traceId)}"; 271parts.Add($"resource={Uri.EscapeDataString(resource)}"); 280parts.Add($"{key}={Uri.EscapeDataString(value)}");
src\Shared\IConfigurationExtensions.cs (6)
98/// Parses a configuration value into a <see cref="Uri"/> object. 106public static Uri? GetUri(this IConfiguration configuration, string key, Uri? defaultValue = null) 128/// Parses a configuration value's semicolon-delimited value into an array of <see cref="Uri"/> objects. 136public static Uri[]? GetUris(this IConfiguration configuration, string key, Uri? defaultValue = null)
Aspire.Azure.AI.Inference (6)
AspireAzureAIInferenceExtensions.cs (2)
152var endpoint = settings.Endpoint; 405var endpoint = settings.Endpoint;
ChatCompletionsClientSettings.cs (4)
31public Uri? Endpoint { get; set; } 138if (connectionBuilder.TryGetValue("EndpointAIInference", out var endpoint) && Uri.TryCreate(endpoint.ToString(), UriKind.Absolute, out var serviceUri)) 142else if (connectionBuilder.TryGetValue("Endpoint", out endpoint) && Uri.TryCreate(endpoint.ToString(), UriKind.Absolute, out serviceUri))
Aspire.Azure.AI.OpenAI (9)
AspireConfigurableOpenAIExtensions.cs (3)
76Uri? serviceUri = null; 84if (connectionBuilder.TryGetValue(ConnectionStringEndpoint, out var endpoint) && endpoint != null && Uri.TryCreate(endpoint.ToString(), UriKind.Absolute, out var endpointUri))
AzureOpenAISettings.cs (6)
20/// Gets or sets a <see cref="Uri"/> referencing the Azure OpenAI endpoint. 27public Uri? Endpoint { get; set; } 83if (Uri.TryCreate(connectionString, UriKind.Absolute, out var uri)) 94if (connectionBuilder.ContainsKey(ConnectionStringEndpoint) && Uri.TryCreate(connectionBuilder[ConnectionStringEndpoint].ToString(), UriKind.Absolute, out var serviceUri))
Aspire.Azure.AI.OpenAI.Tests (1)
AspireAzureAIOpenAIExtensionsTests.cs (1)
87var uri = new Uri("https://aspireopenaitests.openai.azure.com/");
Aspire.Azure.Data.Tables (4)
AzureDataTablesSettings.cs (4)
23/// A <see cref="Uri"/> referencing the table service account. 29public Uri? ServiceUri { get; set; } 56if (Uri.TryCreate(connectionString, UriKind.Absolute, out var uri))
Aspire.Azure.Messaging.ServiceBus (2)
AzureMessagingServiceBusSettings.cs (2)
160if (Uri.TryCreate(endpoint, UriKind.Absolute, out var uri))
Aspire.Azure.Messaging.WebPubSub (3)
AzureMessagingWebPubSubSettings.cs (3)
29public Uri? Endpoint { get; set; } 61if (Uri.TryCreate(connectionString, UriKind.Absolute, out var uri))
Aspire.Azure.Search.Documents (6)
AzureSearchSettings.cs (6)
20/// Gets or sets a <see cref="Uri"/> referencing the Azure AI Search endpoint. 27public Uri? Endpoint { get; set; } 60if (Uri.TryCreate(connectionString, UriKind.Absolute, out var uri)) 71if (connectionBuilder.ContainsKey(ConnectionStringEndpoint) && Uri.TryCreate(connectionBuilder[ConnectionStringEndpoint].ToString(), UriKind.Absolute, out var serviceUri))
Aspire.Azure.Search.Documents.Tests (1)
AspireAzureSearchExtensionsTests.cs (1)
50var searchEndpoint = new Uri("https://aspireazuresearchtests.search.windows.net/");
Aspire.Azure.Security.KeyVault (9)
AbstractAzureKeyVaultComponent.cs (1)
24internal abstract TClient CreateComponentClient(Uri vaultUri, TOptions options, TokenCredential cred);
AzureKeyVaultCertificatesComponent.cs (1)
20internal override CertificateClient CreateComponentClient(Uri vaultUri, CertificateClientOptions options, TokenCredential cred)
AzureKeyVaultKeysComponent.cs (1)
22internal override KeyClient CreateComponentClient(Uri vaultUri, KeyClientOptions options, TokenCredential cred)
AzureKeyVaultSecretsComponent.cs (1)
28internal override SecretClient CreateComponentClient(Uri vaultUri, SecretClientOptions options, TokenCredential cred)
AzureSecurityKeyVaultSettings.cs (5)
16/// A <see cref="Uri"/> to the vault on which the client operates. Appears as "DNS Name" in the Azure portal. 17/// If you have a secret <see cref="Uri"/>, use <see cref="KeyVaultSecretIdentifier"/> to parse the <see cref="KeyVaultSecretIdentifier.VaultUri"/> and other information. 20public Uri? VaultUri { get; set; } 46Uri.TryCreate(connectionString, UriKind.Absolute, out var uri))
Aspire.Azure.Security.KeyVault.Tests (2)
AspireKeyVaultExtensionsTests.cs (2)
24var vaultUri = new Uri(ConformanceConstants.VaultUri); 228var vaultUri = new Uri(ConformanceConstants.VaultUri);
Aspire.Azure.Storage.Blobs (6)
AzureBlobStorageContainerSettings.cs (2)
46if (Uri.TryCreate(endpoint.ToString(), UriKind.Absolute, out var uri))
AzureStorageBlobsSettings.cs (4)
23/// A <see cref="Uri"/> referencing the blob service. 30public Uri? ServiceUri { get; set; } 60if (Uri.TryCreate(connectionString, UriKind.Absolute, out var uri))
Aspire.Azure.Storage.Files.DataLake (6)
AzureDataLakeFileSystemSettings.cs (2)
46if (Uri.TryCreate(endpoint.ToString(), UriKind.Absolute, out var uri))
AzureDataLakeSettings.cs (4)
23/// A <see cref="Uri" /> referencing the data lake service. 30public Uri? ServiceUri { get; set; } 60if (Uri.TryCreate(connectionString, UriKind.Absolute, out var uri))
Aspire.Azure.Storage.Queues (6)
AzureStorageQueueSettings.cs (2)
46if (Uri.TryCreate(endpoint.ToString(), UriKind.Absolute, out var uri))
AzureStorageQueuesSettings.cs (4)
23/// A <see cref="Uri"/> referencing the queue service. 30public Uri? ServiceUri { get; set; } 60if (Uri.TryCreate(connectionString, UriKind.Absolute, out var uri))
Aspire.Dashboard (54)
Components\Dialogs\GenAIVisualizerDialog.razor.cs (2)
317if (Uri.TryCreate(uriPart.Uri, UriKind.Absolute, out var result) && result.Scheme.ToLowerInvariant() is "http" or "https")
Components\Dialogs\McpServerDialog.razor.cs (1)
69var uri = new Uri(baseUri: new Uri(mcpUrl), relativeUri: "/mcp");
Components\Layout\DesktopNavMenu.razor.cs (2)
55if (Uri.TryCreate(location, UriKind.Absolute, out var result))
Configuration\DashboardOptions.cs (3)
29private Uri? _parsedUrl; 37public Uri? GetUri() => _parsedUrl; 45if (!Uri.TryCreate(Url, UriKind.Absolute, out _parsedUrl))
Configuration\ResolvedEndpointInfo.cs (3)
19return BindingAddress.Scheme.ToLowerInvariant() + Uri.SchemeDelimiter + BindingAddress.Host.ToLowerInvariant() + ":" + EndPoint.Port.ToString(CultureInfo.InvariantCulture); 26return BindingAddress.Scheme.ToLowerInvariant() + Uri.SchemeDelimiter + "localhost:" + EndPoint.Port.ToString(CultureInfo.InvariantCulture); 29return BindingAddress.Scheme.ToLowerInvariant() + Uri.SchemeDelimiter + EndPoint.ToString();
Model\Assistant\ChatClientFactory.cs (4)
30private Uri? _endpoint; 133var ghcpInfoAddress = new Uri(_endpoint, "/ghcp_info"); 194private void InitializeClientConfiguration(out Uri endpoint, out string credential, out HttpClient httpClient) 221if (!DebugSessionHelpers.HasDebugSession(Options.DebugSession, out var serverCert, out var debugSessionUri, out var token))
Model\BrowserLinkOutgoingPeerResolver.cs (2)
42if (Uri.TryCreate(url, UriKind.Absolute, out var uri) && string.Equals(uri.Host, "localhost", StringComparisons.UrlHost))
Model\ConnectionStringParser.cs (4)
144if (Uri.TryCreate(connectionString, UriKind.Absolute, out var uri) && !string.IsNullOrEmpty(uri.Host)) 495return Uri.TryCreate(fakeUri, UriKind.Absolute, out var uri) && !string.IsNullOrEmpty(uri.Host);
Model\DebugSessionHelpers.cs (2)
13public static HttpClient CreateHttpClient(Uri? debugSessionUri, string? token, X509Certificate2? cert, Func<HttpClientHandler, HttpMessageHandler>? createHandler) 60[NotNullWhen(true)] out Uri? debugSessionUri,
Model\Markdown\MarkdownHelpers.cs (2)
88if (url == null || !Uri.TryCreate(url, UriKind.RelativeOrAbsolute, out var uri))
Model\ResourceGraph\ResourceGraphMapper.cs (2)
79if (Uri.TryCreate(text, UriKind.Absolute, out var uri))
Model\ResourceOutgoingPeerResolver.cs (2)
115var url1 = urls1[i].Url; 116var url2 = urls2[i].Url;
Model\ResourceViewModel.cs (2)
403public Uri Url { get; } 408public UrlViewModel(string? endpointName, Uri url, bool isInternal, bool isInactive, UrlDisplayPropertiesViewModel displayProperties)
Model\TargetLocationInterceptor.cs (2)
16var uri = new Uri(originalTargetLocation, UriKind.RelativeOrAbsolute); 22var targetBaseUri = new Uri(uri.GetLeftPart(UriPartial.Authority));
ServiceClient\DashboardClient.cs (1)
102var address = _dashboardOptions.ResourceServiceClient.GetUri()!;
ServiceClient\Partials.cs (2)
104let parsedUri = Uri.TryCreate(u.FullUrl, UriKind.Absolute, out var uri) ? uri : null
src\Shared\DashboardUrls.cs (8)
51url += $"/resource/{Uri.EscapeDataString(resource)}"; 62url += $"/resource/{Uri.EscapeDataString(resource)}"; 90url += $"/resource/{Uri.EscapeDataString(resource)}"; 124url += $"/resource/{Uri.EscapeDataString(resource)}"; 143var url = $"/{TracesBasePath}/detail/{Uri.EscapeDataString(traceId)}"; 242var path = $"/{TelemetryApiBasePath}/traces/{Uri.EscapeDataString(traceId)}"; 271parts.Add($"resource={Uri.EscapeDataString(resource)}"); 280parts.Add($"{key}={Uri.EscapeDataString(value)}");
src\Shared\IConfigurationExtensions.cs (6)
98/// Parses a configuration value into a <see cref="Uri"/> object. 106public static Uri? GetUri(this IConfiguration configuration, string key, Uri? defaultValue = null) 128/// Parses a configuration value's semicolon-delimited value into an array of <see cref="Uri"/> objects. 136public static Uri[]? GetUris(this IConfiguration configuration, string key, Uri? defaultValue = null)
src\Shared\LoggingHelpers.cs (1)
18if (StringUtils.TryGetUriFromDelimitedString(dashboardUrls, ";", out var firstDashboardUrl))
src\Shared\StringUtils.cs (2)
11public static bool TryGetUriFromDelimitedString([NotNullWhen(true)] string? input, string delimiter, [NotNullWhen(true)] out Uri? uri) 15&& Uri.TryCreate(splitInput[0], UriKind.Absolute, out uri))
Telemetry\DashboardTelemetrySender.cs (1)
117if (DebugSessionHelpers.HasDebugSession(_options.Value.DebugSession, out var certificate, out var debugSessionUri, out var token))
Aspire.Dashboard.Components.Tests (5)
Pages\MetricsTests.cs (1)
129Uri? loadRedirect = null;
Pages\StructuredLogsTests.cs (4)
55var uri = navigationManager.ToAbsoluteUri(DashboardUrls.StructuredLogsUrl(resource: "TestApp")); 85var uri = navigationManager.ToAbsoluteUri(DashboardUrls.StructuredLogsUrl(traceId: "123", spanId: "456")); 125var uri = navigationManager.ToAbsoluteUri(DashboardUrls.StructuredLogsUrl(filters: serializedFilter)); 163var uri = navigationManager.ToAbsoluteUri(DashboardUrls.StructuredLogsUrl(filters: serializedFilter));
Aspire.Dashboard.Tests (17)
Integration\FrontendBrowserTokenAuthTests.cs (6)
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")!); 223var uri = new Uri((string)LogTestHelpers.GetValue(w, "DashboardLoginUrl")!, UriKind.Absolute); 253var uri = new Uri((string)LogTestHelpers.GetValue(loginLinkLog, "DashboardLoginUrl")!, UriKind.Absolute);
Integration\FrontendOpenIdConnectAuthTests.cs (1)
44var redirectedTo = response.Headers.Location;
Integration\Playwright\BrowserTokenAuthenticationTests.cs (2)
41var uri = new Uri(response!.Url); 72var uri = new Uri(response!.Url);
Integration\StartupTests.cs (8)
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")!);
Aspire.Hosting (67)
ApplicationModel\EndpointHostHelpers.cs (6)
32public static bool IsLocalhost([NotNullWhen(true)] Uri? uri) 68public static bool IsLocalhostTld([NotNullWhen(true)] Uri? uri) 80public static bool IsDevLocalhostTld([NotNullWhen(true)] Uri? uri) 106public static bool IsLocalhostOrLocalhostTld([NotNullWhen(true)] Uri? uri) 136if (IsLocalhostTld(targetHost) && Uri.TryCreate(allocatedUrl, UriKind.Absolute, out var uri))
ApplicationModel\McpServerEndpointAnnotation.cs (2)
19public McpServerEndpointAnnotation(Func<IResourceWithEndpoints, CancellationToken, Task<Uri?>> endpointUrlResolver) 28public Func<IResourceWithEndpoints, CancellationToken, Task<Uri?>> EndpointUrlResolver { get; }
Backchannel\AuxiliaryBackchannelRpcTarget.cs (4)
514var endpointUri = await mcpAnnotation.EndpointUrlResolver(resourceWithEndpoints, cancellationToken).ConfigureAwait(false); 781var endpointUri = await annotation.EndpointUrlResolver(resource, cancellationToken).ConfigureAwait(false); 868private async Task<Tool[]?> TryListToolsAsync(Uri endpointUri, CancellationToken cancellationToken) 900private HttpClientTransport CreateHttpClientTransport(Uri endpointUri)
Backchannel\DashboardUrlsHelper.cs (1)
91if (StringUtils.TryGetUriFromDelimitedString(dashboardOptions.DashboardUrl, ";", out var dashboardUri))
Dashboard\DashboardEventHandlers.cs (1)
395if (!StringUtils.TryGetUriFromDelimitedString(dashboardUrls, ";", out var firstDashboardUrl))
Dashboard\DashboardServiceHost.cs (1)
140var uri = configuration.GetUri(ResourceServiceUrlVariableName);
Dashboard\TransportOptionsValidator.cs (2)
72if (!Uri.TryCreate(resourceServiceEndpointUrl, UriKind.Absolute, out var parsedResourceServiceEndpointUrl))
Dcp\DcpKubernetesClient.cs (1)
167_parameters.Add($"{key}={Uri.EscapeDataString(val)}");
Devcontainers\Codespaces\CodespacesResourceUrlRewriterService.cs (1)
34var uri = new Uri(originalUrlSnapshot.Url);
Devcontainers\Codespaces\CodespacesUrlRewriter.cs (1)
22public string RewriteUrl(Uri uri)
ExternalServiceBuilderExtensions.cs (9)
34if (!ExternalServiceResource.UrlIsValidForExternalService(url, out var uri, out var message)) 50public static IResourceBuilder<ExternalServiceResource> AddExternalService(this IDistributedApplicationBuilder builder, [ResourceName] string name, Uri uri) 76private static IResourceBuilder<ExternalServiceResource> AddExternalServiceImpl(IDistributedApplicationBuilder builder, string name, Uri? uri = null, ParameterResource? urlParameter = null) 108var uri = resource.Uri; 158static ImmutableArray<UrlSnapshot> AddUrlIfNotPresent(ImmutableArray<UrlSnapshot> urlSnapshots, Uri uri) 191if (path is not null && !Uri.IsWellFormedUriString(path, UriKind.Relative)) 233var uri = builder.Resource.Uri!; 238var targetUri = uri; 284if (!ExternalServiceResource.UrlIsValidForExternalService(urlValue, out var uri, out var message))
ExternalServiceResource.cs (6)
14private readonly Uri? _uri; 26public ExternalServiceResource(string name, Uri uri) : base(name) 52public Uri? Uri => _uri; 62internal static bool UrlIsValidForExternalService(string? url, [NotNullWhen(true)] out Uri? uri, [NotNullWhen(false)] out string? message) 64if (url is null || !Uri.TryCreate(url, UriKind.Absolute, out uri)) 83private static ArgumentException? GetUriValidationException(Uri uri)
Orchestrator\ApplicationOrchestrator.cs (5)
33private readonly Uri? _dashboardUri; 65Uri.TryCreate(dashboardUrl, UriKind.Absolute, out _dashboardUri); 397Uri.TryCreate(primaryUrl.Url, UriKind.RelativeOrAbsolute, out var primaryUri); 411&& Uri.IsWellFormedUriString(url.Url, UriKind.Absolute))
ProjectResourceBuilderExtensions.cs (3)
618if (Uri.TryCreate(launchProfile.LaunchUrl, UriKind.RelativeOrAbsolute, out var launchUri)) 639var baseUri = new Uri(url.Url);
ResourceBuilderExtensions.cs (12)
214if (!ExternalServiceResource.UrlIsValidForExternalService(url, out var _, out var message)) 829public static IResourceBuilder<TDestination> WithReference<TDestination>(this IResourceBuilder<TDestination> builder, string name, Uri uri) 922else if (ExternalServiceResource.UrlIsValidForExternalService(await externalService.Resource.UrlParameter.GetValueAsync(context.CancellationToken).ConfigureAwait(false), out var uri, out var message)) 1384if (Uri.TryCreate(url, UriKind.Relative, out var relativeUri)) 1391if (Uri.TryCreate(u.Url, UriKind.Absolute, out var absoluteUri) 1392&& Uri.TryCreate(absoluteUri, relativeUri, out var uri)) 2101Uri? uri = null; 2104var baseUri = new Uri(endpoint.Url, UriKind.Absolute); 2468var uri = new UriBuilder(endpoint.Url) { Path = path }.Uri;
src\Shared\IConfigurationExtensions.cs (6)
98/// Parses a configuration value into a <see cref="Uri"/> object. 106public static Uri? GetUri(this IConfiguration configuration, string key, Uri? defaultValue = null) 128/// Parses a configuration value's semicolon-delimited value into an array of <see cref="Uri"/> objects. 136public static Uri[]? GetUris(this IConfiguration configuration, string key, Uri? defaultValue = null)
src\Shared\LoggingHelpers.cs (1)
18if (StringUtils.TryGetUriFromDelimitedString(dashboardUrls, ";", out var firstDashboardUrl))
src\Shared\OtlpEndpointResolver.cs (2)
80if (Uri.TryCreate(url, UriKind.Absolute, out var uri))
src\Shared\StringUtils.cs (2)
11public static bool TryGetUriFromDelimitedString([NotNullWhen(true)] string? input, string delimiter, [NotNullWhen(true)] out Uri? uri) 15&& Uri.TryCreate(splitInput[0], UriKind.Absolute, out uri))
Utils\FormattingHelpers.cs (1)
23"uri" => Uri.EscapeDataString(value),
Aspire.Hosting.Azure (4)
Provisioning\Internal\DefaultSecretClientProvider.cs (1)
13public SecretClient GetSecretClient(Uri vaultUri) =>
Provisioning\Internal\IProvisioningServices.cs (1)
37SecretClient GetSecretClient(Uri vaultUri);
Provisioning\Provisioners\BicepProvisioner.cs (2)
371var encodedPath = Uri.EscapeDataString(path); 377$"{PortalDeploymentOverviewUrl}/{Uri.EscapeDataString(deploymentId.ToString())}";
Aspire.Hosting.Azure.AppContainers (1)
BaseContainerAppContext.cs (1)
444secret.KeyVaultUri = new BicepValue<Uri>(((BicepExpression?)argValue)!);
Aspire.Hosting.Azure.CosmosDB (7)
AzureCosmosDBExtensions.cs (2)
213if (Uri.TryCreate(connectionString, UriKind.Absolute, out var uri))
src\Shared\Cosmos\CosmosUtils.cs (5)
39Uri? accountEndpoint; 40if (Uri.TryCreate(connectionString, UriKind.Absolute, out accountEndpoint)) 63Uri.TryCreate(accountEndpointValue.ToString(), UriKind.Absolute, out accountEndpoint)) 74public CosmosConnectionInfo(Uri? accountEndpoint, string? connectionString, string? databaseName = null, string? containerName = null) 84public Uri? AccountEndpoint { get; }
Aspire.Hosting.Azure.Storage (4)
AzureStorageExtensions.cs (4)
644if (Uri.TryCreate(connectionString, UriKind.Absolute, out var uri)) 656if (Uri.TryCreate(connectionString, UriKind.Absolute, out var uri))
Aspire.Hosting.Azure.Tests (3)
AzureBicepProvisionerTests.cs (2)
167var vaultUri = new Uri("https://test.vault.azure.net/"); 246public SecretClient GetSecretClient(Uri vaultUri)
ProvisioningTestHelpers.cs (1)
577public SecretClient GetSecretClient(Uri vaultUri)
Aspire.Hosting.CodeGeneration.Go.Tests (1)
tests\Aspire.Hosting.CodeGeneration.TypeScript.Tests\TestTypes\TestExtensions.cs (1)
317Uri proxyUrl)
Aspire.Hosting.CodeGeneration.Java.Tests (1)
tests\Aspire.Hosting.CodeGeneration.TypeScript.Tests\TestTypes\TestExtensions.cs (1)
317Uri proxyUrl)
Aspire.Hosting.CodeGeneration.Python.Tests (1)
tests\Aspire.Hosting.CodeGeneration.TypeScript.Tests\TestTypes\TestExtensions.cs (1)
317Uri proxyUrl)
Aspire.Hosting.CodeGeneration.Rust.Tests (1)
tests\Aspire.Hosting.CodeGeneration.TypeScript.Tests\TestTypes\TestExtensions.cs (1)
317Uri proxyUrl)
Aspire.Hosting.CodeGeneration.TypeScript.Tests (1)
TestTypes\TestExtensions.cs (1)
317Uri proxyUrl)
Aspire.Hosting.DevTunnels (1)
IDevTunnelClient.cs (1)
52public Uri? PortUri { get; init; }
Aspire.Hosting.Foundry (1)
FoundryResource.cs (1)
19internal Uri? EmulatorServiceUri { get; set; }
Aspire.Hosting.GitHub.Models (6)
src\Shared\IConfigurationExtensions.cs (6)
98/// Parses a configuration value into a <see cref="Uri"/> object. 106public static Uri? GetUri(this IConfiguration configuration, string key, Uri? defaultValue = null) 128/// Parses a configuration value's semicolon-delimited value into an array of <see cref="Uri"/> objects. 136public static Uri[]? GetUris(this IConfiguration configuration, string key, Uri? defaultValue = null)
Aspire.Hosting.Maui (8)
src\Shared\IConfigurationExtensions.cs (6)
98/// Parses a configuration value into a <see cref="Uri"/> object. 106public static Uri? GetUri(this IConfiguration configuration, string key, Uri? defaultValue = null) 128/// Parses a configuration value's semicolon-delimited value into an array of <see cref="Uri"/> objects. 136public static Uri[]? GetUris(this IConfiguration configuration, string key, Uri? defaultValue = null)
src\Shared\OtlpEndpointResolver.cs (2)
80if (Uri.TryCreate(url, UriKind.Absolute, out var uri))
Aspire.Hosting.Maui.Tests (1)
MauiPlatformExtensionsTests.cs (1)
650Assert.True(Uri.TryCreate(endpointValue, UriKind.Absolute, out _));
Aspire.Hosting.OpenAI (11)
OpenAIHealthCheck.cs (5)
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"); 44if (Uri.TryCreate(_resource.Endpoint, UriKind.Absolute, out var endpointUri) && 45Uri.Compare(endpointUri, s_defaultEndpointUri, UriComponents.SchemeAndServer, UriFormat.Unescaped, StringComparison.OrdinalIgnoreCase) == 0)
src\Shared\IConfigurationExtensions.cs (6)
98/// Parses a configuration value into a <see cref="Uri"/> object. 106public static Uri? GetUri(this IConfiguration configuration, string key, Uri? defaultValue = null) 128/// Parses a configuration value's semicolon-delimited value into an array of <see cref="Uri"/> objects. 136public static Uri[]? GetUris(this IConfiguration configuration, string key, Uri? defaultValue = null)
Aspire.Hosting.PostgreSQL.Tests (1)
PostgresMcpBuilderTests.cs (1)
64var resolvedUri = await mcpAnnotation.EndpointUrlResolver(mcpContainer, CancellationToken.None);
Aspire.Hosting.Qdrant (5)
QdrantBuilderExtensions.cs (5)
197Uri? endpoint = null; 200if (Uri.TryCreate(connectionString, UriKind.Absolute, out var uri)) 211if (connectionBuilder.TryGetValue("Endpoint", out var endpointValue) && Uri.TryCreate(endpointValue.ToString(), UriKind.Absolute, out var serviceUri))
Aspire.Hosting.RemoteHost (2)
Ats\AtsMarshaller.cs (1)
91typeof(Uri)
AtsCapabilityScanner.cs (1)
1957if (type == typeof(Uri))
Aspire.Hosting.RemoteHost.Tests (1)
AtsMarshallerTests.cs (1)
353[InlineData(typeof(Uri))]
Aspire.Hosting.Testing (4)
DistributedApplicationFactory.cs (1)
111public Uri GetEndpoint(string resourceName, string? endpointName = default)
DistributedApplicationHostingTestingExtensions.cs (3)
84public static Uri GetEndpoint(this DistributedApplication app, string resourceName, string? endpointName = default) 104public static Uri GetEndpointForNetwork(this DistributedApplication app, string resourceName, NetworkIdentifier? networkIdentifier, string? endpointName = default) 123internal static Uri GetEndpointForNetworkExport(this DistributedApplication app, string resourceName, string? networkIdentifier = default, string? endpointName = default)
Aspire.Hosting.Testing.Tests (4)
DistributedApplicationHttpClientExtensionsForTests.cs (1)
14var baseUri = app.GetEndpoint(resourceName, endpointName);
TestingBuilderTests.cs (2)
69var serviceAHttpEndpoint = app.GetEndpoint("servicea", "http"); 143var workerEndpoint = app.GetEndpoint("myworker1", "myendpoint1");
TestingFactoryTests.cs (1)
23var workerEndpoint = _app.GetEndpoint("myworker1", "myendpoint1");
Aspire.Hosting.Tests (34)
ApplicationModel\McpServerEndpointAnnotationTests.cs (13)
20var expectedUri = new Uri("http://custom.example.com:9000/mcp"); 21var annotation = new McpServerEndpointAnnotation((resource, ct) => Task.FromResult<Uri?>(expectedUri)); 24var result = await annotation.EndpointUrlResolver(resource, CancellationToken.None); 32var annotation = new McpServerEndpointAnnotation((resource, ct) => Task.FromResult<Uri?>(null)); 35var result = await annotation.EndpointUrlResolver(resource, CancellationToken.None); 64var result = await annotation.EndpointUrlResolver(resource, CancellationToken.None); 78var result = await annotation.EndpointUrlResolver(resource, CancellationToken.None); 93var result = await annotation.EndpointUrlResolver(resource, CancellationToken.None); 108var result = await annotation.EndpointUrlResolver(resource, CancellationToken.None); 124var result = await annotation.EndpointUrlResolver(resource, CancellationToken.None); 140var result = await annotation.EndpointUrlResolver(resource, CancellationToken.None); 155var result = await annotation.EndpointUrlResolver(resource, CancellationToken.None); 187var result = await annotation.EndpointUrlResolver(resource, CancellationToken.None);
Dashboard\DashboardLifecycleHookTests.cs (1)
262var uri = new Uri(dashboardUrlValue);
DistributedApplicationTests.cs (3)
644var uri = app.GetEndpoint(testProgram.ServiceBBuilder.Resource.Name, "http"); 1567var httpEndPoint = app.GetEndpoint(testProgram.ServiceABuilder.Resource.Name, endpointName: "http"); 1585var httpsEndpoint = app.GetEndpoint(testProgram.ServiceABuilder.Resource.Name, endpointName: "https");
ExternalServiceTests.cs (11)
32var uri = new Uri("https://nuget.org/"); 76var relativeUri = new Uri("/relative", UriKind.Relative); 86var uriWithPath = new Uri("https://api.example.com/api/v1"); 274Assert.True(ExternalServiceResource.UrlIsValidForExternalService("https://nuget.org/", out var uri, out var message)); 278Assert.False(ExternalServiceResource.UrlIsValidForExternalService("invalid-url", out var invalidUri, out var invalidMessage)); 283Assert.False(ExternalServiceResource.UrlIsValidForExternalService("https://nuget.org/path", out var pathUri, out var pathMessage)); 289Assert.True(ExternalServiceResource.UrlIsValidForExternalService("https://gateway/orders-service/", out var validPathUri, out var validPathMessage)); 294Assert.False(ExternalServiceResource.UrlIsValidForExternalService("https://nuget.org/#fragment", out var fragmentUri, out var fragmentMessage)); 300Assert.False(ExternalServiceResource.UrlIsValidForExternalService("https://nuget.org/?query=1", out var queryUri, out var queryMessage)); 553var uri = new Uri("https://api.example.com/service"); 565var uri = new Uri("https://api.example.com/service/");
tests\Aspire.Hosting.Testing.Tests\DistributedApplicationHttpClientExtensionsForTests.cs (1)
14var baseUri = app.GetEndpoint(resourceName, endpointName);
WithMcpServerTests.cs (5)
59var resolvedUri = await mcpAnnotation.EndpointUrlResolver(resource, CancellationToken.None); 84var resolvedUri = await mcpAnnotation.EndpointUrlResolver(resource, CancellationToken.None); 109var resolvedUri = await mcpAnnotation.EndpointUrlResolver(resource, CancellationToken.None); 134var resolvedUri = await mcpAnnotation.EndpointUrlResolver(resource, CancellationToken.None); 159var resolvedUri = await mcpAnnotation.EndpointUrlResolver(resource, CancellationToken.None);
Aspire.Hosting.Yarp (2)
ConfigurationBuilder\YarpClusterConfigDtos.cs (1)
86public Uri? Address { get; set; }
ConfigurationBuilder\YarpConfigurationBuilder.cs (1)
67if (dest is not (IValueProvider or string or Uri))
Aspire.Hosting.Yarp.Tests (2)
YarpClusterTests.cs (2)
113var uri = new Uri("https://example.com:8080"); 195var uri = new Uri("https://example.com");
Aspire.Microsoft.Azure.Cosmos (7)
MicrosoftAzureCosmosSettings.cs (2)
37/// A <see cref="Uri"/> referencing the Azure Cosmos DB Endpoint. 44public Uri? AccountEndpoint { get; set; }
src\Shared\Cosmos\CosmosUtils.cs (5)
39Uri? accountEndpoint; 40if (Uri.TryCreate(connectionString, UriKind.Absolute, out accountEndpoint)) 63Uri.TryCreate(accountEndpointValue.ToString(), UriKind.Absolute, out accountEndpoint)) 74public CosmosConnectionInfo(Uri? accountEndpoint, string? connectionString, string? databaseName = null, string? containerName = null) 84public Uri? AccountEndpoint { get; }
Aspire.Microsoft.EntityFrameworkCore.Cosmos (7)
EntityFrameworkCoreCosmosSettings.cs (2)
24/// A <see cref="Uri"/> referencing the Azure Cosmos DB Endpoint. 31public Uri? AccountEndpoint { get; set; }
src\Shared\Cosmos\CosmosUtils.cs (5)
39Uri? accountEndpoint; 40if (Uri.TryCreate(connectionString, UriKind.Absolute, out accountEndpoint)) 63Uri.TryCreate(accountEndpointValue.ToString(), UriKind.Absolute, out accountEndpoint)) 74public CosmosConnectionInfo(Uri? accountEndpoint, string? connectionString, string? databaseName = null, string? containerName = null) 84public Uri? AccountEndpoint { get; }
Aspire.Microsoft.Extensions.Configuration.AzureAppConfiguration (4)
AzureAppConfigurationSettings.cs (4)
23/// A <see cref="Uri"/> to the App Configuration store on which the client operates. Appears as "Endpoint" in the Azure portal. 26public Uri? Endpoint { get; set; } 68if (Uri.TryCreate(connectionString, UriKind.Absolute, out var uri))
Aspire.Microsoft.Extensions.Configuration.AzureAppConfiguration.Tests (2)
AspireAppConfigurationExtensionsTest.cs (2)
18var endpoint = new Uri(ConformanceTests.Endpoint); 86var endpoint = new Uri("https://aspiretests.azconfig.io/");
Aspire.Milvus.Client (5)
MilvusClientSettings.cs (5)
20public Uri? Endpoint { get; set; } 42if (Uri.TryCreate(connectionString, UriKind.Absolute, out var uri)) 53if (connectionBuilder.ContainsKey(ConnectionStringEndpoint) && Uri.TryCreate(connectionBuilder[ConnectionStringEndpoint].ToString(), UriKind.Absolute, out var serviceUri))
Aspire.OpenAI (4)
OpenAISettings.cs (4)
17/// Gets or sets a <see cref="Uri"/> referencing the OpenAI REST API endpoint. 20public Uri? Endpoint { get; set; } 61if (connectionBuilder.ContainsKey(ConnectionStringEndpoint) && Uri.TryCreate(connectionBuilder[ConnectionStringEndpoint].ToString(), UriKind.Absolute, out var serviceUri))
Aspire.OpenAI.Tests (1)
AspireOpenAIExtensionsTests.cs (1)
50var uri = new Uri("https://api.openai.com/");
Aspire.Qdrant.Client (5)
QdrantClientSettings.cs (5)
19public Uri? Endpoint { get; set; } 44if (Uri.TryCreate(connectionString, UriKind.Absolute, out var uri)) 55if (connectionBuilder.ContainsKey(ConnectionStringEndpoint) && Uri.TryCreate(connectionBuilder[ConnectionStringEndpoint].ToString(), UriKind.Absolute, out var serviceUri))
Aspire.RabbitMQ.Client (1)
src\Components\Aspire.RabbitMQ.Client\AspireRabbitMQExtensions.cs (1)
241private static void AddRabbitMQTags(Activity? activity, Uri address, string? operation = null)
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.Templates.Tests (1)
StarterTemplateRunTestsBase.cs (1)
81var uri = new UriBuilder(url) { Path = "weatherforecast" }.Uri;
Aspire.TypeSystem (2)
AtsConstants.cs (2)
182/// Uri type ID. Maps from .NET <see cref="System.Uri"/>. 428typeof(Uri),
Binding.UDS.IntegrationTests (1)
UDSBindingTests.cs (1)
78var uri = new Uri("net.uds://" + UDS.GetUDSFilePath());
blazor-gateway (1)
TelemetryFilters.cs (1)
26public static bool ShouldTraceOutboundRequest(Uri? requestUri, IList<string> excludeOutboundPaths)
Client.ClientBase.IntegrationTests (1)
ClientBaseTests.4.1.0.cs (1)
63Uri uri = new Uri(Endpoints.HttpBaseAddress_Basic_Text);
ConfigurationSchemaGenerator (1)
RuntimeSource\Configuration.Binder\Parser\KnownTypeSymbols.cs (1)
83Uri = compilation.GetBestTypeByMetadataName(typeof(Uri));
ConfigurationSchemaGenerator.Tests (3)
GeneratorTests.cs (1)
454MetadataReference.CreateFromFile(typeof(Uri).Assembly.Location),
VariousTypes.cs (2)
56/// A value of type <see cref="Uri"/>. 58public Uri? PropertyOfUri { get; set; }
dotnet (15)
Commands\Sdk\Check\IProductCollectionProvider.cs (1)
12ProductCollection GetProductCollection(Uri uri = null, string filePath = null);
Commands\Sdk\Check\ProductCollectionProvider.cs (1)
13public ProductCollection GetProductCollection(Uri uri = null, string filePath = null)
Commands\Test\MTP\Terminal\AnsiTerminal.cs (2)
218if (Uri.TryCreate(linkPath, UriKind.Absolute, out Uri? uri))
Commands\Workload\Install\WorkloadManifestUpdater.cs (2)
503if (Uri.TryCreate(rollbackDefinitionFilePath, UriKind.Absolute, out var rollbackUri) && !rollbackUri.IsFile)
NugetPackageDownloader\NuGetPackageDownloader.cs (2)
318IReadOnlyList<Uri> packageBaseAddress = 579var existingUris = new HashSet<Uri>(sourceList.Where(s => s.SourceUri != null).Select(s => s.SourceUri));
NugetPackageDownloader\PackageSourceLocation.cs (1)
47if (!Uri.IsWellFormedUriString(feed, UriKind.Absolute) && !Path.IsPathRooted(feed))
NugetSearch\NugetToolSearchApiRequest.cs (4)
22var queryUrl = await ConstructUrl( 50internal static async Task<Uri> ConstructUrl(string searchTerm = null, int? skip = null, int? take = null, 51bool prerelease = false, Uri domainAndPathOverride = null) 168private static async Task<Uri> DomainAndPath()
SlnFileFactory.cs (2)
103originalSolutionPath = Uri.UnescapeDataString(root.GetProperty("solution").GetProperty("path").GetString()); 133.Select(path => Uri.UnescapeDataString(path))
dotnet-openapi (3)
Commands\BaseCommand.cs (3)
142return Uri.TryCreate(file, UriKind.Absolute, out var _) && file.StartsWith("http", StringComparison.Ordinal); 382var uri = new Uri(url);
dotnet-sourcelink (1)
dotnet-svcutil-lib (503)
CmdCredentialsProvider.cs (6)
23public NetworkCredential GetCredentials(Uri serviceUri, WebException webException) 129public X509Certificate GetCertificate(Uri serviceUri) 141private X509Certificate2 SelectCertificateFromCollection(X509Certificate2Collection selectedCerts, Uri serviceUri) 181private Uri _serviceUri; 183public void BeforeServerCertificateValidation(Uri serviceUri) 194public void AfterServerCertificateValidation(Uri serviceUri)
CodeDomFixup\MethodCreationHelper.cs (3)
600new CodeObjectCreateExpression(typeof(Uri), 804new CodeObjectCreateExpression(typeof(Uri), 2150typeof(Uri),
CommandProcessorOptions.cs (2)
149if (PathHelper.IsFile(cmdOptions.Inputs[0], Directory.GetCurrentDirectory(), out var fileUri) && 739if (PathHelper.IsFile(this.Inputs[idx], Directory.GetCurrentDirectory(), out Uri metadataUri))
FrameworkFork\Microsoft.Xml\Xml\Core\IDtdParserAdapter.cs (1)
22Uri BaseUri { get; }
FrameworkFork\Microsoft.Xml\Xml\Core\XmlReaderSettings.cs (1)
457internal XmlReader CreateReader(Stream input, Uri baseUri, string baseUriString, XmlParserContext inputContext)
FrameworkFork\Microsoft.Xml\Xml\Core\XmlTextReaderImpl.cs (14)
132public Uri inputbaseUri; 608Uri baseUri = uriResolver.ResolveUri(null, uriStr); 700internal XmlTextReaderImpl(Stream stream, byte[] bytes, int byteCount, XmlReaderSettings settings, Uri baseUri, string baseUriStr, 2431internal Uri DtdParserProxy_BaseUri 2885private void InitStreamInput(Uri baseUri, Stream stream, Encoding encoding) 2891private void InitStreamInput(Uri baseUri, string baseUriStr, Stream stream, Encoding encoding) 2896private void InitStreamInput(Uri baseUri, string baseUriStr, Stream stream, byte[] bytes, int byteCount, Encoding encoding) 2989private void InitTextReaderInput(string baseUriStr, Uri baseUri, TextReader input) 8034private void PushExternalEntityOrSubset(string publicId, string systemId, Uri baseUri, string entityName) 8036Uri uri; 8091private bool OpenAndPush(Uri uri) 8135Uri entityBaseUri = null; 9623private bool UriEqual(Uri uri1, string uri1Str, string uri2Str, XmlResolver resolver) 9633Uri uri2 = resolver.ResolveUri(null, uri2Str);
FrameworkFork\Microsoft.Xml\Xml\Core\XmlTextReaderImplHelpers.cs (2)
55internal Uri baseUri; 196Uri IDtdParserAdapter.BaseUri
FrameworkFork\Microsoft.Xml\Xml\IApplicationResourceStreamResolver.cs (1)
20Stream GetApplicationResourceStream(Uri relativeUri);
FrameworkFork\Microsoft.Xml\Xml\Resolvers\XmlPreloadedResolver.cs (13)
129private Dictionary<Uri, PreloadedData> _mappings; 171public XmlPreloadedResolver(XmlResolver fallbackResolver, XmlKnownDtds preloadedDtds, IEqualityComparer<Uri> uriComparer) 174_mappings = new Dictionary<Uri, PreloadedData>(16, uriComparer); 191public override Uri ResolveUri(Uri baseUri, string relativeUri) 224public override Object GetEntity(Uri absoluteUri, string role, Type ofObjectToReturn) 266public override bool SupportsType(Uri absoluteUri, Type type) 286public void Add(Uri uri, byte[] value) 299public void Add(Uri uri, byte[] value, int offset, int count) 325public void Add(Uri uri, string value) 338public IEnumerable<Uri> PreloadedUris 347public void Remove(Uri uri) 359private void Add(Uri uri, PreloadedData data)
FrameworkFork\Microsoft.Xml\Xml\Resolvers\XmlPreloadedResolverAsync.cs (1)
19public override Task<Object> GetEntityAsync(Uri absoluteUri,
FrameworkFork\Microsoft.Xml\Xml\Resolvers\XmlSystemPathResolver.cs (1)
21public override Object GetEntity(Uri uri, string role, Type typeOfObjectToReturn)
FrameworkFork\Microsoft.Xml\Xml\schema\basevalidator.cs (2)
23private Uri _baseUri; 104public Uri BaseUri
FrameworkFork\Microsoft.Xml\Xml\schema\ChameleonKey.cs (1)
21internal Uri chameleonLocation;
FrameworkFork\Microsoft.Xml\Xml\schema\DatatypeImplementation.cs (5)
2627private static readonly Type s_atomicValueType = typeof(Uri); 2628private static readonly Type s_listValueType = typeof(Uri[]); 2667return ((Uri)value1).Equals((Uri)value2) ? 0 : -1; 2679Uri uri;
FrameworkFork\Microsoft.Xml\Xml\schema\DtdParser.cs (7)
268Uri baseUri = readerAdapter.BaseUri; 327Uri baseUriOb = _readerAdapter.BaseUri; 518Uri baseUri = _readerAdapter.BaseUri; 3519Uri tmp = _readerAdapter.BaseUri; 3538Uri baseUri = _readerAdapter.BaseUri; 3544Uri baseUri = _readerAdapter.BaseUri; 3550Uri baseUri = _readerAdapter.BaseUri;
FrameworkFork\Microsoft.Xml\Xml\schema\FacetChecker.cs (2)
1435if (value.Equals(((Uri)enumeration[i]).OriginalString)) 1463Uri uri;
FrameworkFork\Microsoft.Xml\Xml\schema\GenerateConverter.cs (1)
999if (name == "Uri") return typeof(Uri);
FrameworkFork\Microsoft.Xml\Xml\schema\Preprocessor.cs (4)
288Uri includeLocation = null; 306Uri ruri = null; 2155private Uri ResolveSchemaLocationUri(XmlSchema enclosingSchema, string location) 2164private object GetSchemaEntity(Uri ruri)
FrameworkFork\Microsoft.Xml\Xml\schema\SchemaCollectionPreprocessor.cs (5)
146Uri includeLocation = null; 181Uri subUri = null; 224Uri ruri = ResolveSchemaLocationUri(schema, schemaLocation); 1809private Uri ResolveSchemaLocationUri(XmlSchema enclosingSchema, string location) 1821private Stream GetSchemaEntity(Uri ruri)
FrameworkFork\Microsoft.Xml\Xml\schema\XdrBuilder.cs (2)
526Uri _baseUri = _xmlResolver.ResolveUri(null, _reader.BaseURI); 530Uri ruri = _xmlResolver.ResolveUri(_baseUri, uri.Substring(x_schema.Length));
FrameworkFork\Microsoft.Xml\Xml\schema\xdrvalidator.cs (1)
342Uri ruri = this.XmlResolver.ResolveUri(BaseUri, url);
FrameworkFork\Microsoft.Xml\Xml\schema\XmlSchema.cs (2)
65private Uri _baseUri; 525internal Uri BaseUri
FrameworkFork\Microsoft.Xml\Xml\schema\XmlSchemaExternal.cs (2)
19private Uri _baseUri; 58internal Uri BaseUri
FrameworkFork\Microsoft.Xml\Xml\schema\XmlSchemaSet.cs (6)
331Uri tempSchemaUri = tempResolver.ResolveUri(null, schemaUri); 374Uri schemaUri = new Uri(schemaDocument.BaseURI, UriKind.RelativeOrAbsolute); 998internal XmlSchema FindSchemaByNSAndUrl(Uri schemaUri, string ns, DictionaryEntry[] locationsTable) 1267Uri baseUri; 1397internal bool IsSchemaLoaded(Uri schemaUri, string targetNamespace, out XmlSchema schema) 1438internal bool GetSchemaByUri(Uri schemaUri, out XmlSchema schema)
FrameworkFork\Microsoft.Xml\Xml\schema\XmlSchemaValidator.cs (3)
123private Uri _sourceUri; 285public Uri SourceUri 1867Uri ruri = _xmlResolver.ResolveUri(_sourceUri, url);
FrameworkFork\Microsoft.Xml\Xml\schema\XmlValueConverter.cs (6)
370protected static readonly Type UriType = typeof(Uri); 756protected static string AnyUriToString(Uri value) 2069if (IsDerivedFrom(sourceType, UriType)) if (TypeCode == XmlTypeCode.AnyUri) return AnyUriToString((Uri)value); 2205if (IsDerivedFrom(sourceType, UriType)) if (TypeCode == XmlTypeCode.AnyUri) return ((Uri)value); 2656if (IsDerivedFrom(sourceType, UriType)) return AnyUriToString((Uri)value); 3531if (itemTypeDst == UriType) return ToArray<Uri>(value, nsResolver);
FrameworkFork\Microsoft.Xml\Xml\schema\xsdvalidator.cs (1)
588Uri ruri = this.XmlResolver.ResolveUri(BaseUri, url);
FrameworkFork\Microsoft.Xml\Xml\Serialization\XmlSchemas.cs (1)
150public int Add(XmlSchema schema, Uri baseUri)
FrameworkFork\Microsoft.Xml\Xml\XmlConvert.cs (5)
1517internal static Uri ToUri(string s) 1527Uri uri; 1528if (!Uri.TryCreate(s, UriKind.RelativeOrAbsolute, out uri)) 1535internal static Exception TryToUri(string s, out Uri result) 1547if (!Uri.TryCreate(s, UriKind.RelativeOrAbsolute, out result))
FrameworkFork\Microsoft.Xml\Xml\XmlNullResolver.cs (1)
18public override Object GetEntity(Uri absoluteUri, string role, Type ofObjectToReturn)
FrameworkFork\Microsoft.Xml\Xml\XmlResolver.cs (5)
30public abstract Object GetEntity(Uri absoluteUri, 42public virtual Uri ResolveUri(Uri baseUri, string relativeUri) 46Uri uri = new Uri(relativeUri, UriKind.RelativeOrAbsolute); 78public virtual bool SupportsType(Uri absoluteUri, Type type)
FrameworkFork\Microsoft.Xml\Xml\XmlResolverAsync.cs (1)
14public virtual Task<Object> GetEntityAsync(Uri absoluteUri,
FrameworkFork\Microsoft.Xml\Xml\XmlUrlResolver.cs (3)
45public override Object GetEntity(Uri absoluteUri, string role, Type ofObjectToReturn) 53public override Uri ResolveUri(Uri baseUri, string relativeUri)
FrameworkFork\Microsoft.Xml\Xml\XmlXapResolver.cs (1)
25public override object GetEntity(Uri absoluteUri, string role, Type ofObjectToReturn)
FrameworkFork\System.Runtime.Serialization\System\Runtime\Serialization\CodeExporter.cs (2)
1423Uri uri = null; 1425if (Uri.TryCreate(dataContractNamespace, UriKind.RelativeOrAbsolute, out uri))
FrameworkFork\System.Runtime.Serialization\System\Runtime\Serialization\DataContract.cs (3)
922else if (type == typeof(Uri)) 1801Uri uri; 1802if (Uri.TryCreate(dataContractNs, UriKind.RelativeOrAbsolute, out uri))
FrameworkFork\System.Runtime.Serialization\System\Runtime\Serialization\Globals.cs (3)
236s_typeOfUri = typeof(Uri); 993private static Uri s_dataContractXsdBaseNamespaceUri; 994internal static Uri DataContractXsdBaseNamespaceUri
FrameworkFork\System.Runtime.Serialization\System\Runtime\Serialization\PrimitiveDataContract.cs (2)
797public UriDataContract() : base(typeof(Uri), DictionaryGlobals.UriLocalName, DictionaryGlobals.SchemaNamespace) 806writer.WriteUri((Uri)obj);
FrameworkFork\System.Runtime.Serialization\System\Runtime\Serialization\XmlObjectSerializerWriteContext.cs (3)
361internal virtual void WriteUri(XmlWriterDelegator xmlWriter, Uri value) 369internal virtual void WriteUri(XmlWriterDelegator xmlWriter, Uri value, XmlDictionaryString name, XmlDictionaryString ns) 373WriteNull(xmlWriter, typeof(Uri), true/*isMemberTypeSerializable*/, name, ns);
FrameworkFork\System.Runtime.Serialization\System\Runtime\Serialization\XmlObjectSerializerWriteContextComplex.cs (3)
123internal override void WriteUri(XmlWriterDelegator xmlWriter, Uri value) 133internal override void WriteUri(XmlWriterDelegator xmlWriter, Uri value, XmlDictionaryString name, XmlDictionaryString ns) 137WriteNull(xmlWriter, typeof(Uri), true/*isMemberTypeSerializable*/, name, ns);
FrameworkFork\System.Runtime.Serialization\System\Runtime\Serialization\XmlReaderDelegator.cs (1)
570internal Uri ReadElementContentAsUri()
FrameworkFork\System.Runtime.Serialization\System\Runtime\Serialization\XmlWriterDelegator.cs (2)
361WriteUri((Uri)value); 631internal void WriteUri(Uri value)
FrameworkFork\System.ServiceModel\System\IdentityModel\Claims\Claim.cs (1)
159public static Claim CreateUriClaim(Uri uri)
FrameworkFork\System.ServiceModel\System\ServiceModel\ChannelFactory.cs (2)
542public virtual TChannel CreateChannel(EndpointAddress address, Uri via) 647public static TChannel CreateChannel(Binding binding, EndpointAddress endpointAddress, Uri via)
FrameworkFork\System.ServiceModel\System\ServiceModel\Channels\Addressing.cs (15)
348private Uri _to; 353protected ToHeader(Uri to, AddressingVersion version) 380public Uri To 385public static ToHeader Create(Uri toUri, XmlDictionaryString dictionaryTo, AddressingVersion addressingVersion) 404public static ToHeader Create(Uri to, AddressingVersion addressingVersion) 429public static Uri ReadHeaderValue(XmlDictionaryReader reader, AddressingVersion version) 434public static Uri ReadHeaderValue(XmlDictionaryReader reader, AddressingVersion version, UriCache uriCache) 456Uri to = ReadHeaderValue(reader, version, uriCache); 495public DictionaryToHeader(Uri to, XmlDictionaryString dictionaryTo, AddressingVersion version) 513public FullToHeader(Uri to, string actor, bool mustUnderstand, bool relay, AddressingVersion version) 746internal static readonly Uri ReplyRelationshipType = new Uri(Addressing10Strings.ReplyRelationship); 769public virtual Uri RelationshipType 783public static RelatesToHeader Create(UniqueId messageId, AddressingVersion addressingVersion, Uri relationshipType) 806public static void ReadHeaderValue(XmlDictionaryReader reader, AddressingVersion version, out Uri relationshipType, out UniqueId messageId) 831Uri relationship;
FrameworkFork\System.ServiceModel\System\ServiceModel\Channels\AddressingVersion.cs (4)
18private Uri _anonymousUri; 19private Uri _noneUri; 145internal Uri AnonymousUri 150internal Uri NoneUri
FrameworkFork\System.ServiceModel\System\ServiceModel\Channels\BindingContext.cs (2)
15private Uri _listenUriBaseAddress; 57public Uri ListenUriBaseAddress
FrameworkFork\System.ServiceModel\System\ServiceModel\Channels\BufferedConnection.cs (2)
296public IConnection Connect(Uri uri, TimeSpan timeout) 301public async Task<IConnection> ConnectAsync(Uri uri, TimeSpan timeout)
FrameworkFork\System.ServiceModel\System\ServiceModel\Channels\ChannelFactoryBase.cs (3)
115public TChannel CreateChannel(EndpointAddress address, Uri via) 126private TChannel InternalCreateChannel(EndpointAddress address, Uri via) 147protected abstract TChannel OnCreateChannel(EndpointAddress address, Uri via);
FrameworkFork\System.ServiceModel\System\ServiceModel\Channels\ClientWebSocketFactory.cs (1)
23public abstract Task<WebSocket> CreateWebSocketAsync(Uri address, WebHeaderCollection headers, ICredentials credentials, WebSocketTransportSettings settings, TimeoutHelper timeoutHelper);
FrameworkFork\System.ServiceModel\System\ServiceModel\Channels\ClientWebSocketTransportDuplexSessionChannel.cs (1)
29public ClientWebSocketTransportDuplexSessionChannel(HttpChannelFactory<IDuplexSessionChannel> channelFactory, ClientWebSocketFactory connectionFactory, EndpointAddress remoteAddresss, Uri via)
FrameworkFork\System.ServiceModel\System\ServiceModel\Channels\CompositeDuplexBindingElement.cs (2)
18private Uri _clientBaseAddress; 31public Uri ClientBaseAddress
FrameworkFork\System.ServiceModel\System\ServiceModel\Channels\Connection.cs (2)
38IConnection Connect(Uri uri, TimeSpan timeout); 39Task<IConnection> ConnectAsync(Uri uri, TimeSpan timeout);
FrameworkFork\System.ServiceModel\System\ServiceModel\Channels\ConnectionOrientedTransportChannelFactory.cs (1)
199protected override TChannel OnCreateChannel(EndpointAddress address, Uri via)
FrameworkFork\System.ServiceModel\System\ServiceModel\Channels\ConnectionPool.cs (2)
50protected abstract TKey GetPoolKey(EndpointAddress address, Uri via); 200public TItem TakeConnection(EndpointAddress address, Uri via, TimeSpan timeout, out TKey key)
FrameworkFork\System.ServiceModel\System\ServiceModel\Channels\ConnectionPoolHelper.cs (2)
17private Uri _via; 32public ConnectionPoolHelper(ConnectionPool connectionPool, IConnectionInitiator connectionInitiator, Uri via)
FrameworkFork\System.ServiceModel\System\ServiceModel\Channels\ContextBindingElement.cs (3)
43public ContextBindingElement(ProtectionLevel protectionLevel, ContextExchangeMechanism contextExchangeMechanism, Uri clientCallbackAddress) 49public ContextBindingElement(ProtectionLevel protectionLevel, ContextExchangeMechanism contextExchangeMechanism, Uri clientCallbackAddress, bool contextManagementEnabled) 67public Uri ClientCallbackAddress
FrameworkFork\System.ServiceModel\System\ServiceModel\Channels\CoreClrClientWebSocketFactory.cs (1)
16public override async Task<WebSocket> CreateWebSocketAsync(Uri address, WebHeaderCollection headers, ICredentials credentials,
FrameworkFork\System.ServiceModel\System\ServiceModel\Channels\DnsCache.cs (1)
75public static async Task<IPAddress[]> ResolveAsync(Uri uri)
FrameworkFork\System.ServiceModel\System\ServiceModel\Channels\FramingChannels.cs (7)
21EndpointAddress localAddress, Uri localVia, EndpointAddress remoteAddresss, Uri via, bool exposeConnectionProperty) 28EndpointAddress remoteAddresss, Uri via, bool exposeConnectionProperty) 183EndpointAddress remoteAddresss, Uri via, IConnectionInitiator connectionInitiator, ConnectionPool connectionPool, 447Uri via, string contentType, TimeSpan timeout) 489Uri via, string contentType, ref TimeoutHelper timeoutHelper) 603public static bool ValidatePreambleResponse(byte[] buffer, int count, ClientFramingDecoder decoder, Uri via)
FrameworkFork\System.ServiceModel\System\ServiceModel\Channels\FramingDecoders.cs (2)
207private Uri _via; 234public Uri ValueAsUri
FrameworkFork\System.ServiceModel\System\ServiceModel\Channels\HttpChannelFactory.cs (18)
351internal Exception CreateToMustEqualViaException(Uri to, Uri via) 363EndpointAddress target, Uri via, ChannelParameterCollection channelParameters) 397protected virtual void ValidateCreateChannelParameters(EndpointAddress remoteAddress, Uri via) 410protected override TChannel OnCreateChannel(EndpointAddress remoteAddress, Uri via) 423protected virtual TChannel OnCreateChannelCore(EndpointAddress remoteAddress, Uri via) 590internal HttpRequestMessage GetHttpRequestMessage(Uri via) 592Uri httpRequestUri = via; 604private void ApplyManualAddressing(ref EndpointAddress to, ref Uri via, Message message) 608Uri toHeader = message.Headers.To; 646private void CreateAndOpenTokenProvidersCore(EndpointAddress to, Uri via, ChannelParameterCollection channelParameters, TimeSpan timeout, out SecurityTokenProviderContainer tokenProvider) 652internal void CreateAndOpenTokenProviders(EndpointAddress to, Uri via, ChannelParameterCollection channelParameters, TimeSpan timeout, out SecurityTokenProviderContainer tokenProvider) 685public HttpClientRequestChannel(HttpChannelFactory<IRequestChannel> factory, EndpointAddress to, Uri via, bool manualAddressing) 816internal virtual Task<HttpClient> GetHttpClientAsync(EndpointAddress to, Uri via, TimeoutHelper timeoutHelper) 821protected async Task<HttpClient> GetHttpClientAsync(EndpointAddress to, Uri via, SecurityTokenContainer clientCertificateToken, TimeoutHelper timeoutHelper) 850internal HttpRequestMessage GetHttpRequestMessage(Uri via) 877private Uri _via; 1231var requestUri = _httpRequestMessage.RequestUri;
FrameworkFork\System.ServiceModel\System\ServiceModel\Channels\HttpsChannelFactory.cs (6)
67protected override void ValidateCreateChannelParameters(EndpointAddress remoteAddress, Uri via) 80protected override TChannel OnCreateChannelCore(EndpointAddress address, Uri via) 121internal SecurityTokenProvider CreateAndOpenCertificateTokenProvider(EndpointAddress target, Uri via, ChannelParameterCollection channelParameters, TimeSpan timeout) 134EndpointAddress to, Uri via, ChannelParameterCollection channelParameters, ref TimeoutHelper timeoutHelper) 243public HttpsClientRequestChannel(HttpsChannelFactory<IRequestChannel> factory, EndpointAddress to, Uri via, bool manualAddressing) 316internal override async Task<HttpClient> GetHttpClientAsync(EndpointAddress to, Uri via, TimeoutHelper timeoutHelper)
FrameworkFork\System.ServiceModel\System\ServiceModel\Channels\IChannelFactory.cs (1)
18TChannel CreateChannel(EndpointAddress to, Uri via);
FrameworkFork\System.ServiceModel\System\ServiceModel\Channels\IChannelListener.cs (1)
9Uri Uri { get; }
FrameworkFork\System.ServiceModel\System\ServiceModel\Channels\IOutputChannel.cs (1)
13Uri Via { get; }
FrameworkFork\System.ServiceModel\System\ServiceModel\Channels\IRequestChannel.cs (1)
12Uri Via { get; }
FrameworkFork\System.ServiceModel\System\ServiceModel\Channels\LayeredChannelFactory.cs (1)
194public Uri Via
FrameworkFork\System.ServiceModel\System\ServiceModel\Channels\Message.cs (7)
2040public Uri CreateUri(string uriString) 2042Uri uri = Get(uriString); 2051private Uri Get(string key) 2061private void Set(string key, Uri value) 2079private Uri _value; 2081public Entry(string key, Uri value) 2092public Uri Value
FrameworkFork\System.ServiceModel\System\ServiceModel\Channels\MessageBuffer.cs (1)
57private Uri _to;
FrameworkFork\System.ServiceModel\System\ServiceModel\Channels\MessageHeaders.cs (7)
293public Uri To 705private int FindRelatesTo(Uri relationshipType, out UniqueId messageId) 713Uri tempRelationship; 987internal UniqueId GetRelatesTo(Uri relationshipType) 997private void GetRelatesToValues(int index, out Uri relationshipType, out UniqueId messageId) 1484internal void SetRelatesTo(Uri relationshipType, UniqueId messageId) 1504private void SetRelatesTo(Uri relationshipType, RelatesToHeader relatesToHeader)
FrameworkFork\System.ServiceModel\System\ServiceModel\Channels\MessageProperties.cs (3)
17private Uri _via; 264public Uri Via 668Via = (Uri)value;
FrameworkFork\System.ServiceModel\System\ServiceModel\Channels\OutputChannel.cs (1)
22public abstract Uri Via { get; }
FrameworkFork\System.ServiceModel\System\ServiceModel\Channels\PrivacyNoticeBindingElement.cs (2)
13private Uri _url; 28public Uri Url
FrameworkFork\System.ServiceModel\System\ServiceModel\Channels\RequestChannel.cs (3)
18private Uri _via; 23protected RequestChannel(ChannelManagerBase channelFactory, EndpointAddress to, Uri via, bool manualAddressing) 55public Uri Via
FrameworkFork\System.ServiceModel\System\ServiceModel\Channels\ServiceChannel.cs (3)
275public Uri ListenUri 380public Uri Via 591Uri localUri = localAddress.Uri;
FrameworkFork\System.ServiceModel\System\ServiceModel\Channels\ServiceChannelFactory.cs (9)
309public virtual ServiceChannel CreateServiceChannel(EndpointAddress address, Uri via) 331public TChannel CreateChannel<TChannel>(EndpointAddress address, Uri via) 394protected abstract IChannelBinder CreateInnerChannelBinder(EndpointAddress address, Uri via); 488protected override IChannelBinder CreateInnerChannelBinder(EndpointAddress to, Uri via) 507protected override IChannelBinder CreateInnerChannelBinder(EndpointAddress to, Uri via) 527protected override IChannelBinder CreateInnerChannelBinder(EndpointAddress to, Uri via) 548protected override IChannelBinder CreateInnerChannelBinder(EndpointAddress to, Uri via) 577protected override IChannelBinder CreateInnerChannelBinder(EndpointAddress to, Uri via) 603protected override IChannelBinder CreateInnerChannelBinder(EndpointAddress to, Uri via)
FrameworkFork\System.ServiceModel\System\ServiceModel\Channels\ServiceChannelProxy.cs (4)
635Uri IClientChannel.Via 710Uri IOutputChannel.Via 800Uri IRequestChannel.Via 805Uri IServiceChannel.ListenUri
FrameworkFork\System.ServiceModel\System\ServiceModel\Channels\SocketConnection.cs (5)
435public static Exception ConvertConnectException(SocketException socketException, Uri remoteUri, TimeSpan timeSpent, Exception innerException) 482private static async Task<IPAddress[]> GetIPAddressesAsync(Uri uri) 512private static TimeoutException CreateTimeoutException(Uri uri, TimeSpan timeout, IPAddress[] addresses, int invalidAddressCount, 535public IConnection Connect(Uri uri, TimeSpan timeout) 587public async Task<IConnection> ConnectAsync(Uri uri, TimeSpan timeout)
FrameworkFork\System.ServiceModel\System\ServiceModel\Channels\SslStreamSecurityUpgradeProvider.cs (2)
223public override StreamUpgradeInitiator CreateUpgradeInitiator(EndpointAddress remoteAddress, Uri via) 452EndpointAddress remoteAddress, Uri via)
FrameworkFork\System.ServiceModel\System\ServiceModel\Channels\StreamSecurityUpgradeInitiatorBase.cs (3)
16private Uri _via; 22protected StreamSecurityUpgradeInitiatorBase(string upgradeString, EndpointAddress remoteAddress, Uri via) 37protected Uri Via
FrameworkFork\System.ServiceModel\System\ServiceModel\Channels\StreamUpgradeProvider.cs (1)
46public abstract StreamUpgradeInitiator CreateUpgradeInitiator(EndpointAddress remoteAddress, Uri via);
FrameworkFork\System.ServiceModel\System\ServiceModel\Channels\TcpConnectionPool.cs (1)
35protected override string GetPoolKey(EndpointAddress address, Uri via)
FrameworkFork\System.ServiceModel\System\ServiceModel\Channels\TransportChannelFactory.cs (1)
168public void ValidateScheme(Uri via)
FrameworkFork\System.ServiceModel\System\ServiceModel\Channels\TransportDuplexSessionChannel.cs (3)
26private Uri _localVia; 33Uri localVia, 35Uri via)
FrameworkFork\System.ServiceModel\System\ServiceModel\Channels\TransportOutputChannel.cs (4)
17private Uri _via; 21protected TransportOutputChannel(ChannelManagerBase channelManager, EndpointAddress to, Uri via, bool manualAddressing, MessageVersion messageVersion) 31Uri toUri; 84public override Uri Via
FrameworkFork\System.ServiceModel\System\ServiceModel\Channels\TransportSecurityHelpers.cs (14)
125internal static SecurityTokenRequirement CreateSspiTokenRequirement(string transportScheme, Uri listenUri) 135internal static SecurityTokenRequirement CreateSspiTokenRequirement(EndpointAddress target, Uri via, string transportScheme) 147SecurityTokenManager tokenManager, EndpointAddress target, Uri via, string transportScheme, AuthenticationSchemes authenticationScheme, ChannelParameterCollection channelParameters) 164SecurityTokenManager tokenManager, EndpointAddress target, Uri via, string transportScheme, 184SecurityTokenManager tokenManager, EndpointAddress target, Uri via, 207SecurityTokenManager tokenManager, EndpointAddress target, Uri via, string transportScheme, ChannelParameterCollection channelParameters) 261SecurityTokenManager tokenManager, EndpointAddress target, Uri via, string transportScheme, AuthenticationSchemes authenticationScheme, 278public static Uri GetListenUri(Uri baseAddress, string relativeAddress) 280Uri fullUri = baseAddress; 300EndpointAddress target, Uri via, string transportScheme) 312private static void FixIpv6Hostname(UriBuilder uriBuilder, Uri originalUri) 326public static bool AddIdentityMapping(Uri via, EndpointAddress target) 333public static void RemoveIdentityMapping(Uri via, EndpointAddress target, bool validateState)
FrameworkFork\System.ServiceModel\System\ServiceModel\Channels\WebSocketHelper.cs (3)
49internal static bool IsWebSocketUri(Uri uri) 56internal static Uri NormalizeHttpSchemeWithWsScheme(Uri uri)
FrameworkFork\System.ServiceModel\System\ServiceModel\Channels\WebSocketTransportDuplexSessionChannel.cs (1)
30public WebSocketTransportDuplexSessionChannel(HttpChannelFactory<IDuplexSessionChannel> channelFactory, EndpointAddress remoteAddresss, Uri via)
FrameworkFork\System.ServiceModel\System\ServiceModel\Channels\WindowsStreamSecurityUpgradeProvider.cs (3)
34private Uri _listenUri; 122public override StreamUpgradeInitiator CreateUpgradeInitiator(EndpointAddress remoteAddress, Uri via) 282WindowsStreamSecurityUpgradeProvider parent, EndpointAddress remoteAddress, Uri via)
FrameworkFork\System.ServiceModel\System\ServiceModel\ClientBase.cs (3)
593Uri IClientChannel.Via 761Uri IOutputChannel.Via 796Uri IRequestChannel.Via
FrameworkFork\System.ServiceModel\System\ServiceModel\Description\ClientClassGenerator.cs (1)
43private static Type s_uriType = typeof(Uri);
FrameworkFork\System.ServiceModel\System\ServiceModel\Description\DispatcherBuilder.cs (3)
51private Uri _listenUri; 54public ListenUriInfo(Uri listenUri, ListenUriMode listenUriMode) 60public Uri ListenUri
FrameworkFork\System.ServiceModel\System\ServiceModel\Description\MetadataExchangeClient.cs (20)
39private Uri _ctorUri = null; 50public MetadataExchangeClient(Uri address, MetadataExchangeClientMode mode) 187private bool IsHttpOrHttps(Uri address) 208private void Validate(Uri address, MetadataExchangeClientMode mode) 238public IAsyncResult BeginGetMetadata(Uri address, MetadataExchangeClientMode mode, AsyncCallback callback, object asyncState) 283public Task<MetadataSet> GetMetadataAsync(Uri address, MetadataExchangeClientMode mode) 304public Task<MetadataSet> GetMetadataAsync(EndpointAddress address, Uri via) 329public MetadataSet GetMetadata(Uri address, MetadataExchangeClientMode mode) 356public MetadataSet GetMetadata(EndpointAddress address, Uri via) 421protected internal virtual HttpWebRequest GetWebRequest(Uri location, string dialect, string identifier) 431internal static void TraceSendRequest(Uri address) 585private Uri CreateUri(string baseUri, string relativeUri) 701private Uri _location; 702private Uri _responseLocation; 704internal MetadataLocationRetriever(Uri location, MetadataExchangeClient resolver) 709internal MetadataLocationRetriever(Uri location, MetadataExchangeClient resolver, string dialect, string identifier) 717internal static void ValidateLocation(Uri location) 912private Uri _via; 919public MetadataReferenceRetriever(EndpointAddress address, Uri via, MetadataExchangeClient resolver) 929private MetadataReferenceRetriever(EndpointAddress address, Uri via, MetadataExchangeClient resolver, string dialect, string identifier)
FrameworkFork\System.ServiceModel\System\ServiceModel\Description\MetadataLocation.cs (2)
31Uri uri; 32if (!Uri.TryCreate(value, UriKind.RelativeOrAbsolute, out uri))
FrameworkFork\System.ServiceModel\System\ServiceModel\Description\ServiceEndpoint.cs (4)
21private Uri _listenUri; 118public Uri ListenUri 171internal Uri UnresolvedAddress 177internal Uri UnresolvedListenUri
FrameworkFork\System.ServiceModel\System\ServiceModel\Description\ServiceEndpointCollection.cs (1)
101public ServiceEndpoint Find(Uri address)
FrameworkFork\System.ServiceModel\System\ServiceModel\Description\ServiceMetadataExtension.cs (8)
194internal DynamicAddressUpdateWriter(Uri listenUri, string requestHost, int requestPort, 227Uri uri; 238else if (Uri.TryCreate(text, UriKind.Absolute, out uri)) 240Uri newUri = UpdateUri(uri); 249public void UpdateUri(ref Uri uri, bool updateBaseAddressOnly = false) 251Uri newUri = UpdateUri(uri, updateBaseAddressOnly); 258private Uri UpdateUri(Uri uri, bool updateBaseAddressOnly = false)
FrameworkFork\System.ServiceModel\System\ServiceModel\Description\ServiceReflector.cs (5)
31if (Uri.IsWellFormedUriString(path, UriKind.Absolute) || path == String.Empty) 155Uri uri; 156if (!Uri.TryCreate(ns, UriKind.RelativeOrAbsolute, out uri)) 162Uri uri; 163if (!Uri.TryCreate(ns, UriKind.RelativeOrAbsolute, out uri))
FrameworkFork\System.ServiceModel\System\ServiceModel\Dispatcher\BufferedReceiveBinder.cs (1)
41public Uri ListenUri
FrameworkFork\System.ServiceModel\System\ServiceModel\Dispatcher\ClientRuntime.cs (2)
64private Uri _via; 184public Uri Via
FrameworkFork\System.ServiceModel\System\ServiceModel\Dispatcher\DuplexChannelBinder.cs (5)
24private Uri _listenUri; 41internal DuplexChannelBinder(IDuplexChannel channel, IRequestReplyCorrelator correlator, Uri listenUri) 47internal DuplexChannelBinder(IDuplexSessionChannel channel, IRequestReplyCorrelator correlator, Uri listenUri) 122public Uri ListenUri 1068public Uri Via
FrameworkFork\System.ServiceModel\System\ServiceModel\Dispatcher\EndpointDispatcher.cs (1)
18private Uri _listenUri;
FrameworkFork\System.ServiceModel\System\ServiceModel\Dispatcher\IChannelBinder.cs (1)
13Uri ListenUri { get; }
FrameworkFork\System.ServiceModel\System\ServiceModel\Dispatcher\InputChannelBinder.cs (3)
16private Uri _listenUri; 18internal InputChannelBinder(IInputChannel channel, Uri listenUri) 39public Uri ListenUri
FrameworkFork\System.ServiceModel\System\ServiceModel\Dispatcher\OutputChannelBinder.cs (1)
37public Uri ListenUri
FrameworkFork\System.ServiceModel\System\ServiceModel\Dispatcher\ReplyChannelBinder.cs (3)
16private Uri _listenUri; 18internal ReplyChannelBinder(IReplyChannel channel, Uri listenUri) 39public Uri ListenUri
FrameworkFork\System.ServiceModel\System\ServiceModel\Dispatcher\RequestChannelBinder.cs (1)
34public Uri ListenUri
FrameworkFork\System.ServiceModel\System\ServiceModel\DuplexChannelFactory.cs (4)
202public override TChannel CreateChannel(EndpointAddress address, Uri via) 207public virtual TChannel CreateChannel(InstanceContext callbackInstance, EndpointAddress address, Uri via) 274public static TChannel CreateChannel(object callbackObject, Binding binding, EndpointAddress endpointAddress, Uri via) 295public static TChannel CreateChannel(InstanceContext callbackInstance, Binding binding, EndpointAddress endpointAddress, Uri via)
FrameworkFork\System.ServiceModel\System\ServiceModel\EndpointAddress.cs (33)
16private static Uri s_anonymousUri; 17private static Uri s_noneUri; 75private Uri _uri; 86private EndpointAddress(AddressingVersion version, Uri uri, EndpointIdentity identity, AddressHeaderCollection headers, XmlBuffer buffer, int metadataSection, int extensionSection, int pspSection) 98Uri u = new Uri(uri); 103public EndpointAddress(Uri uri, params AddressHeader[] addressHeaders) 108public EndpointAddress(Uri uri, EndpointIdentity identity, params AddressHeader[] addressHeaders) 118public EndpointAddress(Uri uri, EndpointIdentity identity, AddressHeaderCollection headers) 128internal EndpointAddress(Uri newUri, EndpointAddress oldEndpointAddress) 133internal EndpointAddress(Uri uri, EndpointIdentity identity, AddressHeaderCollection headers, XmlDictionaryReader metadataReader, XmlDictionaryReader extensionReader, XmlDictionaryReader pspReader) 163public EndpointAddress(Uri uri, EndpointIdentity identity, AddressHeaderCollection headers, XmlDictionaryReader metadataReader, XmlDictionaryReader extensionReader) 168private void Init(Uri uri, EndpointIdentity identity, AddressHeader[] headers) 180private void Init(Uri uri, EndpointIdentity identity, AddressHeaderCollection headers, XmlBuffer buffer, int metadataSection, int extensionSection, int pspSection) 185private void Init(AddressingVersion version, Uri uri, EndpointIdentity identity, AddressHeaderCollection headers, XmlBuffer buffer, int metadataSection, int extensionSection, int pspSection) 229public static Uri AnonymousUri 239public static Uri NoneUri 294public Uri Uri 307Uri uri = this.Uri; 344internal static bool UriEquals(Uri u1, Uri u2, bool ignoreCase, bool includeHostInComparison) 349internal static bool UriEquals(Uri u1, Uri u2, bool ignoreCase, bool includeHostInComparison, bool includePortInComparison) 395internal static int UriGetHashCode(Uri uri, bool includeHostInComparison) 400internal static int UriGetHashCode(Uri uri, bool includeHostInComparison, bool includePortInComparison) 433Uri thisTo = this.Uri; 434Uri otherTo = endpointAddress.Uri; 662Uri uri; 747private static bool ReadContentsFrom200408(XmlDictionaryReader reader, out Uri uri, out AddressHeaderCollection headers, out EndpointIdentity identity, out XmlBuffer buffer, out int metadataSection, out int extensionSection, out int pspSection) 897if (!Uri.TryCreate(address, UriKind.Absolute, out uri)) 903private static bool ReadContentsFrom10(XmlDictionaryReader reader, out Uri uri, out AddressHeaderCollection headers, out EndpointIdentity identity, out XmlBuffer buffer, out int metadataSection, out int extensionSection) 964if (!Uri.TryCreate(address, UriKind.Absolute, out uri)) 1262private Uri _uri; 1294public Uri Uri
FrameworkFork\System.ServiceModel\System\ServiceModel\IClientChannel.cs (1)
19Uri Via { get; }
FrameworkFork\System.ServiceModel\System\ServiceModel\IServiceChannel.cs (1)
9Uri ListenUri { get; }
FrameworkFork\System.ServiceModel\System\ServiceModel\NetTcpContextBinding.cs (1)
35public Uri ClientCallbackAddress
FrameworkFork\System.ServiceModel\System\ServiceModel\Security\IdentityVerifier.cs (4)
33private static void AdjustAddress(ref EndpointAddress reference, Uri via) 42internal bool TryGetIdentity(EndpointAddress reference, Uri via, out EndpointIdentity identity) 48internal void EnsureOutgoingIdentity(EndpointAddress serviceReference, Uri via, AuthorizationContext authorizationContext) 184Uri toAddress = reference.Uri;
FrameworkFork\System.ServiceModel\System\ServiceModel\Security\SecurityProtocolFactory.cs (6)
113private Uri _listenUri; 116private Uri _privacyNoticeUri; 292public Uri PrivacyNoticeUri 583public Uri ListenUri 693public SecurityProtocol CreateSecurityProtocol(EndpointAddress target, Uri via, object listenerSecurityState, bool isReturnLegSecurityRequired, TimeSpan timeout) 733protected abstract SecurityProtocol OnCreateSecurityProtocol(EndpointAddress target, Uri via, object listenerSecurityState, TimeSpan timeout);
FrameworkFork\System.ServiceModel\System\ServiceModel\Security\Tokens\InitiatorServiceModelSecurityTokenRequirement.cs (2)
31public Uri Via 35return GetPropertyOrDefault<Uri>(ViaProperty, null);
FrameworkFork\System.ServiceModel\System\ServiceModel\Security\Tokens\RecipientServiceModelSecurityTokenRequirement.cs (2)
15public Uri ListenUri 19return GetPropertyOrDefault<Uri>(ListenUriProperty, null);
FrameworkFork\System.ServiceModel\System\ServiceModel\Security\WSSecurityPolicy.cs (1)
2831private static readonly Uri s_selfIssuerUri = new Uri(WSIdentityNamespace + "/issuer/self");
FrameworkFork\System.ServiceModel\System\ServiceModel\Security\WSTrustFeb2005.cs (1)
266public IRequestChannel CreateChannel(EndpointAddress address, Uri via)
FrameworkFork\System.ServiceModel\System\ServiceModel\Security\X509CertificateRecipientClientCredential.cs (7)
20private Dictionary<Uri, X509Certificate2> _scopedCertificates; 26_scopedCertificates = new Dictionary<Uri, X509Certificate2>(); 38_scopedCertificates = new Dictionary<Uri, X509Certificate2>(); 39foreach (Uri uri in other.ScopedCertificates.Keys) 59public Dictionary<Uri, X509Certificate2> ScopedCertificates 107public void SetScopedCertificate(string subjectName, StoreLocation storeLocation, StoreName storeName, Uri targetService) 116public void SetScopedCertificate(StoreLocation storeLocation, StoreName storeName, X509FindType findType, object findValue, Uri targetService)
FrameworkFork\System.ServiceModel\System\ServiceModel\UriSchemeKeyedCollection.cs (6)
9public class UriSchemeKeyedCollection : SynchronizedKeyedCollection<string, Uri> 16public UriSchemeKeyedCollection(params Uri[] addresses) 27protected override string GetKeyForItem(Uri item) 32protected override void InsertItem(int index, Uri item) 41protected override void SetItem(int index, Uri item) 52internal static void ValidateBaseAddress(Uri uri, string argumentName)
FrameworkFork\System.ServiceModel\System\ServiceModel\WSFederationHttpBinding.cs (2)
26private Uri _privacyNoticeAt; 65public Uri PrivacyNoticeAt
FrameworkFork\System.ServiceModel\System\ServiceModel\WSHttpContextBinding.cs (1)
43public Uri ClientCallbackAddress
Metadata\IClientCertificateProvider.cs (1)
12X509Certificate GetCertificate(Uri serviceUri);
Metadata\IHttpCredentialsProvider.cs (1)
12NetworkCredential GetCredentials(Uri serviceUri, WebException webException);
Metadata\IServerCertificateValidationProvider.cs (2)
11void BeforeServerCertificateValidation(Uri serviceUri); 13void AfterServerCertificateValidation(Uri serviceUri);
Metadata\MetadaExchangeResolver.cs (3)
171private async Task<bool> ResolveMetadataAsync(Uri serviceUri, MetadataExchangeClientMode metadataExchangeMode, bool captureException, CancellationToken cancellationToken) 299private bool RequiresAuthentication(Exception exception, Uri serviceUri, out bool isAuthenticationError) 342internal protected override HttpWebRequest GetWebRequest(Uri location, string dialect, string identifier)
Metadata\MetadataDocumentLoader.cs (29)
52public Uri MetadataSourceUrl { get; private set; } 57private List<Uri> metadataSourceFiles { get; set; } = new List<Uri>(); 58public IEnumerable<Uri> MetadataSourceFiles { get { return this.metadataSourceFiles; } } 95if (!CanLoad(uri, string.Empty, Directory.GetCurrentDirectory(), out Uri metadataUri)) 137if (!CanLoad(uri, string.Empty, Directory.GetCurrentDirectory(), out Uri metadataUri)) 188foreach (var fileUri in this.MetadataSourceFiles) 212if (CanLoad(uri, baseUrl, basePath, out Uri serviceUri)) 250public static bool CanLoad(string uri, out Uri serviceUri) 255public static bool CanLoad(string uri, string baseUrl, string basePath, out Uri serviceUri) 269if (Uri.TryCreate(uri, UriKind.Absolute, out serviceUri) || 270isUrl && Uri.TryCreate(baseUrl, UriKind.Absolute, out Uri baseUri) && Uri.TryCreate(baseUri, uri, out serviceUri) || 271!isUrl && Uri.TryCreate(Path.Combine(basePath, uri), UriKind.Absolute, out serviceUri)) 376if (TryGetSchemaUriFromSchemaImport(schemaLocation, baseUrl, basePath, specNamespace, fileExtension, out Uri schemaUri)) 467private bool TryGetSchemaUriFromSchemaImport(string schemaLocation, string baseUrl, string basePath, string specNamespace, string extension, out Uri schemaUri) 480if (Uri.TryCreate(schemaLocation, UriKind.Absolute, out schemaUri)) 482if (TryGetExistingSchemaFile(schemaUri, schemaLocation, basePath, specNamespace, extension, out Uri schemaFile)) 490if (Uri.TryCreate(Path.Combine(basePath, schemaLocation), UriKind.Absolute, out Uri schemaFile)) 498if (schemaUri == null && Uri.TryCreate(baseUrl, UriKind.Absolute, out Uri baseUri)) 501Uri.TryCreate(baseUri, schemaLocation, out schemaUri); 518private bool TryGetExistingSchemaFile(Uri schemaUri, string schemaLocation, string basePath, string specNamespace, string extension, out Uri schemaFile) 557Uri.TryCreate(fullFileName, UriKind.Absolute, out schemaFile); 563private async Task<Stream> DownloadSchemaImportAsync(Uri schemaUri, CancellationToken cancellationToken) 706var metadataUri = metadataSourceFiles[0];
Metadata\MetadataDocumentSaver.cs (3)
141if (MetadataFileNameManager.TryCreateUri(location, out Uri locationUri) && MetadataFileNameManager.TryResolveFiles(locationUri.LocalPath, out var files)) 302Uri.TryCreate(location, UriKind.Absolute, out Uri uri);
Metadata\MetadataFileNameManager.cs (11)
104if (Uri.TryCreate(ns, UriKind.RelativeOrAbsolute, out Uri nsUri)) 198public static bool TryCreateUri(string filePath1, out Uri fileUri) 200if (Uri.TryCreate(filePath1, UriKind.Absolute, out fileUri) || Uri.TryCreate(filePath1, UriKind.Relative, out fileUri)) 210Uri uri1, uri2; 211return Uri.TryCreate(filePath1, UriKind.Absolute, out uri1) && Uri.TryCreate(filePath2, UriKind.Absolute, out uri2) && StringComparer.OrdinalIgnoreCase.Compare(uri1.AbsoluteUri, uri2.AbsoluteUri) == 0 || 212Uri.TryCreate(filePath1, UriKind.Relative, out uri1) && Uri.TryCreate(filePath2, UriKind.Relative, out uri2) && StringComparer.OrdinalIgnoreCase.Compare(uri1.ToString(), uri2.ToString()) == 0; 225var baseUri = new Uri(baseUrl, UriKind.RelativeOrAbsolute);
Metadata\ServiceDescriptor.cs (2)
61public Uri MetadataUrl { get { return this.metadataDocumentLoader.MetadataSourceUrl; } } 63public IEnumerable<Uri> MetadataFiles { get { return this.metadataDocumentLoader.MetadataSourceFiles; } }
OutputPathHelper.cs (2)
116if (Uri.TryCreate(ns, UriKind.RelativeOrAbsolute, out Uri nsUri))
Shared\Options\ApplicationOptions.cs (3)
43public ListValue<Uri> Inputs { get { return GetValue<ListValue<Uri>>(InputsKey); } } 56new ListValueOption<Uri>(InputsKey),
Shared\Options\OptionValueParser.cs (3)
50else if (valueType == typeof(Uri)) 52value = CreateValue<Uri>(() => new Uri(stringValue, UriKind.RelativeOrAbsolute), option, stringValue); 108else if (value is Uri uri)
Shared\Options\UpdateOptions.cs (3)
100var input = this.Inputs[idx]; 118var input = this.Inputs[idx]; 120if (!input.IsAbsoluteUri && PathHelper.IsFile(input, optionsFileDirectory.FullName, out var fileUri))
Shared\Utilities\PathHelper.cs (5)
48internal static bool IsFile(string input, string basePath, out Uri fileUri) 61if (!isUrl && (Uri.TryCreate(Path.Combine(basePath, input), UriKind.Absolute, out var uri)) && uri.Scheme == "file") 74internal static bool IsFile(Uri uri, string basePath, out Uri fileUri)
ToolMexException.cs (3)
13private Uri _serviceUri; 16internal Uri ServiceUri { get { return _serviceUri; } } 18internal ToolMexException(ToolInputException wsMexException, Uri serviceUri)
dotnet-svcutil.xmlserializer (4)
Microsoft\Tools\ServiceModel\SvcUtil\InputModule.cs (2)
80Uri serviceUri; 83if (Uri.TryCreate(path, UriKind.Absolute, out serviceUri) && !serviceUri.IsFile)
Microsoft\Tools\ServiceModel\SvcUtil\OutputModule.cs (2)
166Uri nsUri = null; 167if (Uri.TryCreate(ns, UriKind.RelativeOrAbsolute, out nsUri))
GenerateDocumentationAndConfigFiles (7)
Program.cs (2)
845if (!Uri.TryCreate(helpLink, UriKind.Absolute, out var uri))
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\DiagnosticDescriptorExtensions.cs (5)
255internal static Uri? GetValidHelpLinkUri(this DiagnosticDescriptor descriptor) 256=> Uri.TryCreate(descriptor.HelpLinkUri, UriKind.Absolute, out var uri) && 257(uri.Scheme == Uri.UriSchemeHttp || uri.Scheme == Uri.UriSchemeHttps) ? uri : null;
ILCompiler.Compiler (1)
src\runtime\src\coreclr\tools\Common\Microsoft\SourceLink\Tools\SourceLinkMap.cs (1)
181var escapedPath = string.Join("/", path[file.Path.Length..].Split(['/', '\\']).Select(Uri.EscapeDataString));
Infrastructure.Common (2)
ServiceUtilHelper.cs (2)
491private static Uri BuildBaseUri(string protocol) 565var baseUri = BuildBaseUri(protocol);
Microsoft.AspNetCore.Authentication (2)
AuthenticationHandler.cs (2)
106get => Request.Scheme + Uri.SchemeDelimiter + Request.Host + Request.PathBase + Request.Path + Request.QueryString; 197=> Request.Scheme + Uri.SchemeDelimiter + Request.Host + OriginalPathBase + targetPath;
Microsoft.AspNetCore.Authentication.Cookies (1)
PostConfigureCookieAuthenticationOptions.cs (1)
38options.Cookie.Name = CookieAuthenticationDefaults.CookiePrefix + Uri.EscapeDataString(name);
Microsoft.AspNetCore.Authentication.OpenIdConnect (2)
OpenIdConnectHandler.cs (2)
283if (!Uri.IsWellFormedUriString(redirectUri, UriKind.Absolute)) 529if (!Uri.IsWellFormedUriString(redirectUri, UriKind.Absolute))
Microsoft.AspNetCore.Authentication.Twitter (13)
TwitterHandler.cs (13)
219stringBuilder.AppendFormat(CultureInfo.InvariantCulture, "{0}={1}&", Uri.EscapeDataString(signaturePart.Key), Uri.EscapeDataString(signaturePart.Value)); 227stringBuilder.Append(Uri.EscapeDataString(url)); 229stringBuilder.Append(Uri.EscapeDataString(parameterString)); 251stringBuilder.AppendFormat(CultureInfo.InvariantCulture, "{0}=\"{1}\",", authorizationPart.Key, Uri.EscapeDataString(authorizationPart.Value)); 286Token = Uri.UnescapeDataString(responseParameters["oauth_token"].ToString()), 287TokenSecret = Uri.UnescapeDataString(responseParameters["oauth_token_secret"].ToString()), 313Token = Uri.UnescapeDataString(responseParameters["oauth_token"].ToString()), 314TokenSecret = Uri.UnescapeDataString(responseParameters["oauth_token_secret"].ToString()), 315UserId = Uri.UnescapeDataString(responseParameters["user_id"].ToString()), 316ScreenName = Uri.UnescapeDataString(responseParameters["screen_name"].ToString()), 350Uri.EscapeDataString(consumerSecret), 351string.IsNullOrEmpty(tokenSecret) ? string.Empty : Uri.EscapeDataString(tokenSecret)));
Microsoft.AspNetCore.Authentication.WsFederation (5)
WsFederationHandler.cs (3)
134wsFederationMessage.Wctx = Uri.EscapeDataString(Options.StateDataFormat.Protect(properties)); 137if (!Uri.IsWellFormedUriString(redirectUri, UriKind.Absolute)) 458if (!Uri.IsWellFormedUriString(redirectUri, UriKind.Absolute))
WsFederationPostConfigureOptions.cs (2)
52if (!options.CallbackPath.HasValue && !string.IsNullOrEmpty(options.Wreply) && Uri.TryCreate(options.Wreply, UriKind.Absolute, out var wreply))
Microsoft.AspNetCore.Components (12)
NavigationManager.cs (5)
59private Uri? _baseUri; 223=> uri.StartsWith('/') || System.Uri.TryCreate(uri, UriKind.Absolute, out _); 312public Uri ToAbsoluteUri(string? relativeUri) 615private static bool TryGetLengthOfBaseUriPrefix(Uri baseUri, string uri, out int length) 643private static void Validate(Uri? baseUri, string uri)
NavigationManagerExtensions.cs (6)
169EncodedName = Uri.EscapeDataString(name); 198var encodedValue = Uri.EscapeDataString(formattedValue!); 243_encodedValue = Uri.EscapeDataString(formattedValue!); 610var encodedName = Uri.EscapeDataString(name); 611var encodedValue = Uri.EscapeDataString(value); 662var encodedName = Uri.EscapeDataString(name);
src\aspnetcore\src\Shared\QueryStringEnumerable.cs (1)
101var success = Uri.TryUnescapeDataString(buffer, buffer, out var unescapedLength);
Microsoft.AspNetCore.Components.Endpoints (10)
FormMapping\Converters\UriFormDataConverter.cs (5)
9internal class UriFormDataConverter : FormDataConverter<Uri>, ISingleValueConverter<Uri> 13public bool TryConvertValue(ref FormDataReader reader, string value, out Uri result) 15if (Uri.TryCreate(value, UriKind.RelativeOrAbsolute, out result!)) 32internal override bool TryRead(ref FormDataReader context, Type type, FormDataMapperOptions options, out Uri? result, out bool found)
FormMapping\WellKnownConverters.cs (1)
49{ typeof(Uri), new UriFormDataConverter() },
Rendering\EndpointHtmlRenderer.Prerendering.cs (2)
266if (!Uri.TryCreate(destinationUrl, UriKind.Absolute, out var absoluteUri))
Routing\BasePath.cs (2)
39if (Uri.TryCreate(baseUri, UriKind.Absolute, out var absoluteUri))
Microsoft.AspNetCore.Components.QuickGrid (1)
src\aspnetcore\src\Shared\QueryStringEnumerable.cs (1)
101var success = Uri.TryUnescapeDataString(buffer, buffer, out var unescapedLength);
Microsoft.AspNetCore.Components.Server (4)
ComponentHub.cs (4)
103!Uri.TryCreate(baseUri, UriKind.Absolute, out _) || 104!Uri.TryCreate(uri, UriKind.Absolute, out _)) 310!Uri.TryCreate(baseUri, UriKind.Absolute, out _) || 311!Uri.TryCreate(uri, UriKind.Absolute, out _))
Microsoft.AspNetCore.Components.Testing (1)
Infrastructure\RemoteLock.cs (1)
40var encodedKey = Uri.EscapeDataString(_key);
Microsoft.AspNetCore.Components.WebAssembly.Authentication (3)
Options\DefaultOidcProviderOptionsConfiguration.cs (2)
19if (redirectUri == null || !Uri.TryCreate(redirectUri, UriKind.Absolute, out _)) 27if (logoutUri == null || !Uri.TryCreate(logoutUri, UriKind.Absolute, out _))
Services\AuthorizationMessageHandler.cs (1)
24private Uri[]? _authorizedUris;
Microsoft.AspNetCore.Components.WebAssembly.Server (4)
TargetPickerUi.cs (3)
368var underlyingV8Endpoint = new Uri(tabToDebug.WebSocketDebuggerUrl); 369var proxyEndpoint = new Uri(_debugProxyUrl); 370var devToolsUrlAbsolute = new Uri(new Uri(_browserHost), relativeUri: NormalizeDevtoolsFrontendUrl(tabToDebug.DevtoolsFrontendUrl));
WebAssemblyNetDebugProxyAppBuilderExtensions.cs (1)
27Uri? browserUrl = null;
Microsoft.AspNetCore.Components.WebView (9)
StaticContentProvider.cs (3)
12private readonly Uri _appBaseUri; 16public StaticContentProvider(IFileProvider fileProvider, Uri appBaseUri, string hostPageRelativePath) 25var fileUri = new Uri(requestUri);
WebViewManager.cs (6)
26private readonly Uri _appBaseUri; 46public WebViewManager(IServiceProvider provider, Dispatcher dispatcher, Uri appBaseUri, IFileProvider fileProvider, JSComponentConfigurationStore jsComponents, string hostPageRelativePath) 76protected abstract void NavigateCore(Uri absoluteUri); 145protected void MessageReceived(Uri sourceUri, string message) 245private static Uri EnsureTrailingSlash(Uri uri)
Microsoft.AspNetCore.Components.WebView.Maui (9)
Extensions\UriExtensions.cs (2)
8 internal static bool IsBaseOfPage(this Uri baseUri, string? uriString) 16 var uri = new Uri(uriString!);
src\BlazorWebView\src\SharedSource\Log.cs (3)
9 public static partial void NavigatingToUri(this ILogger logger, Uri uri); 30 public static partial void NavigationEvent(this ILogger logger, Uri uri, UrlLoadingStrategy urlLoadingStrategy); 33 public static partial void LaunchExternalBrowser(this ILogger logger, Uri uri);
src\BlazorWebView\src\SharedSource\UrlLoadingEventArgs.cs (4)
14 internal static UrlLoadingEventArgs CreateWithDefaultLoadingStrategy(Uri urlToLoad, Uri appOriginUri) 23 private UrlLoadingEventArgs(Uri url, UrlLoadingStrategy urlLoadingStrategy) 32 public Uri Url { get; }
Microsoft.AspNetCore.Components.WebView.WindowsForms (14)
src\BlazorWebView\src\SharedSource\Log.cs (3)
9 public static partial void NavigatingToUri(this ILogger logger, Uri uri); 30 public static partial void NavigationEvent(this ILogger logger, Uri uri, UrlLoadingStrategy urlLoadingStrategy); 33 public static partial void LaunchExternalBrowser(this ILogger logger, Uri uri);
src\BlazorWebView\src\SharedSource\UrlLoadingEventArgs.cs (4)
14 internal static UrlLoadingEventArgs CreateWithDefaultLoadingStrategy(Uri urlToLoad, Uri appOriginUri) 23 private UrlLoadingEventArgs(Uri url, UrlLoadingStrategy urlLoadingStrategy) 32 public Uri Url { get; }
src\BlazorWebView\src\SharedSource\WebView2WebViewManager.cs (7)
59 internal static readonly Uri AppOriginUri = new(AppOrigin); 183 protected override void NavigateCore(Uri absoluteUri) 345 if (Uri.TryCreate(args.Uri, UriKind.RelativeOrAbsolute, out var uri)) 369 if (Uri.TryCreate(args.Uri, UriKind.RelativeOrAbsolute, out var uri)) 376 private void LaunchUriInExternalBrowser(Uri uri)
Microsoft.AspNetCore.Components.WebView.Wpf (14)
src\BlazorWebView\src\SharedSource\Log.cs (3)
9 public static partial void NavigatingToUri(this ILogger logger, Uri uri); 30 public static partial void NavigationEvent(this ILogger logger, Uri uri, UrlLoadingStrategy urlLoadingStrategy); 33 public static partial void LaunchExternalBrowser(this ILogger logger, Uri uri);
src\BlazorWebView\src\SharedSource\UrlLoadingEventArgs.cs (4)
14 internal static UrlLoadingEventArgs CreateWithDefaultLoadingStrategy(Uri urlToLoad, Uri appOriginUri) 23 private UrlLoadingEventArgs(Uri url, UrlLoadingStrategy urlLoadingStrategy) 32 public Uri Url { get; }
src\BlazorWebView\src\SharedSource\WebView2WebViewManager.cs (7)
59 internal static readonly Uri AppOriginUri = new(AppOrigin); 183 protected override void NavigateCore(Uri absoluteUri) 345 if (Uri.TryCreate(args.Uri, UriKind.RelativeOrAbsolute, out var uri)) 369 if (Uri.TryCreate(args.Uri, UriKind.RelativeOrAbsolute, out var uri)) 376 private void LaunchUriInExternalBrowser(Uri uri)
Microsoft.AspNetCore.Connections.Abstractions (5)
UriEndPoint.cs (5)
10/// An <see cref="EndPoint"/> defined by a <see cref="System.Uri"/>. 17/// <param name="uri">The <see cref="System.Uri"/> defining the <see cref="EndPoint"/>.</param> 18public UriEndPoint(Uri uri) 24/// The <see cref="System.Uri"/> defining the <see cref="EndPoint"/>. 26public Uri Uri { get; }
Microsoft.AspNetCore.CookiePolicy (2)
ResponseCookiesWrapper.cs (2)
101return options.CreateCookieHeader(Uri.EscapeDataString(key), Uri.EscapeDataString(value)).ToString();
Microsoft.AspNetCore.Cors (9)
Infrastructure\CorsPolicyBuilder.cs (4)
71if (Uri.TryCreate(origin, UriKind.Absolute, out var uri) && 72(uri.Scheme == Uri.UriSchemeHttp || uri.Scheme == Uri.UriSchemeHttps) &&
Infrastructure\CorsPolicyExtensions.cs (3)
19if (Uri.TryCreate(origin, UriKind.Absolute, out var originUri)) 30private static Uri CreateDomainUri(string origin)
Infrastructure\UriHelpers.cs (2)
8public static bool IsSubdomainOf(Uri subdomain, Uri domain)
Microsoft.AspNetCore.HeaderParsing (5)
CommonHeaders.cs (1)
95public static HeaderSetup<Uri> Referer => new(HeaderNames.Referer, Parsers.UriParser.Instance, cacheable: true);
Parsers\UriParser.cs (4)
10internal sealed class UriParser : HeaderParser<Uri> 14public override bool TryParse(StringValues values, [NotNullWhen(true)] out Uri? result, [NotNullWhen(false)] out string? error) 16if (values.Count != 1 || !Uri.TryCreate(values[0], UriKind.RelativeOrAbsolute, out var parsedValue))
Microsoft.AspNetCore.Hosting (4)
GenericHost\GenericWebHostService.cs (4)
91var httpUrls = ExpandPorts(httpPorts, Uri.UriSchemeHttp); 92var httpsUrls = ExpandPorts(httpsPorts, Uri.UriSchemeHttps); 171if (address.Contains(".localhost", StringComparison.OrdinalIgnoreCase) && Uri.TryCreate(address, UriKind.Absolute, out var uri) && uri.Host.EndsWith(".localhost", StringComparison.OrdinalIgnoreCase))
Microsoft.AspNetCore.Http (8)
BindingAddress.cs (4)
119return Scheme.ToLowerInvariant() + Uri.SchemeDelimiter + Host.ToLowerInvariant(); 123return Scheme.ToLowerInvariant() + Uri.SchemeDelimiter + Host.ToLowerInvariant() + ":" + Port.ToString(CultureInfo.InvariantCulture) + PathBase; 157var schemeDelimiterStart = address.IndexOf(Uri.SchemeDelimiter, StringComparison.Ordinal); 162var schemeDelimiterEnd = schemeDelimiterStart + Uri.SchemeDelimiter.Length;
Internal\ResponseCookies.cs (3)
34var setCookieHeaderValue = new SetCookieHeaderValue(key, Uri.EscapeDataString(value)) 63var cookie = options.CreateCookieHeader(key, Uri.EscapeDataString(value)).ToString(); 96cookies[position] = string.Concat(keyValuePair.Key, "=", Uri.EscapeDataString(keyValuePair.Value), cookieSuffix);
src\aspnetcore\src\Http\Shared\CookieHeaderParserShared.cs (1)
45store[parsedName.Value.Value!] = Uri.UnescapeDataString(parsedValue.Value.Value!);
Microsoft.AspNetCore.Http.Abstractions (8)
FragmentString.cs (1)
94public static FragmentString FromUriComponent(Uri uri)
HostString.cs (2)
199/// <param name="uri">The <see cref="Uri"/> to create a <see cref="HostString"/> from.</param> 201public static HostString FromUriComponent(Uri uri)
PathString.cs (4)
103if (s_validPathChars.Contains(value[i]) || (isPercentEncodedChar = Uri.IsHexEncoding(value, i))) 109buffer.Append(Uri.EscapeDataString(value.AsSpan(start, count))); 166buffer.Append(Uri.EscapeDataString(value.AsSpan(start, count))); 202public static PathString FromUriComponent(Uri uri)
QueryString.cs (1)
91public static QueryString FromUriComponent(Uri uri)
Microsoft.AspNetCore.Http.Connections.Client (92)
_generated\0\LoggerMessage.g.cs (39)
107private static readonly global::System.Action<global::Microsoft.Extensions.Logging.ILogger, string, global::System.Uri, global::System.Exception?> __StartingTransportCallback = 108global::Microsoft.Extensions.Logging.LoggerMessage.Define<string, global::System.Uri>(global::Microsoft.Extensions.Logging.LogLevel.Debug, new global::Microsoft.Extensions.Logging.EventId(7, "StartingTransport"), "Starting transport '{Transport}' with Url: {Url}.", new global::Microsoft.Extensions.Logging.LogDefineOptions() { SkipEnabledCheck = true }); 115private static partial void StartingTransport(global::Microsoft.Extensions.Logging.ILogger logger, string transport, global::System.Uri url) 120private static readonly global::System.Action<global::Microsoft.Extensions.Logging.ILogger, global::System.Uri, global::System.Exception?> __EstablishingConnectionCallback = 121global::Microsoft.Extensions.Logging.LoggerMessage.Define<global::System.Uri>(global::Microsoft.Extensions.Logging.LogLevel.Debug, new global::Microsoft.Extensions.Logging.EventId(8, "EstablishingConnection"), "Establishing connection with server at '{Url}'.", new global::Microsoft.Extensions.Logging.LogDefineOptions() { SkipEnabledCheck = true }); 128public static partial void EstablishingConnection(global::Microsoft.Extensions.Logging.ILogger logger, global::System.Uri url) 152private static readonly global::System.Action<global::Microsoft.Extensions.Logging.ILogger, global::System.Uri, global::System.Exception?> __ErrorWithNegotiationCallback = 153global::Microsoft.Extensions.Logging.LoggerMessage.Define<global::System.Uri>(global::Microsoft.Extensions.Logging.LogLevel.Error, new global::Microsoft.Extensions.Logging.EventId(10, "ErrorWithNegotiation"), "Failed to start connection. Error getting negotiation response from '{Url}'.", new global::Microsoft.Extensions.Logging.LogDefineOptions() { SkipEnabledCheck = true }); 160public static partial void ErrorWithNegotiation(global::Microsoft.Extensions.Logging.ILogger logger, global::System.Uri url, global::System.Exception exception) 369private static readonly global::System.Action<global::Microsoft.Extensions.Logging.ILogger, global::System.Net.Http.HttpMethod, global::System.Uri, global::System.Exception?> __SendingHttpRequestCallback = 370global::Microsoft.Extensions.Logging.LoggerMessage.Define<global::System.Net.Http.HttpMethod, global::System.Uri>(global::Microsoft.Extensions.Logging.LogLevel.Trace, new global::Microsoft.Extensions.Logging.EventId(1, "SendingHttpRequest"), "Sending HTTP request {RequestMethod} '{RequestUrl}'.", new global::Microsoft.Extensions.Logging.LogDefineOptions() { SkipEnabledCheck = true }); 377public static partial void SendingHttpRequest(global::Microsoft.Extensions.Logging.ILogger logger, global::System.Net.Http.HttpMethod requestMethod, global::System.Uri requestUrl) 385private static readonly global::System.Action<global::Microsoft.Extensions.Logging.ILogger, global::System.Net.HttpStatusCode, global::System.Net.Http.HttpMethod, global::System.Uri, global::System.Exception?> __UnsuccessfulHttpResponseCallback = 386global::Microsoft.Extensions.Logging.LoggerMessage.Define<global::System.Net.HttpStatusCode, global::System.Net.Http.HttpMethod, global::System.Uri>(global::Microsoft.Extensions.Logging.LogLevel.Warning, new global::Microsoft.Extensions.Logging.EventId(2, "UnsuccessfulHttpResponse"), "Unsuccessful HTTP response {StatusCode} return from {RequestMethod} '{RequestUrl}'.", new global::Microsoft.Extensions.Logging.LogDefineOptions() { SkipEnabledCheck = true }); 393public static partial void UnsuccessfulHttpResponse(global::Microsoft.Extensions.Logging.ILogger logger, global::System.Net.HttpStatusCode statusCode, global::System.Net.Http.HttpMethod requestMethod, global::System.Uri requestUrl) 538private static readonly global::System.Action<global::Microsoft.Extensions.Logging.ILogger, global::System.Uri, global::System.Exception?> __ErrorPollingCallback = 539global::Microsoft.Extensions.Logging.LoggerMessage.Define<global::System.Uri>(global::Microsoft.Extensions.Logging.LogLevel.Error, new global::Microsoft.Extensions.Logging.EventId(9, "ErrorPolling"), "Error while polling '{PollUrl}'.", new global::Microsoft.Extensions.Logging.LogDefineOptions() { SkipEnabledCheck = true }); 546public static partial void ErrorPolling(global::Microsoft.Extensions.Logging.ILogger logger, global::System.Uri pollUrl, global::System.Exception exception) 567private static readonly global::System.Action<global::Microsoft.Extensions.Logging.ILogger, global::System.Uri, global::System.Exception?> __SendingDeleteRequestCallback = 568global::Microsoft.Extensions.Logging.LoggerMessage.Define<global::System.Uri>(global::Microsoft.Extensions.Logging.LogLevel.Debug, new global::Microsoft.Extensions.Logging.EventId(11, "SendingDeleteRequest"), "Sending DELETE request to '{PollUrl}'.", new global::Microsoft.Extensions.Logging.LogDefineOptions() { SkipEnabledCheck = true }); 575public static partial void SendingDeleteRequest(global::Microsoft.Extensions.Logging.ILogger logger, global::System.Uri pollUrl) 583private static readonly global::System.Action<global::Microsoft.Extensions.Logging.ILogger, global::System.Uri, global::System.Exception?> __DeleteRequestAcceptedCallback = 584global::Microsoft.Extensions.Logging.LoggerMessage.Define<global::System.Uri>(global::Microsoft.Extensions.Logging.LogLevel.Debug, new global::Microsoft.Extensions.Logging.EventId(12, "DeleteRequestAccepted"), "DELETE request to '{PollUrl}' accepted.", new global::Microsoft.Extensions.Logging.LogDefineOptions() { SkipEnabledCheck = true }); 591public static partial void DeleteRequestAccepted(global::Microsoft.Extensions.Logging.ILogger logger, global::System.Uri pollUrl) 599private static readonly global::System.Action<global::Microsoft.Extensions.Logging.ILogger, global::System.Uri, global::System.Exception?> __ErrorSendingDeleteRequestCallback = 600global::Microsoft.Extensions.Logging.LoggerMessage.Define<global::System.Uri>(global::Microsoft.Extensions.Logging.LogLevel.Error, new global::Microsoft.Extensions.Logging.EventId(13, "ErrorSendingDeleteRequest"), "Error sending DELETE request to '{PollUrl}'.", new global::Microsoft.Extensions.Logging.LogDefineOptions() { SkipEnabledCheck = true }); 607public static partial void ErrorSendingDeleteRequest(global::Microsoft.Extensions.Logging.ILogger logger, global::System.Uri pollUrl, global::System.Exception ex) 615private static readonly global::System.Action<global::Microsoft.Extensions.Logging.ILogger, global::System.Uri, global::System.Exception?> __ConnectionAlreadyClosedSendingDeleteRequestCallback = 616global::Microsoft.Extensions.Logging.LoggerMessage.Define<global::System.Uri>(global::Microsoft.Extensions.Logging.LogLevel.Debug, new global::Microsoft.Extensions.Logging.EventId(14, "ConnectionAlreadyClosedSendingDeleteRequest"), "A 404 response was returned from sending DELETE request to '{PollUrl}', likely because the transport was already closed on the server.", new global::Microsoft.Extensions.Logging.LogDefineOptions() { SkipEnabledCheck = true }); 623public static partial void ConnectionAlreadyClosedSendingDeleteRequest(global::Microsoft.Extensions.Logging.ILogger logger, global::System.Uri pollUrl) 688private static readonly global::System.Action<global::Microsoft.Extensions.Logging.ILogger, long, global::System.Uri, global::System.Exception?> __SendingMessagesCallback = 689global::Microsoft.Extensions.Logging.LoggerMessage.Define<long, global::System.Uri>(global::Microsoft.Extensions.Logging.LogLevel.Debug, new global::Microsoft.Extensions.Logging.EventId(103, "SendingMessages"), "Sending {Count} bytes to the server using url: {Url}.", new global::Microsoft.Extensions.Logging.LogDefineOptions() { SkipEnabledCheck = true }); 696public static partial void SendingMessages(global::Microsoft.Extensions.Logging.ILogger logger, long count, global::System.Uri url) 736private static readonly global::System.Action<global::Microsoft.Extensions.Logging.ILogger, global::System.Uri, global::System.Exception?> __ErrorSendingCallback = 737global::Microsoft.Extensions.Logging.LoggerMessage.Define<global::System.Uri>(global::Microsoft.Extensions.Logging.LogLevel.Error, new global::Microsoft.Extensions.Logging.EventId(106, "ErrorSending"), "Error while sending to '{Url}'.", new global::Microsoft.Extensions.Logging.LogDefineOptions() { SkipEnabledCheck = true }); 744public static partial void ErrorSending(global::Microsoft.Extensions.Logging.ILogger logger, global::System.Uri url, global::System.Exception exception) 914private static readonly global::System.Action<global::Microsoft.Extensions.Logging.ILogger, global::Microsoft.AspNetCore.Connections.TransferFormat, global::System.Uri, global::System.Exception?> __StartTransportCallback = 915global::Microsoft.Extensions.Logging.LoggerMessage.Define<global::Microsoft.AspNetCore.Connections.TransferFormat, global::System.Uri>(global::Microsoft.Extensions.Logging.LogLevel.Information, new global::Microsoft.Extensions.Logging.EventId(1, "StartTransport"), "Starting transport. Transfer mode: {TransferFormat}. Url: '{WebSocketUrl}'.", new global::Microsoft.Extensions.Logging.LogDefineOptions() { SkipEnabledCheck = true }); 922public static partial void StartTransport(global::Microsoft.Extensions.Logging.ILogger logger, global::Microsoft.AspNetCore.Connections.TransferFormat transferFormat, global::System.Uri webSocketUrl)
HttpConnection.cs (16)
55private readonly Uri _url; 105public HttpConnection(Uri url) 114public HttpConnection(Uri url, HttpTransportType transports) 125public HttpConnection(Uri url, HttpTransportType transports, ILoggerFactory? loggerFactory) 130private static HttpConnectionOptions CreateHttpOptions(Uri url, HttpTransportType transports) 310var uri = _url; 362var connectUrl = CreateConnectUrl(uri, negotiationResponse.ConnectionToken); 449private async Task<NegotiationResponse> NegotiateAsync(Uri url, HttpClient httpClient, ILogger logger, CancellationToken cancellationToken) 461Uri uri; 512private static Uri CreateConnectUrl(Uri url, string? connectionId) 522private static Uri CreateRefreshUrl(Uri url, string connectionToken) 534private async Task StartTransport(Uri connectUrl, HttpTransportType transportType, TransferFormat transferFormat, 731private async Task<NegotiationResponse> GetNegotiationResponseAsync(Uri uri, CancellationToken cancellationToken) 757var refreshUri = CreateRefreshUrl(_url, _connectionToken);
HttpConnection.Log.cs (4)
33public static void StartingTransport(ILogger logger, HttpTransportType transportType, Uri url) 42private static partial void StartingTransport(ILogger logger, string transport, Uri url); 45public static partial void EstablishingConnection(ILogger logger, Uri url); 51public static partial void ErrorWithNegotiation(ILogger logger, Uri url, Exception exception);
HttpConnectionOptions.cs (1)
168public Uri? Url { get; set; }
Internal\ITransport.cs (1)
14Task StartAsync(Uri url, TransferFormat transferFormat, CancellationToken cancellationToken = default);
Internal\LoggingHttpMessageHandler.cs (2)
42public static partial void SendingHttpRequest(ILogger logger, HttpMethod requestMethod, Uri requestUrl); 45public static partial void UnsuccessfulHttpResponse(ILogger logger, HttpStatusCode statusCode, HttpMethod requestMethod, Uri requestUrl);
Internal\LongPollingTransport.cs (4)
43public async Task StartAsync(Uri url, TransferFormat transferFormat, CancellationToken cancellationToken = default) 71private async Task ProcessAsync(Uri url) 141private async Task Poll(Uri pollUrl, CancellationToken cancellationToken) 228private async Task SendDeleteRequest(Uri url)
Internal\LongPollingTransport.Log.cs (5)
41public static partial void ErrorPolling(ILogger logger, Uri pollUrl, Exception exception); 57public static partial void SendingDeleteRequest(ILogger logger, Uri pollUrl); 60public static partial void DeleteRequestAccepted(ILogger logger, Uri pollUrl); 63public static partial void ErrorSendingDeleteRequest(ILogger logger, Uri pollUrl, Exception ex); 66public static partial void ConnectionAlreadyClosedSendingDeleteRequest(ILogger logger, Uri pollUrl);
Internal\SendUtils.cs (3)
19public static async Task SendMessages(Uri sendUrl, IDuplexPipe application, HttpClient httpClient, ILogger logger, CancellationToken cancellationToken = default) 126public static partial void SendingMessages(ILogger logger, long count, Uri url); 135public static partial void ErrorSending(ILogger logger, Uri url, Exception exception);
Internal\ServerSentEventsTransport.cs (2)
46public async Task StartAsync(Uri url, TransferFormat transferFormat, CancellationToken cancellationToken = default) 88private async Task ProcessAsync(Uri url, HttpResponseMessage response)
Internal\Utils.cs (6)
10public static Uri CreateEndPointUri(Uri url) 23public static Uri AppendPath(Uri url, string path) 34internal static Uri AppendQueryString(Uri url, string qs)
Internal\WebSocketsTransport.cs (6)
93var url = context.Uri; 287public async Task StartAsync(Uri url, TransferFormat transferFormat, CancellationToken cancellationToken = default) 300var resolvedUrl = ResolveWebSocketsUrl(url); 337private async Task ProcessSocketAsync(WebSocket socket, Uri url, bool isReconnect) 640private static Uri ResolveWebSocketsUrl(Uri url)
Internal\WebSocketsTransport.Log.cs (1)
16public static partial void StartTransport(ILogger logger, TransferFormat transferFormat, Uri webSocketUrl);
WebSocketConnectionContext.cs (2)
18public WebSocketConnectionContext(Uri uri, HttpConnectionOptions options) 27public Uri Uri { get; }
Microsoft.AspNetCore.Http.Extensions (20)
RequestHeaders.cs (3)
334public Uri? Referer 338if (Uri.TryCreate(Headers.Referer, UriKind.RelativeOrAbsolute, out var uri))
ResponseHeaders.cs (3)
169public Uri? Location 173if (Uri.TryCreate(Headers.Location, UriKind.RelativeOrAbsolute, out var uri))
src\aspnetcore\src\Components\Endpoints\src\FormMapping\Converters\UriFormDataConverter.cs (5)
9internal class UriFormDataConverter : FormDataConverter<Uri>, ISingleValueConverter<Uri> 13public bool TryConvertValue(ref FormDataReader reader, string value, out Uri result) 15if (Uri.TryCreate(value, UriKind.RelativeOrAbsolute, out result!)) 32internal override bool TryRead(ref FormDataReader context, Type type, FormDataMapperOptions options, out Uri? result, out bool found)
src\aspnetcore\src\Components\Endpoints\src\FormMapping\WellKnownConverters.cs (1)
49{ typeof(Uri), new UriFormDataConverter() },
src\aspnetcore\src\Shared\ParameterBindingMethodCache.cs (4)
27private static readonly MethodInfo UriTryCreateMethod = typeof(Uri).GetMethod(nameof(Uri.TryCreate), BindingFlags.Public | BindingFlags.Static, new[] { typeof(string), typeof(UriKind), typeof(Uri).MakeByRefType() })!; 122if (type == typeof(Uri))
UriHelper.cs (4)
18private static readonly string SchemeDelimiter = Uri.SchemeDelimiter; 69Uri.SchemeDelimiter.Length + 158public static string Encode(Uri uri) 243index = CopyTextToBuffer(buffer, index, Uri.SchemeDelimiter.AsSpan());
Microsoft.AspNetCore.Http.Results (10)
Accepted.cs (1)
34internal Accepted(Uri locationUri)
AcceptedOfT.cs (1)
38internal Accepted(Uri locationUri, TValue? value)
Created.cs (1)
33internal Created(Uri? locationUri)
CreatedOfT.cs (1)
38internal Created(Uri? locationUri, TValue? value)
Results.cs (2)
862public static IResult Created(Uri? uri, object? value) 871public static IResult Created<TValue>(Uri? uri, TValue? value)
TypedResults.cs (4)
921public static Created Created(Uri? uri) 933public static Created<TValue> Created<TValue>(Uri? uri, TValue? value) 1007public static Accepted Accepted(Uri uri) 1021public static Accepted<TValue> Accepted<TValue>(Uri uri, TValue? value)
Microsoft.AspNetCore.Identity (2)
PasskeyHandler.cs (2)
671!Uri.TryCreate(clientData.Origin, UriKind.Absolute, out var originUri))
Microsoft.AspNetCore.InternalTesting (5)
HttpClientSlim.cs (5)
29public static async Task<string> GetStringAsync(Uri requestUri, bool validateCertificate = true) 47internal static string GetHost(Uri requestUri) 72public static async Task<string> PostAsync(Uri requestUri, HttpContent content, bool validateCertificate = true) 150private static async Task<Stream> GetStream(Uri requestUri, bool validateCertificate) 171public static async Task<Socket> GetSocket(Uri requestUri)
Microsoft.AspNetCore.Mvc.Abstractions (4)
src\aspnetcore\src\Shared\ParameterBindingMethodCache.cs (4)
27private static readonly MethodInfo UriTryCreateMethod = typeof(Uri).GetMethod(nameof(Uri.TryCreate), BindingFlags.Public | BindingFlags.Static, new[] { typeof(string), typeof(UriKind), typeof(Uri).MakeByRefType() })!; 122if (type == typeof(Uri))
Microsoft.AspNetCore.Mvc.ApiExplorer (1)
EndpointModelMetadata.cs (1)
68|| underlyingType == typeof(Uri)
Microsoft.AspNetCore.Mvc.Core (8)
AcceptedResult.cs (1)
46public AcceptedResult(Uri locationUri, [ActionResultObjectValue] object? value)
ControllerBase.cs (3)
2066public virtual CreatedResult Created(Uri? uri, [ActionResultObjectValue] object? value) 2163public virtual AcceptedResult Accepted(Uri uri) 2197public virtual AcceptedResult Accepted(Uri uri, [ActionResultObjectValue] object? value)
CreatedResult.cs (1)
51public CreatedResult(Uri? location, object? value)
Infrastructure\MvcCoreMvcOptionsSetup.cs (1)
129modelMetadataDetailsProviders.Add(new SuppressChildValidationMetadataProvider(typeof(Uri)));
Routing\UrlHelperBase.cs (2)
148builder.Append(Uri.SchemeDelimiter); 210builder.Append(Uri.SchemeDelimiter);
Microsoft.AspNetCore.Mvc.NewtonsoftJson (2)
BsonTempDataSerializer.cs (2)
40{ JTokenType.Uri, typeof(Uri) }, 247type.Equals(typeof(Uri));
Microsoft.AspNetCore.Mvc.Razor (2)
Infrastructure\DefaultFileVersionProvider.cs (2)
48if (Uri.TryCreate(resolvedPath, UriKind.Absolute, out var uri) && !uri.IsFile)
Microsoft.AspNetCore.Mvc.Testing (6)
Handlers\RedirectHandler.cs (2)
139var location = response.Headers.Location; 142if (!location.IsAbsoluteUri && response.RequestMessage.RequestUri is Uri requestUri)
WebApplicationFactory.cs (2)
43private Uri? _webHostAddress; 810public HttpClient CreateDefaultClient(Uri baseAddress, params DelegatingHandler[] handlers)
WebApplicationFactoryClientOptions.cs (2)
17internal static readonly Uri DefaultBaseAddres = new Uri("http://localhost"); 40public Uri BaseAddress { get; set; } = DefaultBaseAddres;
Microsoft.AspNetCore.OpenApi (8)
Extensions\JsonNodeSchemaExtensions.cs (1)
46[typeof(Uri)] = new() { Type = JsonSchemaType.String, Format = "uri" },
Extensions\JsonTypeInfoExtensions.cs (1)
31[typeof(Uri)] = "Uri",
Services\OpenApiConstants.cs (1)
53typeof(Uri),
Services\Schemas\OpenApiSchemaService.cs (1)
649var unescapedReferenceToken = Uri.UnescapeDataString(referenceToken.ToString());
src\aspnetcore\src\Shared\ParameterBindingMethodCache.cs (4)
27private static readonly MethodInfo UriTryCreateMethod = typeof(Uri).GetMethod(nameof(Uri.TryCreate), BindingFlags.Public | BindingFlags.Static, new[] { typeof(string), typeof(UriKind), typeof(Uri).MakeByRefType() })!; 122if (type == typeof(Uri))
Microsoft.AspNetCore.Rewrite (9)
PatternSegments\UrlDecodeSegment.cs (1)
27return Uri.UnescapeDataString(pattern);
PatternSegments\UrlEncodeSegment.cs (1)
27return Uri.EscapeDataString(pattern);
RedirectRule.cs (2)
61var schemeSplit = newPath.IndexOf(Uri.SchemeDelimiter, StringComparison.Ordinal); 66schemeSplit += Uri.SchemeDelimiter.Length;
RewriteRule.cs (1)
55if (result.Contains(Uri.SchemeDelimiter, StringComparison.Ordinal))
UrlActions\RedirectAction.cs (2)
37pattern = Uri.EscapeDataString(pattern); 48if (!pattern.Contains(Uri.SchemeDelimiter, StringComparison.Ordinal) && pattern[0] != '/')
UrlActions\RewriteAction.cs (2)
58pattern = Uri.EscapeDataString(pattern); 68if (pattern.Contains(Uri.SchemeDelimiter, StringComparison.Ordinal))
Microsoft.AspNetCore.Server.HttpSys (2)
UrlPrefix.cs (2)
108var schemeDelimiterEnd = whole.IndexOf(Uri.SchemeDelimiter, StringComparison.Ordinal); 113var hostDelimiterStart = schemeDelimiterEnd + Uri.SchemeDelimiter.Length;
Microsoft.AspNetCore.Server.IntegrationTesting (13)
Common\DeploymentParameters.cs (1)
116public string Scheme { get; set; } = Uri.UriSchemeHttp;
Common\TestUriHelper.cs (5)
10public static Uri BuildTestUri(ServerType serverType) 15public static Uri BuildTestUri(ServerType serverType, string hint) 20return BuildTestUri(serverType, Uri.UriSchemeHttp, hint, statusMessagesEnabled); 23internal static Uri BuildTestUri(ServerType serverType, string scheme, string hint, bool statusMessagesEnabled) 52var uriHint = new Uri(hint);
Deployers\NginxDeployer.cs (3)
34var uri = string.IsNullOrEmpty(DeploymentParameters.ApplicationBaseUriHint) ? 56var redirectUri = TestUriHelper.BuildTestUri(ServerType.Nginx); 132private void SetupNginx(string redirectUri, Uri originalUri)
Deployers\SelfHostDeployer.cs (4)
58var hintUrl = TestUriHelper.BuildTestUri( 78protected async Task<(Uri url, CancellationToken hostExitToken)> StartSelfHostAsync(Uri hintUrl) 142Uri actualUrl = null;
Microsoft.AspNetCore.Server.Kestrel.Core (6)
Internal\Http\Http1Connection.cs (4)
58private Uri? _absoluteRequestTarget; 65private Uri? _parsedAbsoluteRequestTarget; 690if (!Uri.TryCreate(RawTarget, UriKind.Absolute, out var uri))
Internal\Http2\Http2Stream.cs (1)
301if (!ServerOptions.AllowAlternateSchemes || !Uri.CheckSchemeName(headerScheme))
Internal\Http3\Http3Stream.cs (1)
1079if (!ServerOptions.AllowAlternateSchemes || !Uri.CheckSchemeName(headerScheme))
Microsoft.AspNetCore.SignalR.Client (5)
HubConnectionBuilderHttpExtensions.cs (5)
92public static IHubConnectionBuilder WithUrl(this IHubConnectionBuilder hubConnectionBuilder, Uri url) 105public static IHubConnectionBuilder WithUrl(this IHubConnectionBuilder hubConnectionBuilder, Uri url, Action<HttpConnectionOptions> configureHttpConnection) 118public static IHubConnectionBuilder WithUrl(this IHubConnectionBuilder hubConnectionBuilder, Uri url, HttpTransportType transports) 132public static IHubConnectionBuilder WithUrl(this IHubConnectionBuilder hubConnectionBuilder, Uri url, HttpTransportType transports, Action<HttpConnectionOptions> configureHttpConnection) 138private static IHubConnectionBuilder WithUrlCore(this IHubConnectionBuilder hubConnectionBuilder, Uri url, HttpTransportType? transports, Action<HttpConnectionOptions>? configureHttpConnection)
Microsoft.AspNetCore.SignalR.Client.Core (3)
HubConnection.cs (3)
1168var initialUri = (_endPoint as UriEndPoint)?.Uri; 1196static void SetServerTags(Activity? activity, Uri? uri) 2315public Uri? ConnectionUrl { get; }
Microsoft.AspNetCore.SpaServices.Extensions (14)
AngularCli\AngularCliMiddleware.cs (3)
55private static async Task<Uri> StartAngularCliServerAsync( 88var uri = new Uri(openBrowserLine.Groups[1].Value); 97private static async Task WaitForAngularCliServerToAcceptRequests(Uri cliServerUri)
Proxying\ConditionalProxyMiddleware.cs (2)
17private readonly Task<Uri> _baseUriTask; 27Task<Uri> baseUriTask,
Proxying\SpaProxy.cs (7)
57Task<Uri> baseUriTask, 70var baseUri = await baseUriTask; 72var targetUri = new Uri((baseUriAsString.EndsWith("/", StringComparison.OrdinalIgnoreCase) ? baseUriAsString[..^1] : baseUriAsString) 129private static HttpRequestMessage CreateProxyHttpRequest(HttpContext context, Uri uri) 192private static Uri ToWebSocketScheme(Uri uri) 209private static async Task<bool> AcceptProxyWebSocketRequest(HttpContext context, Uri destinationUri, CancellationToken cancellationToken)
Proxying\SpaProxyingExtensions.cs (2)
42Uri baseUri) 58Func<Task<Uri>> baseUriTaskFactory)
Microsoft.AspNetCore.TestHost (4)
TestServer.cs (1)
112public Uri BaseAddress { get; set; } = new Uri("http://localhost/");
TestServerOptions.cs (1)
26public Uri BaseAddress { get; set; } = new Uri("http://localhost/");
WebSocketClient.cs (2)
52/// <param name="uri">The <see cref="Uri" /> of the endpoint.</param> 54public async Task<WebSocket> ConnectAsync(Uri uri, CancellationToken cancellationToken)
Microsoft.AspNetCore.Testing (7)
ServiceFakesHostExtensions.cs (7)
24private static readonly Func<Uri, bool> _defaultAddressFilter = static _ => true; 35public static HttpClient CreateClient(this IHost host, HttpMessageHandler? handler = null, Func<Uri, bool>? addressFilter = null) 40var uri = GetListenUris(host.Services.GetRequiredService<IServer>()).FirstOrDefault(addressFilter) 62/// <returns>A <see cref="Uri"/> instance.</returns> 63public static IEnumerable<Uri> GetListenUris(this IHost host) 68private static IEnumerable<Uri> GetListenUris(IServer server) 75return ArraySegment<Uri>.Empty;
Microsoft.AspNetCore.WebUtilities (3)
FormPipeReader.cs (1)
418return Uri.UnescapeDataString(decodedString);
FormReader.cs (1)
260return Uri.UnescapeDataString(result); // TODO: Replace this, it's not completely accurate.
src\aspnetcore\src\Shared\QueryStringEnumerable.cs (1)
101var success = Uri.TryUnescapeDataString(buffer, buffer, out var unescapedLength);
Microsoft.Authentication.WebAssembly.Msal (4)
Models\MsalAuthenticationOptions.cs (2)
33/// It can be an absolute or base relative <see cref="Uri"/> and defaults to <c>authentication/login-callback.</c> 41/// It can be an absolute or base relative <see cref="Uri"/> and defaults to <c>authentication/logout-callback.</c>
MsalDefaultOptionsConfiguration.cs (2)
26if (redirectUri == null || !Uri.TryCreate(redirectUri, UriKind.Absolute, out _)) 34if (logoutUri == null || !Uri.TryCreate(logoutUri, UriKind.Absolute, out _))
Microsoft.Build (23)
Construction\Solution\ProjectInSolution.cs (2)
192if (!Uri.TryCreate(_relativePath, UriKind.Absolute, out Uri _))
Construction\Solution\SolutionFile.cs (2)
838if (Uri.TryCreate(proj.RelativePath, UriKind.Absolute, out Uri uri))
ElementLocation\XmlDocumentWithLocation.cs (2)
134if (Uri.TryCreate(reader.BaseURI, UriKind.RelativeOrAbsolute, out Uri uri))
Evaluation\PropertyFunctionReceiver.cs (1)
44typeof(Uri), typeof(Regex), typeof(Match), typeof(Group), typeof(Capture),
Logging\TerminalLogger\TerminalLogger.cs (13)
862(string? projectDisplayPath, var urlLink) = DetermineOutputPathToRender(outputPathSpan, _initialWorkingDirectory.AsMemory(), project.SourceRoot); 932private static (string outputPathToRender, Uri? linkToAssign) DetermineOutputPathToRender(ReadOnlyMemory<char> outputPath, ReadOnlyMemory<char> workingDir, ReadOnlyMemory<char>? sourceRoot) 938Uri.TryCreate(new(Path.GetDirectoryName(outputPathSpan)), UriKind.Absolute, out Uri? uri); 985private static string? CreateLink(Uri? uri, string? linkText) => 1339private static Uri? GenerateLinkForMessage(BuildMessageEventArgs e) 1390private static Uri? GenerateLinkForWarning(BuildWarningEventArgs e) 1392if (e.HelpLink is not null && Uri.TryCreate(e.HelpLink, UriKind.Absolute, out Uri? uri)) 1407private static Uri GenerateLinkForHelpKeyword(string helpKeyword) => new($"https://go.microsoft.com/fwlink/?LinkId={helpKeyword}"); 1424private static Uri? GenerateLinkForError(BuildErrorEventArgs e) 1426if (e.HelpLink is not null && Uri.TryCreate(e.HelpLink, UriKind.Absolute, out Uri? uri))
Resources\Constants.cs (2)
277[DynamicDependency(PropertyFunctionMembers, typeof(Uri))] 393availableStaticMethods.TryAdd("System.Uri", new Tuple<string, Type>(null, typeof(Uri)));
Xml\XmlReaderExtension.cs (1)
87string uri = new UriBuilder(Uri.UriSchemeFile, string.Empty) { Path = file }.ToString();
Microsoft.Build.Tasks.Core (29)
BootstrapperUtil\BootstrapperBuilder.cs (1)
1939AddAttribute(fileNode, URLNAME_ATTRIBUTE, Uri.EscapeDataString(settings.ApplicationFile));
BootstrapperUtil\Util.cs (1)
53var uri = new Uri(path);
DownloadFile.cs (5)
92if (!Uri.TryCreate(SourceUrl, UriKind.Absolute, out Uri uri)) 148/// <param name="uri">The parsed <see cref="Uri"/> of the request.</param> 150private async Task DownloadAsync(Uri uri, CancellationToken cancellationToken) 319private bool TryGetFileName(Uri requestUri, out string filename)
GetSDKReferenceFiles.cs (1)
1098var codeBase = new Uri(currentAssembly);
ManifestUtil\PathUtil.cs (10)
32Uri uri = new Uri(url); 53Uri u = new Uri(resolvedPath); 61if (Uri.UriSchemeFile.Equals(u.Scheme, StringComparison.OrdinalIgnoreCase) && 66Scheme = Uri.UriSchemeFile, 128Uri u = new Uri(path, UriKind.RelativeOrAbsolute); 186Uri u; 187if (!Uri.TryCreate(path, UriKind.Absolute, out u) || u == null) 197if (!Uri.TryCreate(path, UriKind.Absolute, out Uri u) || u == null) 223var u = new Uri(path);
ManifestUtil\SecurityUtil.cs (10)
506public static void SignFile(string certThumbprint, Uri timestampUrl, string path) 522Uri timestampUrl, 541Uri timestampUrl, 562Uri timestampUrl, 622public static void SignFile(string certPath, SecureString certPassword, Uri timestampUrl, string path) 649public static void SignFile(X509Certificate2 cert, Uri timestampUrl, string path) 660Uri timestampUrl, 789private static void SignPEFile(X509Certificate2 cert, Uri timestampUrl, string path, System.Resources.ResourceManager resources, bool useSha256) 803private static void SignPEFileInternal(X509Certificate2 cert, Uri timestampUrl, 850internal static string GetCommandLineParameters(string certThumbprint, Uri timestampUrl, string path,
ManifestUtil\XmlUtil.cs (1)
142public override Object GetEntity(Uri uri, string role, Type t)
Microsoft.Build.Tasks.Git (18)
GitOperations.cs (10)
36var uri = NormalizeUrl(repository, remoteUrl); 141internal static Uri? NormalizeUrl(GitRepository repository, string url) 167internal static Uri? NormalizeUrl(string url, string root) 179if (TryParseScp(url, out var uri)) 188if (!Uri.TryCreate(url, UriKind.RelativeOrAbsolute, out uri)) 199var rootUri = new Uri(root.EndWithSeparator('/')); 200if (Uri.TryCreate(rootUri, uri, out uri)) 214private static bool TryParseScp(string value, [NotNullWhen(true)]out Uri? uri) 238return Uri.TryCreate(url, UriKind.Absolute, out uri); 296var submoduleUri = NormalizeUrl(repository, submoduleConfigUrl);
src\sourcelink\src\Common\Utilities\UriUtilities.cs (8)
13public static bool TryParseAuthority(string value, [NotNullWhen(true)] out Uri? uri) 14=> Uri.TryCreate("unknown://" + value, UriKind.Absolute, out uri) && 17public static int GetExplicitPort(this Uri uri) 76public static string GetScheme(this Uri uri) 79public static string GetHost(this Uri uri) 82public static string GetAuthority(this Uri uri) 85public static string GetPath(this Uri uri) 88public static string GetPathAndQuery(this Uri uri)
Microsoft.CodeAnalysis (5)
CommandLine\SarifErrorLogger.cs (5)
123private static readonly Uri s_fileRoot = new Uri("file:///"); 138if (Uri.TryCreate(fullPath, UriKind.Absolute, out var uri)) 155if (Uri.TryCreate(path, UriKind.Relative, out var uri))
Microsoft.CodeAnalysis.Analyzers (5)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\DiagnosticDescriptorExtensions.cs (5)
255internal static Uri? GetValidHelpLinkUri(this DiagnosticDescriptor descriptor) 256=> Uri.TryCreate(descriptor.HelpLinkUri, UriKind.Absolute, out var uri) && 257(uri.Scheme == Uri.UriSchemeHttp || uri.Scheme == Uri.UriSchemeHttps) ? uri : null;
Microsoft.CodeAnalysis.AnalyzerUtilities (5)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\DiagnosticDescriptorExtensions.cs (5)
255internal static Uri? GetValidHelpLinkUri(this DiagnosticDescriptor descriptor) 256=> Uri.TryCreate(descriptor.HelpLinkUri, UriKind.Absolute, out var uri) && 257(uri.Scheme == Uri.UriSchemeHttp || uri.Scheme == Uri.UriSchemeHttps) ? uri : null;
Microsoft.CodeAnalysis.CodeStyle (5)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\DiagnosticDescriptorExtensions.cs (5)
255internal static Uri? GetValidHelpLinkUri(this DiagnosticDescriptor descriptor) 256=> Uri.TryCreate(descriptor.HelpLinkUri, UriKind.Absolute, out var uri) && 257(uri.Scheme == Uri.UriSchemeHttp || uri.Scheme == Uri.UriSchemeHttps) ? uri : null;
Microsoft.CodeAnalysis.CSharp (1)
Syntax\SyntaxFactory.cs (1)
745public static XmlElementSyntax XmlSeeAlsoElement(Uri linkAddress, SyntaxList<XmlNodeSyntax> linkText)
Microsoft.CodeAnalysis.Features (3)
AddImport\PackageSourceHelper.cs (2)
40if (!Uri.TryCreate(sourceUrl, UriKind.Absolute, out var uri))
PdbSourceDocument\SourceLinkMap.cs (1)
194var escapedPath = string.Join("/", path[file.Path.Length..].Split(['/', '\\']).Select(Uri.EscapeDataString));
Microsoft.CodeAnalysis.NetAnalyzers (1)
Microsoft.NetCore.Analyzers\Runtime\AttributeStringLiteralsShouldParseCorrectly.cs (1)
77return Uri.IsWellFormedUriString(value, UriKind.RelativeOrAbsolute);
Microsoft.CodeAnalysis.ResxSourceGenerator (5)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\DiagnosticDescriptorExtensions.cs (5)
255internal static Uri? GetValidHelpLinkUri(this DiagnosticDescriptor descriptor) 256=> Uri.TryCreate(descriptor.HelpLinkUri, UriKind.Absolute, out var uri) && 257(uri.Scheme == Uri.UriSchemeHttp || uri.Scheme == Uri.UriSchemeHttps) ? uri : null;
Microsoft.CodeAnalysis.Scripting (1)
src\roslyn\src\Compilers\Shared\GlobalAssemblyCacheHelpers\MonoGlobalAssemblyCache.cs (1)
33var systemAssemblyFile = typeof(Uri).Assembly.Location;
Microsoft.CodeAnalysis.Workspaces (8)
Diagnostics\DiagnosticData.cs (3)
389internal Uri? GetValidHelpLinkUri() 390=> Uri.TryCreate(HelpLink, UriKind.Absolute, out var uri) ? uri : null;
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\DiagnosticDescriptorExtensions.cs (5)
255internal static Uri? GetValidHelpLinkUri(this DiagnosticDescriptor descriptor) 256=> Uri.TryCreate(descriptor.HelpLinkUri, UriKind.Absolute, out var uri) && 257(uri.Scheme == Uri.UriSchemeHttp || uri.Scheme == Uri.UriSchemeHttps) ? uri : null;
Microsoft.Deployment.DotNet.Releases (18)
Cve.cs (2)
26public Uri DescriptionLink 47internal Cve(string id, Uri address)
JsonExtensions.cs (3)
46/// Looks for a property named <paramref name="propertyName"/> and creates a <see cref="Uri"/> 51/// <returns>A <see cref="Uri"/> or <see langword="null"/> if the property does not exist or contains a null value.</returns> 52internal static Uri GetUriOrDefault(this JsonElement value, string propertyName)
Product.cs (2)
104public Uri ReleasesJson 196public async Task<ReadOnlyCollection<ProductRelease>> GetReleasesAsync(Uri address)
ProductCollection.cs (2)
22public static readonly Uri ReleasesIndexDefaultUrl = new Uri("https://builds.dotnet.microsoft.com/dotnet/release-metadata/releases-index.json"); 74public static async Task<ProductCollection> GetAsync(Uri releasesIndexUrl)
ProductRelease.cs (2)
85/// A <see cref="Uri"/> pointing to the release notes of this <see cref="ProductRelease"/>. 87public Uri ReleaseNotes
ReleaseFile.cs (3)
19private Uri _address; 25public Uri Address 86internal ReleaseFile(Uri address, string hash, string name, string rid)
Utils.cs (4)
28internal static async Task<bool> IsLatestFileAsync(string fileName, Uri address) 47internal static async Task DownloadFileAsync(Uri address, string fileName) 56if (address.Scheme == Uri.UriSchemeFile) 118internal static async Task GetLatestFileAsync(string path, bool downloadLatest, Uri address)
Microsoft.Diagnostics.NETCore.Client (8)
DiagnosticsIpc\IpcEndpointConfig.cs (3)
164if (Uri.TryCreate(address, UriKind.Absolute, out Uri parsedAddress)) 176else if (string.Equals(parsedAddress.Scheme, Uri.UriSchemeFile, StringComparison.OrdinalIgnoreCase))
DiagnosticsIpc\IpcTcpSocketEndPoint.cs (5)
71if (!string.IsNullOrEmpty(uriToParse) && Uri.TryCreate(uriToParse, UriKind.RelativeOrAbsolute, out Uri uri)) 73if (!string.Equals(uri.Scheme, Uri.UriSchemeNetTcp, StringComparison.OrdinalIgnoreCase) 105if (!Uri.TryCreate(Uri.UriSchemeNetTcp + "://" + host + ":" + port, UriKind.RelativeOrAbsolute, out _))
Microsoft.DotNet.Arcade.Sdk (1)
src\GenerateSourcePackageSourceLinkTargetsFile.cs (1)
92var contentFilesSourceLinkUrl = innerMostRootSourceLinkUrl.Replace("*", Uri.EscapeUriString(relativePathToSourceRoot.Replace('\\', '/')) + "*");
Microsoft.DotNet.Build.Manifest (2)
BuildModelFactory.cs (2)
223if (Uri.TryCreate(repoUri, UriKind.Absolute, out Uri parsedUri))
Microsoft.DotNet.Cli.Telemetry (12)
Implementation\AzureMonitorConnectionString.cs (4)
11internal sealed record AzureMonitorConnectionString(string InstrumentationKey, Uri IngestionEndpoint) 21public Uri TrackUri { get; } = new Uri(IngestionEndpoint, "v2.1/track"); 64if (!Uri.TryCreate(EnsureTrailingSlash(ingestionEndpoint), UriKind.Absolute, out var endpointUri))
Implementation\HttpTelemetryUploadTransport.cs (4)
23private readonly Uri _trackUri; 26public HttpTelemetryUploadTransport(Uri trackUri) 33internal HttpTelemetryUploadTransport(Uri trackUri, HttpMessageHandler handler) 38private HttpTelemetryUploadTransport(Uri trackUri, HttpClient client)
PersistentStorageLogExporter.cs (2)
32private readonly Uri _ingestionTrackUri; 44Uri ingestionTrackUri,
PersistentStorageTraceExporter.cs (2)
31private readonly Uri _ingestionTrackUri; 43Uri ingestionTrackUri,
Microsoft.DotNet.Cli.Utils (1)
PathUtility.cs (1)
240Uri resultUri = new(new Uri(basePath), new Uri(relativePath, UriKind.Relative));
Microsoft.DotNet.HotReload.Watch (4)
Browser\BrowserLauncher.cs (3)
57Uri.TryCreate(profileLaunchUrl, UriKind.Absolute, out _) ? profileLaunchUrl : 58Uri.TryCreate(outputLaunchUrl, UriKind.Absolute, out var launchUri) ? new Uri(launchUri, profileLaunchUrl).ToString() :
src\sdk\src\Dotnet.Watch\HotReloadClient\Web\KestrelWebSocketServer.cs (1)
75var uri = new Uri(httpUrl, UriKind.Absolute);
Microsoft.Extensions.AI.Abstractions (17)
ChatCompletion\ChatClientMetadata.cs (2)
18public ChatClientMetadata(string? providerName = null, Uri? providerUri = null, string? defaultModelId = null) 33public Uri? ProviderUri { get; }
Contents\CitationAnnotation.cs (1)
32public Uri? Url { get; set; }
Contents\DataContent.cs (2)
68public DataContent(Uri uri, string? mediaType = null) 269/// or from a <see cref="System.Uri"/>.
Contents\UriContent.cs (3)
22private Uri _uri; 56public UriContent(Uri uri, string mediaType) 63public Uri Uri
Embeddings\EmbeddingGeneratorMetadata.cs (2)
19public EmbeddingGeneratorMetadata(string? providerName = null, Uri? providerUri = null, string? defaultModelId = null, int? defaultModelDimensions = null) 35public Uri? ProviderUri { get; }
Image\ImageGeneratorMetadata.cs (2)
21public ImageGeneratorMetadata(string? providerName = null, Uri? providerUri = null, string? defaultModelId = null) 36public Uri? ProviderUri { get; }
SpeechToText\SpeechToTextClientMetadata.cs (2)
21public SpeechToTextClientMetadata(string? providerName = null, Uri? providerUri = null, string? defaultModelId = null) 36public Uri? ProviderUri { get; }
Tools\HostedMcpServerTool.cs (3)
62public HostedMcpServerTool(string serverName, Uri serverUrl) 76public HostedMcpServerTool(string serverName, Uri serverUrl, IReadOnlyDictionary<string, object?>? additionalProperties) 82private static string ValidateUrl(Uri serverUrl)
Microsoft.Extensions.AI.Abstractions.Tests (13)
ChatCompletion\ChatClientMetadataTests.cs (1)
23var uri = new Uri("https://example.com");
Contents\CitationAnnotationTests.cs (1)
59Uri url = new("https://example.com");
Contents\UriContentTests.cs (1)
16Assert.Throws<ArgumentNullException>("uri", () => new UriContent((Uri)null!, "image/png"));
Embeddings\EmbeddingGeneratorMetadataTests.cs (1)
24var uri = new Uri("https://example.com");
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 (2)
99yield return new TestData<Uri>(new("http://example.com"), """{"type":["string","null"], "format":"uri"}"""); 1243[JsonSerializable(typeof(Uri))]
Tools\HostedMcpServerToolTests.cs (1)
198Assert.Throws<ArgumentNullException>("serverUrl", () => new HostedMcpServerTool("name", (Uri)null!));
Utilities\AIJsonUtilitiesTests.cs (4)
1057public Uri? UriProp { get; set; } 1066public Uri? UrlProp { get; set; } 1084public Uri? DataTypeUrlProp { get; set; } 1087public Uri? DataTypeImageUrlProp { get; set; }
Microsoft.Extensions.AI.Evaluation.Console (4)
Commands\CleanCacheCommand.cs (1)
24Uri? endpointUri,
Commands\CleanResultsCommand.cs (1)
24Uri? endpointUri,
Commands\ReportCommand.cs (1)
29Uri? endpointUri,
Program.cs (1)
67new Option<Uri>(
Microsoft.Extensions.AI.Evaluation.Integration.Tests (2)
test\Shared\ImageDataUri\ImageDataUri.cs (2)
16internal static Uri GetImageDataUri() 25internal static Uri GetPdfDataUri()
Microsoft.Extensions.AI.Evaluation.Safety (3)
ContentSafetyService.cs (1)
237Uri discoveryUri = new Uri(discoveryUrl);
ContentSafetyServiceConfiguration.cs (2)
59public Uri? Endpoint { get; } 167Uri endpoint,
Microsoft.Extensions.AI.Evaluation.Tests (2)
ModelInfoTests.cs (2)
49Uri? uri = providerUri != null ? new Uri(providerUri) : null; 101Uri? uri = providerUri != null ? new Uri(providerUri) : null;
Microsoft.Extensions.AI.Integration.Tests (4)
ChatClientIntegrationTests.cs (1)
475AIFunctionFactory.Create((Uri uri) => uri, createOptions()),
HttpHandlerExpectedInput.cs (1)
13public Uri? Uri { get; set; }
test\Shared\ImageDataUri\ImageDataUri.cs (2)
16internal static Uri GetImageDataUri() 25internal static Uri GetPdfDataUri()
Microsoft.Extensions.AI.OllamaSharp.Integration.Tests (7)
IntegrationTestHelpers.cs (2)
13/// <summary>Gets a <see cref="Uri"/> to use for testing, or <see langword="null"/> if the associated tests should be disabled.</summary> 14public static Uri? GetOllamaUri()
OllamaSharpChatClientIntegrationTests.cs (2)
18IntegrationTestHelpers.GetOllamaUri() is Uri endpoint ? 94var endpoint = IntegrationTestHelpers.GetOllamaUri();
OllamaSharpEmbeddingGeneratorIntegrationTests.cs (2)
15IntegrationTestHelpers.GetOllamaUri() is Uri endpoint ? 24var endpoint = IntegrationTestHelpers.GetOllamaUri();
OllamaSharpImageGeneratingChatClientIntegrationTests.cs (1)
16IntegrationTestHelpers.GetOllamaUri() is Uri endpoint ?
Microsoft.Extensions.AI.OpenAI (6)
OpenAIClientExtensions.cs (2)
34internal static Uri DefaultOpenAIEndpoint { get; } = new("https://api.openai.com/v1"); 234internal static string ImageUriToMediaType(Uri uri)
OpenAIResponsesChatClient.cs (4)
638bool isUrl = Uri.TryCreate(mcpTool.ServerAddress, UriKind.Absolute, out Uri? serverAddressUrl); 1296else if (Uri.TryCreate(inputImageUrl, UriKind.Absolute, out Uri? imageUri))
Microsoft.Extensions.AI.OpenAI.Tests (10)
OpenAIAssistantChatClientTests.cs (1)
31Uri endpoint = new("http://localhost/some/endpoint");
OpenAIChatClientTests.cs (1)
35Uri endpoint = new("http://localhost/some/endpoint");
OpenAIConversionTests.cs (1)
470var expectedUri = new Uri("http://localhost:8000");
OpenAIEmbeddingGeneratorTests.cs (1)
30Uri endpoint = new("http://localhost/some/endpoint");
OpenAIImageGeneratorTests.cs (1)
23Uri endpoint = new("http://localhost/some/endpoint");
OpenAIResponseClientIntegrationTests.cs (1)
532var imageUri = ImageDataUri.GetImageDataUri();
OpenAIResponseClientTests.cs (1)
38Uri endpoint = new("http://localhost/some/endpoint");
OpenAISpeechToTextClientTests.cs (1)
31Uri endpoint = new("http://localhost/some/endpoint");
test\Shared\ImageDataUri\ImageDataUri.cs (2)
16internal static Uri GetImageDataUri() 25internal static Uri GetPdfDataUri()
Microsoft.Extensions.Configuration.Binder.SourceGeneration (1)
Parser\KnownTypeSymbols.cs (1)
85Uri = compilation.GetBestTypeByMetadataName(typeof(Uri));
Microsoft.Extensions.DataIngestion.MarkItDown (2)
MarkItDownMcpReader.cs (2)
21private readonly Uri _mcpServerUri; 29public MarkItDownMcpReader(Uri mcpServerUri, McpClientOptions? options = null)
Microsoft.Extensions.DataIngestion.Tests (3)
Readers\DocumentReaderConformanceTests.cs (3)
112protected async Task SupportsImagesCore(Uri source) 153protected static async Task<HttpResponseMessage> DownloadAsync(Uri uri) 179protected static async Task<FileInfo> DownloadToFileAsync(Uri uri)
Microsoft.Extensions.DependencyModel (2)
DependencyContextLoader.cs (2)
161if (Uri.TryCreate(assembly.CodeBase, UriKind.Absolute, out Uri? codeBase)
Microsoft.Extensions.DotNetDeltaApplier (2)
src\sdk\src\Dotnet.Watch\HotReloadAgent.Host\Transport.cs (2)
40if (!Uri.TryCreate(webSocketEndpoint, UriKind.Absolute, out var uri) ||
Microsoft.Extensions.Http (1)
src\runtime\src\libraries\Common\src\System\Net\Http\UriRedactionHelper.cs (1)
51public static string? GetRedactedUriString(Uri? uri)
Microsoft.Extensions.Http.Diagnostics (3)
Logging\Internal\HttpRequestReader.cs (3)
151return Uri.UnescapeDataString(value); 197_ = stringBuilder.Append(Uri.EscapeDataString(key)) 199.Append(Uri.EscapeDataString(redacted));
Microsoft.Extensions.Http.Diagnostics.Tests (8)
Logging\AcceptanceTests.cs (1)
25private static readonly Uri _unreachableRequestUri = new("https://we.wont.hit.this.domain.anyway");
Logging\HttpRequestReaderTest.cs (7)
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}");
Microsoft.Extensions.Http.Resilience (12)
Hedging\ResilienceHttpClientBuilderExtensions.Hedging.cs (1)
100if (!routingPipeline.TryGetNextRoute(out var route))
Internal\RequestMessageSnapshot.cs (1)
21private Uri? _requestUri;
Internal\UriExtensions.cs (3)
23public static Uri ReplaceHost(this Uri currentUri, Uri hostUri)
Resilience\Internal\ByAuthorityPipelineKeyProvider.cs (1)
16var url = requestMessage.RequestUri ?? throw new InvalidOperationException("The request message must have a URL specified.");
Routing\Internal\OrderedGroups\OrderedGroupsRoutingStrategy.cs (1)
32public override bool TryGetNextRoute([NotNullWhen(true)] out Uri? nextRoute)
Routing\Internal\RequestRoutingStrategy.cs (1)
29public abstract bool TryGetNextRoute([NotNullWhen(true)] out Uri? nextRoute);
Routing\Internal\RoutingResilienceStrategy.cs (1)
45if (!strategy.TryGetNextRoute(out var route))
Routing\Internal\WeightedGroups\WeightedGroupsRoutingStrategy.cs (1)
48public override bool TryGetNextRoute([NotNullWhen(true)] out Uri? nextRoute)
Routing\UriEndpoint.cs (1)
21public Uri? Uri { get; set; }
Routing\WeightedUriEndpoint.cs (1)
25public Uri? Uri { get; set; }
Microsoft.Extensions.Http.Resilience.PerformanceTests (4)
HedgingBenchmark.cs (1)
15private static readonly Uri _uri = new(HttpClientFactory.PrimaryEndpoint);
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 (8)
Hedging\HedgingTests.cs (2)
365Uri? outUri = null; 368.Callback((out Uri? uri) =>
Resilience\UriExtensionsTests.cs (3)
25var fallbackUri = new Uri("https://fallback-uri.com"); 26var initialUri = new Uri(initialUriString); 40var initialUri = new Uri(initialUriString);
Routing\IStubRoutingService.cs (1)
10Uri Route { get; }
Routing\MockRoutingStrategy.cs (1)
31public override bool TryGetNextRoute([NotNullWhen(true)] out Uri? nextRoute)
Routing\RoutingStrategyTest.cs (1)
160while (strategy.TryGetNextRoute(out var route))
Microsoft.Extensions.Logging.AzureAppServices (2)
BlobAppendReferenceWrapper.cs (2)
15private readonly Uri _fullUri; 17private readonly Uri _appendUri;
Microsoft.Extensions.ML (17)
Builder\BuilderExtensions.cs (2)
69this PredictionEnginePoolBuilder<TData, TPrediction> builder, string modelName, Uri uri) 137this PredictionEnginePoolBuilder<TData, TPrediction> builder, string modelName, Uri uri, TimeSpan period)
ModelLoaders\UriModelLoader.cs (15)
25private Uri _uri; 45internal void Start(Uri uri, TimeSpan period) 105internal virtual async Task<bool> MatchEtagAsync(Uri uri, string eTag) 193private static readonly Action<ILogger, Uri, Exception> _uriReloadBegin = LoggerMessage.Define<Uri>( 198private static readonly Action<ILogger, Uri, double, Exception> _uriReloadEnd = LoggerMessage.Define<Uri, double>( 203private static readonly Action<ILogger, Uri, double, Exception> _uriReloadError = LoggerMessage.Define<Uri, double>( 208private static readonly Action<ILogger, Uri, Exception> _uriLoadError = LoggerMessage.Define<Uri>( 213public static void UriReloadBegin(ILogger logger, Uri uri) 218public static void UriReloadEnd(ILogger logger, Uri uri, TimeSpan duration) 223public static void UriReloadError(ILogger logger, Uri uri, TimeSpan duration, Exception exception) 228public static void UriLoadError(ILogger logger, Uri uri, Exception exception)
Microsoft.Extensions.ML.Tests (2)
UriLoaderTests.cs (2)
83public Func<Uri, string, bool> ETagMatches { get; set; } = delegate { return false; }; 100internal override Task<bool> MatchEtagAsync(Uri uri, string eTag)
Microsoft.Extensions.ServiceDiscovery (7)
Http\ResolvingHttpClientHandler.cs (1)
19var originalUri = request.RequestUri;
Http\ResolvingHttpDelegatingHandler.cs (3)
43var originalUri = request.RequestUri; 61internal static Uri GetUriWithEndpoint(Uri uri, ServiceEndpoint serviceEndpoint, ServiceDiscoveryOptions options)
PassThrough\PassThroughServiceEndpointProviderFactory.cs (3)
31if ((serviceName.Contains("://", StringComparison.Ordinal) || !Uri.TryCreate($"fakescheme://{serviceName}", default, out var uri)) && !Uri.TryCreate(serviceName, default, out uri))
Microsoft.Extensions.ServiceDiscovery.Abstractions (11)
ServiceEndpoint.cs (3)
69if (value.IndexOf("://", StringComparison.Ordinal) < 0 && Uri.TryCreate($"fakescheme://{value}", default, out var uri)) 78if (Uri.TryCreate(value, default, out uri))
ServiceEndpointQuery.cs (3)
42&& Uri.TryCreate($"fakescheme://{input}", default, out var uri)) 46else if (Uri.TryCreate(input, default, out uri))
UriEndPoint.cs (5)
9/// An endpoint represented by a <see cref="System.Uri"/>. 16/// <param name="uri">The <see cref="System.Uri"/>.</param> 17public UriEndPoint(Uri uri) 24/// Gets the <see cref="System.Uri"/> associated with this endpoint. 26public Uri Uri { get; }
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; 68Uri uri; 107private string GetDefaultScheme(Uri originalUri)
Microsoft.Extensions.ServiceDiscovery.Yarp.Tests (2)
YarpServiceDiscoveryTests.cs (2)
262Assert.True(Uri.TryCreate(address, default, out var uri), $"Failed to parse address '{address}' as URI.");
Microsoft.Gen.Logging.Generated.Tests (1)
test\Generators\Microsoft.Gen.Logging\TestClasses\LogPropertiesSpecialTypesExtensions.cs (1)
20public Uri? P5 { get; set; }
Microsoft.Maui (7)
Handlers\HybridWebView\HybridWebViewHandler.cs (1)
66 internal static readonly Uri AppOriginUri = new(AppOrigin);
Handlers\HybridWebView\HybridWebViewQueryStringHelper.cs (1)
42 .ToDictionary(p => p[0], p => Uri.UnescapeDataString(p[1]));
ImageSources\IUriImageSource.cs (1)
8 Uri Uri { get; }
VisualDiagnostics\SourceInfo.cs (3)
21 public SourceInfo(Uri sourceUri, int lineNumber, int linePosition) 28 public Uri SourceUri { get; } 38 public void Deconstruct(out Uri sourceUri, out int lineNumber, out int linePosition)
VisualDiagnostics\VisualDiagnostics.cs (1)
22 public static void RegisterSourceInfo(object target, Uri uri, int lineNumber, int linePosition)
Microsoft.Maui.Controls (78)
Application\Application.cs (2)
313 protected virtual void OnAppLinkRequestReceived(Uri uri) 364 public void SendOnAppLinkRequestReceived(Uri uri)
AppLinkEntry.cs (4)
28 public static readonly BindableProperty AppLinkUriProperty = BindableProperty.Create(nameof(AppLinkUri), typeof(Uri), typeof(AppLinkEntry), null); 34 public Uri AppLinkUri 36 get { return (Uri)GetValue(AppLinkUriProperty); } 75 public static AppLinkEntry FromUri(Uri uri)
BindableProperty.cs (1)
45 { typeof(Uri), new UriTypeConverter() },
IAppLinkEntry.cs (1)
9 Uri AppLinkUri { get; set; }
IAppLinks.cs (1)
9 void DeregisterLink(Uri appLinkUri);
ImageSource.cs (4)
101 public static ImageSource FromUri(Uri uri) 110 Uri uri; 111 return Uri.TryCreate(source, UriKind.Absolute, out uri) && uri.Scheme != "file" ? FromUri(uri) : FromFile(source); 114 public static implicit operator ImageSource(Uri uri)
ImageSourceConverter.cs (4)
14 => sourceType == typeof(string) || sourceType == typeof(Uri); 21 if (value is Uri uriValue) 29 return Uri.TryCreate(strValue, UriKind.Absolute, out Uri uri) && uri.Scheme != "file" ? ImageSource.FromUri(uri) : ImageSource.FromFile(strValue);
ResourceDictionary.cs (11)
25 Uri _source; 28 internal static Action<ResourceDictionary, Uri, string, Assembly, System.Xml.IXmlLineInfo> s_setAndLoadSource; 32 public Uri Source 46 public void SetAndCreateSource<T>(Uri value) 57 public void SetAndLoadSource(Uri value, string resourcePath, Assembly assembly, global::System.Xml.IXmlLineInfo lineInfo) 72 internal void SetSource(Uri source, ResourceDictionary sourceInstance) 419 internal static Uri GetUriWithExplicitAssembly(string value, Assembly defaultAssembly) 436 internal static Uri CombineUriAndAssembly(string value, Assembly assembly) 441 internal static string GetResourcePath(Uri uri, string rootTargetPath) 445 var resourceUri = uri.OriginalString.StartsWith("/", StringComparison.Ordinal) 458 if (value is not Uri uri)
Routing.cs (1)
245 var uri = new Uri(route, UriKind.RelativeOrAbsolute);
Shell\RequestDefinition.cs (2)
32 var uri = ShellUriHandler.CreateUri(uriPath); 45 public Uri FullUri { get; }
Shell\Shell.cs (2)
1231 var location = CurrentState.Location; 2167 public Uri AbsoluteUrl => shell.CurrentState.FullLocation;
Shell\ShellNavigationManager.cs (3)
93 var uri = navigationRequest.Request.FullUri; 415 var targetUri = ShellUriHandler.ConvertToStandardFormat(shell, request.Request.FullUri); 416 var currentUri = ShellUriHandler.ConvertToStandardFormat(shell, current.FullLocation);
Shell\ShellNavigationState.cs (10)
15 Uri _fullLocation; 17 internal Uri FullLocation 27 public Uri Location 42 var uri = ShellUriHandler.CreateUri(location); 56 public ShellNavigationState(Uri location) 62 public static implicit operator ShellNavigationState(Uri uri) => new ShellNavigationState(uri); 65 static Uri TrimDownImplicitAndDefaultPaths(Uri uri) 110 => sourceType == typeof(string) || sourceType == typeof(Uri); 116 Uri uri => (ShellNavigationState)uri,
Shell\ShellUriHandler.cs (20)
17 internal static Uri FormatUri(Uri path, Shell shell) 71 var returnValue = ConvertToStandardFormat("scheme", "host", null, new Uri(result, UriKind.Relative)); 88 internal static Uri CreateUri(string path) 98 if (Uri.TryCreate(path, UriKind.Absolute, out Uri result)) 131 public static Uri ConvertToStandardFormat(Shell shell, Uri request) 137 public static Uri ConvertToStandardFormat(string routeScheme, string routeHost, string route, Uri request) 165 static internal ShellNavigationRequest.WhatToDoWithTheStack CalculateStackRequest(Uri uri) 176 internal static ShellNavigationRequest GetNavigationRequest(Shell shell, Uri uri, bool enableRelativeShellRoutes = false, bool throwNavigationErrorAsException = true, ShellNavigationParameters shellNavigationParameters = null) 183 Uri request = ConvertToStandardFormat(shell, uri); 222 internal static List<RouteRequestBuilder> GenerateRoutePaths(Shell shell, Uri request) 228 internal static List<RouteRequestBuilder> GenerateRoutePaths(Shell shell, Uri request, Uri originalRequest, bool enableRelativeShellRoutes) 329 var uri = ConvertToStandardFormat(shell, CreateUri(route)); 350 Uri originalRequest) 430 Uri startingFrom, 781 public Uri GetUri()
StreamWrapper.cs (1)
93 public static async Task<Stream> GetStreamAsync(Uri uri, CancellationToken cancellationToken, HttpClient client)
UriImageSource.cs (7)
17 nameof(Uri), typeof(Uri), typeof(UriImageSource), default(Uri), 19 validateValue: (bindable, value) => value == null || ((Uri)value).IsAbsoluteUri); 48 public Uri Uri 50 get => (Uri)GetValue(UriProperty); 88 async Task<Stream> GetStreamAsync(Uri uri, CancellationToken cancellationToken = default(CancellationToken)) 113 async Task<Stream> DownloadStreamAsync(Uri uri, CancellationToken cancellationToken)
UriTypeConverter.cs (1)
28 if (value is not Uri uri)
WebView\WebViewSource.cs (3)
12 public static implicit operator WebViewSource(Uri url) 41 => sourceType == typeof(string) || sourceType == typeof(Uri); 47 Uri uri => (UrlWebViewSource)uri,
Microsoft.Maui.Controls.Build.Tasks (5)
CompiledConverters\ImageSourceTypeConverter.cs (2)
18 if (Uri.TryCreate(value, UriKind.Absolute, out Uri uri) && uri.Scheme != "file")
CompiledConverters\RDSourceTypeConverter.cs (1)
43 var uri = new Uri(value, UriKind.Relative);
CompiledValueProviders\StyleSheetProvider.cs (1)
56 var uri = new Uri(source, UriKind.Relative);
CreateObjectVisitor.cs (1)
547 if (hasValue && Uri.TryCreate(valueString, UriKind.RelativeOrAbsolute, out _))
Microsoft.Maui.Controls.DesignTools (2)
ImageSourceDesignTypeConverter.cs (2)
13 return Uri.TryCreate(strValue, UriKind.RelativeOrAbsolute, out Uri _);
Microsoft.Maui.Controls.Xaml (8)
CreateValuesVisitor.cs (4)
340 else if (nodeType == typeof(Uri)) 379 if (nodeType == typeof(Uri) && Uri.TryCreate(valuestring, UriKind.RelativeOrAbsolute, out Uri urival))
MarkupExtensions\StyleSheetExtension.cs (1)
17 public Uri Source { get; set; }
ResourceDictionaryHelpers.cs (3)
20 public static void LoadFromSource(ResourceDictionary rd, Uri source, string resourcePath, Assembly assembly, IXmlLineInfo lineInfo) 33 var sourceUri = ResourceDictionary.RDSourceTypeConverter.CombineUriAndAssembly(value, assembly); 39 internal static void SetAndLoadSource(ResourceDictionary rd, Uri value, string resourcePath, Assembly assembly, IXmlLineInfo lineInfo)
Microsoft.Maui.Essentials (41)
Browser\Browser.netstandard.tvos.watchos.cs (1)
9 public Task<bool> OpenAsync(Uri uri, BrowserLaunchOptions options) =>
Browser\Browser.shared.cs (6)
18 Task<bool> OpenAsync(Uri uri, BrowserLaunchOptions options); 54 public static Task<bool> OpenAsync(Uri uri) => Default.OpenAsync(uri); 62 public static Task<bool> OpenAsync(Uri uri, BrowserLaunchMode launchMode) => Default.OpenAsync(uri, launchMode); 70 public static Task<bool> OpenAsync(Uri uri, BrowserLaunchOptions options) => Default.OpenAsync(uri, options); 124 public static Task<bool> OpenAsync(this IBrowser browser, Uri uri) => 134 public static Task<bool> OpenAsync(this IBrowser browser, Uri uri, BrowserLaunchMode launchMode) =>
Email\Email.shared.cs (3)
78 yield return "subject=" + Uri.EscapeDataString(message.Subject); 81 yield return "body=" + Uri.EscapeDataString(message.Body); 85 string.Join(",", addresses.Select(Uri.EscapeDataString));
Launcher\Launcher.netstandard.watchos.cs (3)
8 Task<bool> PlatformCanOpenAsync(Uri uri) => 11 Task<bool> PlatformOpenAsync(Uri uri) => 17 Task<bool> PlatformTryOpenAsync(Uri uri) =>
Launcher\Launcher.shared.cs (9)
25 Task<bool> CanOpenAsync(Uri uri); 33 Task<bool> OpenAsync(Uri uri); 48 Task<bool> TryOpenAsync(Uri uri); 76 public static Task<bool> CanOpenAsync(Uri uri) 94 public static Task<bool> OpenAsync(Uri uri) 120 public static Task<bool> TryOpenAsync(Uri uri) 139 public Task<bool> CanOpenAsync(Uri uri) 147 public Task<bool> OpenAsync(Uri uri) 165 public Task<bool> TryOpenAsync(Uri uri)
Types\PlacemarkExtensions.shared.cs (1)
27 return Uri.EscapeDataString(address);
Types\Shared\WebUtils.shared.cs (7)
9 internal static IDictionary<string, string> ParseQueryString(Uri uri) 74 name = Uri.UnescapeDataString(name); 76 parameters[name] = Uri.UnescapeDataString(value); 81 internal static Uri EscapeUri(Uri uri) 90 internal static bool CanHandleCallback(Uri expectedUrl, Uri callbackUrl)
WebAuthenticator\WebAuthenticator.shared.cs (8)
60 /// <param name="uri">The <see cref="Uri"/> object to decode the query parameters from.</param> 62 IDictionary<string, string>? DecodeResponse(Uri uri); 81 public static Task<WebAuthenticatorResult> AuthenticateAsync(Uri url, Uri callbackUrl) 131 public static Task<WebAuthenticatorResult> AuthenticateAsync(this IWebAuthenticator webAuthenticator, Uri url, Uri callbackUrl) => 174 public Uri? Url { get; set; } 179 public Uri? CallbackUrl { get; set; }
WebAuthenticator\WebAuthenticatorResult.shared.cs (3)
26 public WebAuthenticatorResult(Uri uri) : this(uri, null) 39 public WebAuthenticatorResult(Uri uri, IWebAuthenticatorResponseDecoder responseDecoder) 66 public Uri CallbackUri { get; }
Microsoft.ML.Core (5)
Data\ServerChannel.cs (1)
164Uri BaseAddress { get; }
Utilities\ResourceManagerUtils.cs (3)
114if (!Uri.TryCreate(Path.Combine(MlNetResourcesUrl, relativeUrl), UriKind.Absolute, out var absoluteUrl)) 249private async Task<Exception> DownloadResource(IHostEnvironment env, IChannel ch, HttpClient httpClient, Uri uri, string path, string fileName, CancellationToken ct)
Utilities\Stream.cs (1)
843if (Uri.IsWellFormedUriString(file, UriKind.Absolute))
Microsoft.ML.Core.Tests (4)
UnitTests\TestResourceDownload.cs (4)
43if (!Uri.TryCreate("https://fake-website/fake-model.model/", UriKind.Absolute, out var badUri)) 73if (!Uri.TryCreate("https://cnn.com/", UriKind.Absolute, out var cnn))
Microsoft.ML.FastTree (1)
GamModelParameters.cs (1)
953Uri uri = server.BaseAddress;
Microsoft.ML.Parquet (3)
PartitionedPathUtils.cs (3)
26Uri baseUri = new Uri(basepath); 27Uri uri = new Uri(path); 42relativePath = Uri.UnescapeDataString(baseUri.MakeRelativeUri(uri).ToString());
Microsoft.NET.Build.Containers (50)
AuthHandshakeMessageHandler.cs (10)
176Uri? validatedBearerRealm = null; 233internal static Uri ValidateRealmUri(string realm, string registryName, bool isInsecureRegistry) 235if (!Uri.TryCreate(realm, UriKind.Absolute, out Uri? realmUri)) 315if (!Uri.TryCreate($"https://{registryName}", UriKind.Absolute, out Uri? uri)) 371if (!Uri.TryCreate($"https://{registryName}", UriKind.Absolute, out Uri? uri)) 455private async Task<(AuthenticationHeaderValue, DateTimeOffset)?> TryOAuthPostAsync(DockerCredentials privateRepoCreds, AuthInfo bearerAuthInfo, Uri realmUri, CancellationToken cancellationToken) 511private async Task<(AuthenticationHeaderValue, DateTimeOffset)?> TryTokenGetAsync(DockerCredentials privateRepoCreds, AuthInfo bearerAuthInfo, Uri realmUri, CancellationToken cancellationToken)
Registry\DefaultBlobOperations.cs (2)
14private readonly Uri _baseUri; 19public DefaultBlobOperations(Uri baseUri, string registryName, HttpClient client, ILogger logger)
Registry\DefaultBlobUploadOperations.cs (16)
13private readonly Uri _baseUri; 17internal DefaultBlobUploadOperations(Uri baseUri, HttpClient client, ILogger logger) 24public async Task CompleteAsync(Uri uploadUri, string digest, CancellationToken cancellationToken) 29builder.Query += $"&digest={Uri.EscapeDataString(digest)}"; 30Uri putUri = builder.Uri; 43public async Task<HttpResponseMessage> GetStatusAsync(Uri uploadUri, CancellationToken cancellationToken) 51Uri startUploadUri = new(_baseUri, $"/v2/{repositoryName}/blobs/uploads/"); 62Uri location = pushResponse.GetNextLocation(); 73public async Task<FinalizeUploadInformation> UploadAtomicallyAsync(Uri uploadUri, Stream content, CancellationToken cancellationToken) 80Uri nextUploadUri = await PatchAsync(uploadUri, httpContent, cancellationToken).ConfigureAwait(false); 85public async Task<NextChunkUploadInformation> UploadChunkAsync(Uri uploadUri, HttpContent content, CancellationToken cancellationToken) 89Uri nextUploadUri = await PatchAsync(uploadUri, content, cancellationToken).ConfigureAwait(false); 94private HttpRequestMessage GetPatchHttpRequest(Uri uploadUri, HttpContent httpContent) 96Uri finalUri = uploadUri.IsAbsoluteUri ? uploadUri : new Uri(_baseUri, uploadUri); 105private async Task<Uri> PatchAsync(Uri uploadUri, HttpContent content, CancellationToken cancellationToken)
Registry\DefaultManifestOperations.cs (2)
14private readonly Uri _baseUri; 19internal DefaultManifestOperations(Uri baseUri, string registryName, HttpClient client, ILogger logger)
Registry\DefaultRegistryAPI.cs (4)
12private readonly Uri _baseUri; 24internal DefaultRegistryAPI(string registryName, Uri baseUri, bool isInsecureRegistry, ILogger logger, RegistryMode mode) 37private static HttpClient CreateClient(string registryName, Uri baseUri, ILogger logger, bool isInsecureRegistry, RegistryMode mode) 58private static HttpMessageHandler CreateHttpHandler(string registryName, Uri baseUri, bool allowInsecure, ILogger logger)
Registry\FinalizeUploadInformation.cs (1)
9internal record FinalizeUploadInformation(Uri UploadUri);
Registry\HttpExtensions.cs (2)
31public static Uri GetNextLocation(this HttpResponseMessage response) 45internal static bool IsAmazonECRRegistry(this Uri uri)
Registry\IBlobUploadOperations.cs (4)
14public Task CompleteAsync(Uri uploadUri, string digest, CancellationToken cancellationToken); 22public Task<HttpResponseMessage> GetStatusAsync(Uri uploadUri, CancellationToken cancellationToken); 35public Task<FinalizeUploadInformation> UploadAtomicallyAsync(Uri uploadUri, Stream content, CancellationToken cancellationToken); 43public Task<NextChunkUploadInformation> UploadChunkAsync(Uri uploadUri, HttpContent content, CancellationToken cancellationToken);
Registry\NextChunkUploadInformation.cs (1)
9internal record NextChunkUploadInformation(Uri UploadUri);
Registry\Registry.cs (7)
102internal Registry(Uri baseUri, ILogger logger, IRegistryAPI registryAPI, RegistrySettings? settings = null, Func<TimeSpan>? retryDelayProvider = null) : 106internal Registry(Uri baseUri, ILogger logger, RegistryMode mode, RegistrySettings? settings = null) : 110private Registry(Uri baseUri, ILogger logger, RegistryApiFactory factory, RegistrySettings? settings = null, Func<TimeSpan>? retryDelayProvider = null) 128private static string DeriveRegistryName(Uri baseUri) 143public Uri BaseUri { get; } 495Uri patchUri = startUploadInformation.UploadUri; 693public IRegistryAPI Create(string registryName, Uri baseUri, ILogger logger, bool isInsecureRegistry)
Registry\StartUploadInformation.cs (1)
9internal record StartUploadInformation(Uri UploadUri);
Microsoft.Net.Http.Headers (1)
src\aspnetcore\src\Http\Shared\CookieHeaderParserShared.cs (1)
45store[parsedName.Value.Value!] = Uri.UnescapeDataString(parsedValue.Value.Value!);
Microsoft.NET.Sdk.Publish.Tasks (31)
MsDeploy\CommonUtility.cs (1)
814Uri uri = new(physicalPath);
Tasks\Http\DefaultHttpClient.cs (3)
20public Task<HttpResponseMessage> PostAsync(Uri uri, StreamContent content) 26public Task<HttpResponseMessage> GetAsync(Uri uri, CancellationToken cancellationToken) 32public Task<HttpResponseMessage> PutAsync(Uri uri, StreamContent content, CancellationToken cancellationToken)
Tasks\Http\HttpClientExtensions.cs (3)
39Uri uri, 94Uri uri, 150Uri uri,
Tasks\Http\IHttpClient.cs (3)
25Task<HttpResponseMessage> PostAsync(Uri uri, StreamContent content); 33Task<HttpResponseMessage> GetAsync(Uri uri, CancellationToken cancellationToken); 42Task<HttpResponseMessage> PutAsync(Uri uri, StreamContent content, CancellationToken cancellationToken);
Tasks\MsDeploy\ImportParameterFile.cs (1)
190Uri sourceUri = new(ex.SourceUri);
Tasks\OneDeploy\DeploymentResponse.cs (1)
85Uri logUrl = new(deploymentResponse.LogUrl);
Tasks\OneDeploy\OneDeploy.cs (11)
102if (!GetPublishUrl(url, webjobName, webjobType, out var oneDeployPublishUri) || oneDeployPublishUri is null) 135if (!string.IsNullOrEmpty(deploymentUrl) && Uri.TryCreate(deploymentUrl, UriKind.Absolute, out var _)) 181Uri publishUri, 196private bool GetPublishUrl(string? publishUrl, string? webjobName, string? webjobType, out Uri? publishUri) 201!Uri.TryCreate(publishUrl, UriKind.Absolute, out var _)) 213Uri publishUri, 226private bool GetDefaultPublishUri(string publishUrl, out Uri publishUri) 235return Uri.TryCreate(publishUri.ToString(), UriKind.Absolute, out var _);
Tasks\OneDeploy\OneDeploy.WebJob.cs (3)
30Uri publishUri, 44private bool GetWebJobPublishUri(string publishUrl, string? webjobName, string? webjobType, out Uri publishUri) 60return Uri.TryCreate(publishUri.ToString(), UriKind.Absolute, out _);
Tasks\OneDeploy\OneDeployStatusService.cs (2)
34if (!Uri.TryCreate(url, UriKind.Absolute, out var _))
Tasks\Xdt\TransformXml.cs (1)
146Uri sourceUri = new(ex.SourceUri);
Tasks\ZipDeploy\DeploymentResponse.cs (1)
33Uri logUrl = new(deploymentResponse.LogUrl);
Tasks\ZipDeploy\ZipDeploy.cs (1)
91Uri uri = new($"{zipDeployPublishUrl}?isAsync=true", UriKind.Absolute);
Microsoft.SourceLink.AzureDevOpsServer.Git (45)
GetSourceLinkUrl.cs (2)
25protected override string? BuildSourceLinkUrl(Uri contentUri, Uri gitUri, string relativeUrl, string revisionId, ITaskItem? hostItem)
src\sourcelink\src\Common\AzureDevOps\AzureDevOpsUrlParser.cs (3)
109projectPath = string.Join("/", parts, 0, virtualDirectoryParts.Length) + "/" + collection + "/" + Uri.EscapeDataString(projectName ?? repositoryName); 113public static bool TryParseHostedSsh(Uri uri, [NotNullWhen(true)]out string? account, [NotNullWhen(true)]out string? repositoryPath, [NotNullWhen(true)]out string? repositoryName) 162public static bool TryParseOnPremSsh(Uri uri, [NotNullWhen(true)]out string? repositoryPath, [NotNullWhen(true)]out string? repositoryName)
src\sourcelink\src\Common\GitProvider\GetSourceLinkUrlGitTask.cs (20)
54protected virtual Uri GetDefaultContentUriFromHostUri(string authority, Uri gitUri) 57protected virtual Uri GetDefaultContentUriFromRepositoryUri(Uri repositoryUri) 60protected abstract string? BuildSourceLinkUrl(Uri contentUrl, Uri gitUri, string relativeUrl, string revisionId, ITaskItem? hostItem); 100if (!Uri.TryCreate(gitUrl, UriKind.Absolute, out var gitUri)) 118if (!TryGetMatchingContentUri(mappings, gitUri, out var contentUri, out var hostItem)) 151public readonly Uri ContentUri; 154public UrlMapping(string host, ITaskItem? hostItem, int port, Uri contentUri, bool hasDefaultContentUri) 168private IEnumerable<UrlMapping> GetUrlMappings(Uri gitUri) 170static bool IsValidContentUri(Uri uri) 179if (!UriUtilities.TryParseAuthority(hostUrl, out var hostUri)) 185Uri? contentUri; 192else if (!Uri.TryCreate(contentUrl, UriKind.Absolute, out contentUri) || !IsValidContentUri(contentUri)) 205if (Uri.TryCreate(RepositoryUrl, UriKind.Absolute, out var uri)) 225private static bool TryGetMatchingContentUri(UrlMapping[] mappings, Uri repoUri, [NotNullWhen(true)] out Uri? contentUri, out ITaskItem? hostItem)
src\sourcelink\src\Common\GitProvider\TranslateRepositoryUrlGitTask.cs (11)
29protected virtual string? TranslateSshUrl(Uri uri) 32protected virtual string? TranslateGitUrl(Uri uri) 35protected virtual string? TranslateHttpUrl(Uri uri) 56static bool isMatchingHostUri(Uri hostUri, Uri uri) 63if (Uri.TryCreate(url, UriKind.Absolute, out var uri) && 115private IEnumerable<Uri> GetHostUris() 121if (UriUtilities.TryParseAuthority(item.ItemSpec, out var hostUri)) 133if (IsSingleProvider && Uri.TryCreate(RepositoryUrl, UriKind.Absolute, out var repositoryUri))
src\sourcelink\src\Common\Utilities\UriUtilities.cs (8)
13public static bool TryParseAuthority(string value, [NotNullWhen(true)] out Uri? uri) 14=> Uri.TryCreate("unknown://" + value, UriKind.Absolute, out uri) && 17public static int GetExplicitPort(this Uri uri) 76public static string GetScheme(this Uri uri) 79public static string GetHost(this Uri uri) 82public static string GetAuthority(this Uri uri) 85public static string GetPath(this Uri uri) 88public static string GetPathAndQuery(this Uri uri)
TranslateRepositoryUrls.cs (1)
18protected override string? TranslateSshUrl(Uri uri)
Microsoft.SourceLink.AzureRepos.Git (49)
GetSourceLinkUrl.cs (6)
17protected override Uri GetDefaultContentUriFromHostUri(string authority, Uri gitUri) 26protected override Uri GetDefaultContentUriFromRepositoryUri(Uri repositoryUri) 29protected override string? BuildSourceLinkUrl(Uri contentUri, Uri gitUri, string relativeUrl, string revisionId, ITaskItem? hostItem)
src\sourcelink\src\Common\AzureDevOps\AzureDevOpsUrlParser.cs (3)
109projectPath = string.Join("/", parts, 0, virtualDirectoryParts.Length) + "/" + collection + "/" + Uri.EscapeDataString(projectName ?? repositoryName); 113public static bool TryParseHostedSsh(Uri uri, [NotNullWhen(true)]out string? account, [NotNullWhen(true)]out string? repositoryPath, [NotNullWhen(true)]out string? repositoryName) 162public static bool TryParseOnPremSsh(Uri uri, [NotNullWhen(true)]out string? repositoryPath, [NotNullWhen(true)]out string? repositoryName)
src\sourcelink\src\Common\GitProvider\GetSourceLinkUrlGitTask.cs (20)
54protected virtual Uri GetDefaultContentUriFromHostUri(string authority, Uri gitUri) 57protected virtual Uri GetDefaultContentUriFromRepositoryUri(Uri repositoryUri) 60protected abstract string? BuildSourceLinkUrl(Uri contentUrl, Uri gitUri, string relativeUrl, string revisionId, ITaskItem? hostItem); 100if (!Uri.TryCreate(gitUrl, UriKind.Absolute, out var gitUri)) 118if (!TryGetMatchingContentUri(mappings, gitUri, out var contentUri, out var hostItem)) 151public readonly Uri ContentUri; 154public UrlMapping(string host, ITaskItem? hostItem, int port, Uri contentUri, bool hasDefaultContentUri) 168private IEnumerable<UrlMapping> GetUrlMappings(Uri gitUri) 170static bool IsValidContentUri(Uri uri) 179if (!UriUtilities.TryParseAuthority(hostUrl, out var hostUri)) 185Uri? contentUri; 192else if (!Uri.TryCreate(contentUrl, UriKind.Absolute, out contentUri) || !IsValidContentUri(contentUri)) 205if (Uri.TryCreate(RepositoryUrl, UriKind.Absolute, out var uri)) 225private static bool TryGetMatchingContentUri(UrlMapping[] mappings, Uri repoUri, [NotNullWhen(true)] out Uri? contentUri, out ITaskItem? hostItem)
src\sourcelink\src\Common\GitProvider\TranslateRepositoryUrlGitTask.cs (11)
29protected virtual string? TranslateSshUrl(Uri uri) 32protected virtual string? TranslateGitUrl(Uri uri) 35protected virtual string? TranslateHttpUrl(Uri uri) 56static bool isMatchingHostUri(Uri hostUri, Uri uri) 63if (Uri.TryCreate(url, UriKind.Absolute, out var uri) && 115private IEnumerable<Uri> GetHostUris() 121if (UriUtilities.TryParseAuthority(item.ItemSpec, out var hostUri)) 133if (IsSingleProvider && Uri.TryCreate(RepositoryUrl, UriKind.Absolute, out var repositoryUri))
src\sourcelink\src\Common\Utilities\UriUtilities.cs (8)
13public static bool TryParseAuthority(string value, [NotNullWhen(true)] out Uri? uri) 14=> Uri.TryCreate("unknown://" + value, UriKind.Absolute, out uri) && 17public static int GetExplicitPort(this Uri uri) 76public static string GetScheme(this Uri uri) 79public static string GetHost(this Uri uri) 82public static string GetAuthority(this Uri uri) 85public static string GetPath(this Uri uri) 88public static string GetPathAndQuery(this Uri uri)
TranslateRepositoryUrls.cs (1)
22protected override string? TranslateSshUrl(Uri uri)
Microsoft.SourceLink.Bitbucket.Git (43)
GetSourceLinkUrl.cs (4)
28protected override string? BuildSourceLinkUrl(Uri contentUri, Uri gitUri, string relativeUrl, string revisionId, ITaskItem? hostItem) 50Uri contentUri, 107private static string BuildSourceLinkUrlForCloudEdition(Uri contentUri, string relativeUrl, string revisionId)
src\sourcelink\src\Common\GitProvider\GetSourceLinkUrlGitTask.cs (20)
54protected virtual Uri GetDefaultContentUriFromHostUri(string authority, Uri gitUri) 57protected virtual Uri GetDefaultContentUriFromRepositoryUri(Uri repositoryUri) 60protected abstract string? BuildSourceLinkUrl(Uri contentUrl, Uri gitUri, string relativeUrl, string revisionId, ITaskItem? hostItem); 100if (!Uri.TryCreate(gitUrl, UriKind.Absolute, out var gitUri)) 118if (!TryGetMatchingContentUri(mappings, gitUri, out var contentUri, out var hostItem)) 151public readonly Uri ContentUri; 154public UrlMapping(string host, ITaskItem? hostItem, int port, Uri contentUri, bool hasDefaultContentUri) 168private IEnumerable<UrlMapping> GetUrlMappings(Uri gitUri) 170static bool IsValidContentUri(Uri uri) 179if (!UriUtilities.TryParseAuthority(hostUrl, out var hostUri)) 185Uri? contentUri; 192else if (!Uri.TryCreate(contentUrl, UriKind.Absolute, out contentUri) || !IsValidContentUri(contentUri)) 205if (Uri.TryCreate(RepositoryUrl, UriKind.Absolute, out var uri)) 225private static bool TryGetMatchingContentUri(UrlMapping[] mappings, Uri repoUri, [NotNullWhen(true)] out Uri? contentUri, out ITaskItem? hostItem)
src\sourcelink\src\Common\GitProvider\TranslateRepositoryUrlGitTask.cs (11)
29protected virtual string? TranslateSshUrl(Uri uri) 32protected virtual string? TranslateGitUrl(Uri uri) 35protected virtual string? TranslateHttpUrl(Uri uri) 56static bool isMatchingHostUri(Uri hostUri, Uri uri) 63if (Uri.TryCreate(url, UriKind.Absolute, out var uri) && 115private IEnumerable<Uri> GetHostUris() 121if (UriUtilities.TryParseAuthority(item.ItemSpec, out var hostUri)) 133if (IsSingleProvider && Uri.TryCreate(RepositoryUrl, UriKind.Absolute, out var repositoryUri))
src\sourcelink\src\Common\Utilities\UriUtilities.cs (8)
13public static bool TryParseAuthority(string value, [NotNullWhen(true)] out Uri? uri) 14=> Uri.TryCreate("unknown://" + value, UriKind.Absolute, out uri) && 17public static int GetExplicitPort(this Uri uri) 76public static string GetScheme(this Uri uri) 79public static string GetHost(this Uri uri) 82public static string GetAuthority(this Uri uri) 85public static string GetPath(this Uri uri) 88public static string GetPathAndQuery(this Uri uri)
Microsoft.SourceLink.Common (8)
src\sourcelink\src\Common\Utilities\UriUtilities.cs (8)
13public static bool TryParseAuthority(string value, [NotNullWhen(true)] out Uri? uri) 14=> Uri.TryCreate("unknown://" + value, UriKind.Absolute, out uri) && 17public static int GetExplicitPort(this Uri uri) 76public static string GetScheme(this Uri uri) 79public static string GetHost(this Uri uri) 82public static string GetAuthority(this Uri uri) 85public static string GetPath(this Uri uri) 88public static string GetPathAndQuery(this Uri uri)
Microsoft.SourceLink.Gitea (41)
GetSourceLinkUrl.cs (2)
22protected override string? BuildSourceLinkUrl(Uri contentUri, Uri gitUri, string relativeUrl, string revisionId, ITaskItem? hostItem)
src\sourcelink\src\Common\GitProvider\GetSourceLinkUrlGitTask.cs (20)
54protected virtual Uri GetDefaultContentUriFromHostUri(string authority, Uri gitUri) 57protected virtual Uri GetDefaultContentUriFromRepositoryUri(Uri repositoryUri) 60protected abstract string? BuildSourceLinkUrl(Uri contentUrl, Uri gitUri, string relativeUrl, string revisionId, ITaskItem? hostItem); 100if (!Uri.TryCreate(gitUrl, UriKind.Absolute, out var gitUri)) 118if (!TryGetMatchingContentUri(mappings, gitUri, out var contentUri, out var hostItem)) 151public readonly Uri ContentUri; 154public UrlMapping(string host, ITaskItem? hostItem, int port, Uri contentUri, bool hasDefaultContentUri) 168private IEnumerable<UrlMapping> GetUrlMappings(Uri gitUri) 170static bool IsValidContentUri(Uri uri) 179if (!UriUtilities.TryParseAuthority(hostUrl, out var hostUri)) 185Uri? contentUri; 192else if (!Uri.TryCreate(contentUrl, UriKind.Absolute, out contentUri) || !IsValidContentUri(contentUri)) 205if (Uri.TryCreate(RepositoryUrl, UriKind.Absolute, out var uri)) 225private static bool TryGetMatchingContentUri(UrlMapping[] mappings, Uri repoUri, [NotNullWhen(true)] out Uri? contentUri, out ITaskItem? hostItem)
src\sourcelink\src\Common\GitProvider\TranslateRepositoryUrlGitTask.cs (11)
29protected virtual string? TranslateSshUrl(Uri uri) 32protected virtual string? TranslateGitUrl(Uri uri) 35protected virtual string? TranslateHttpUrl(Uri uri) 56static bool isMatchingHostUri(Uri hostUri, Uri uri) 63if (Uri.TryCreate(url, UriKind.Absolute, out var uri) && 115private IEnumerable<Uri> GetHostUris() 121if (UriUtilities.TryParseAuthority(item.ItemSpec, out var hostUri)) 133if (IsSingleProvider && Uri.TryCreate(RepositoryUrl, UriKind.Absolute, out var repositoryUri))
src\sourcelink\src\Common\Utilities\UriUtilities.cs (8)
13public static bool TryParseAuthority(string value, [NotNullWhen(true)] out Uri? uri) 14=> Uri.TryCreate("unknown://" + value, UriKind.Absolute, out uri) && 17public static int GetExplicitPort(this Uri uri) 76public static string GetScheme(this Uri uri) 79public static string GetHost(this Uri uri) 82public static string GetAuthority(this Uri uri) 85public static string GetPath(this Uri uri) 88public static string GetPathAndQuery(this Uri uri)
Microsoft.SourceLink.Gitee (43)
GetSourceLinkUrl.cs (4)
22protected override Uri GetDefaultContentUriFromHostUri(string authority, Uri gitUri) 25protected override string? BuildSourceLinkUrl(Uri contentUri, Uri gitUri, string relativeUrl, string revisionId, ITaskItem? hostItem)
src\sourcelink\src\Common\GitProvider\GetSourceLinkUrlGitTask.cs (20)
54protected virtual Uri GetDefaultContentUriFromHostUri(string authority, Uri gitUri) 57protected virtual Uri GetDefaultContentUriFromRepositoryUri(Uri repositoryUri) 60protected abstract string? BuildSourceLinkUrl(Uri contentUrl, Uri gitUri, string relativeUrl, string revisionId, ITaskItem? hostItem); 100if (!Uri.TryCreate(gitUrl, UriKind.Absolute, out var gitUri)) 118if (!TryGetMatchingContentUri(mappings, gitUri, out var contentUri, out var hostItem)) 151public readonly Uri ContentUri; 154public UrlMapping(string host, ITaskItem? hostItem, int port, Uri contentUri, bool hasDefaultContentUri) 168private IEnumerable<UrlMapping> GetUrlMappings(Uri gitUri) 170static bool IsValidContentUri(Uri uri) 179if (!UriUtilities.TryParseAuthority(hostUrl, out var hostUri)) 185Uri? contentUri; 192else if (!Uri.TryCreate(contentUrl, UriKind.Absolute, out contentUri) || !IsValidContentUri(contentUri)) 205if (Uri.TryCreate(RepositoryUrl, UriKind.Absolute, out var uri)) 225private static bool TryGetMatchingContentUri(UrlMapping[] mappings, Uri repoUri, [NotNullWhen(true)] out Uri? contentUri, out ITaskItem? hostItem)
src\sourcelink\src\Common\GitProvider\TranslateRepositoryUrlGitTask.cs (11)
29protected virtual string? TranslateSshUrl(Uri uri) 32protected virtual string? TranslateGitUrl(Uri uri) 35protected virtual string? TranslateHttpUrl(Uri uri) 56static bool isMatchingHostUri(Uri hostUri, Uri uri) 63if (Uri.TryCreate(url, UriKind.Absolute, out var uri) && 115private IEnumerable<Uri> GetHostUris() 121if (UriUtilities.TryParseAuthority(item.ItemSpec, out var hostUri)) 133if (IsSingleProvider && Uri.TryCreate(RepositoryUrl, UriKind.Absolute, out var repositoryUri))
src\sourcelink\src\Common\Utilities\UriUtilities.cs (8)
13public static bool TryParseAuthority(string value, [NotNullWhen(true)] out Uri? uri) 14=> Uri.TryCreate("unknown://" + value, UriKind.Absolute, out uri) && 17public static int GetExplicitPort(this Uri uri) 76public static string GetScheme(this Uri uri) 79public static string GetHost(this Uri uri) 82public static string GetAuthority(this Uri uri) 85public static string GetPath(this Uri uri) 88public static string GetPathAndQuery(this Uri uri)
Microsoft.SourceLink.GitHub (43)
GetSourceLinkUrl.cs (4)
22protected override Uri GetDefaultContentUriFromHostUri(string authority, Uri gitUri) 25protected override string? BuildSourceLinkUrl(Uri contentUri, Uri gitUri, string relativeUrl, string revisionId, ITaskItem? hostItem)
src\sourcelink\src\Common\GitProvider\GetSourceLinkUrlGitTask.cs (20)
54protected virtual Uri GetDefaultContentUriFromHostUri(string authority, Uri gitUri) 57protected virtual Uri GetDefaultContentUriFromRepositoryUri(Uri repositoryUri) 60protected abstract string? BuildSourceLinkUrl(Uri contentUrl, Uri gitUri, string relativeUrl, string revisionId, ITaskItem? hostItem); 100if (!Uri.TryCreate(gitUrl, UriKind.Absolute, out var gitUri)) 118if (!TryGetMatchingContentUri(mappings, gitUri, out var contentUri, out var hostItem)) 151public readonly Uri ContentUri; 154public UrlMapping(string host, ITaskItem? hostItem, int port, Uri contentUri, bool hasDefaultContentUri) 168private IEnumerable<UrlMapping> GetUrlMappings(Uri gitUri) 170static bool IsValidContentUri(Uri uri) 179if (!UriUtilities.TryParseAuthority(hostUrl, out var hostUri)) 185Uri? contentUri; 192else if (!Uri.TryCreate(contentUrl, UriKind.Absolute, out contentUri) || !IsValidContentUri(contentUri)) 205if (Uri.TryCreate(RepositoryUrl, UriKind.Absolute, out var uri)) 225private static bool TryGetMatchingContentUri(UrlMapping[] mappings, Uri repoUri, [NotNullWhen(true)] out Uri? contentUri, out ITaskItem? hostItem)
src\sourcelink\src\Common\GitProvider\TranslateRepositoryUrlGitTask.cs (11)
29protected virtual string? TranslateSshUrl(Uri uri) 32protected virtual string? TranslateGitUrl(Uri uri) 35protected virtual string? TranslateHttpUrl(Uri uri) 56static bool isMatchingHostUri(Uri hostUri, Uri uri) 63if (Uri.TryCreate(url, UriKind.Absolute, out var uri) && 115private IEnumerable<Uri> GetHostUris() 121if (UriUtilities.TryParseAuthority(item.ItemSpec, out var hostUri)) 133if (IsSingleProvider && Uri.TryCreate(RepositoryUrl, UriKind.Absolute, out var repositoryUri))
src\sourcelink\src\Common\Utilities\UriUtilities.cs (8)
13public static bool TryParseAuthority(string value, [NotNullWhen(true)] out Uri? uri) 14=> Uri.TryCreate("unknown://" + value, UriKind.Absolute, out uri) && 17public static int GetExplicitPort(this Uri uri) 76public static string GetScheme(this Uri uri) 79public static string GetHost(this Uri uri) 82public static string GetAuthority(this Uri uri) 85public static string GetPath(this Uri uri) 88public static string GetPathAndQuery(this Uri uri)
Microsoft.SourceLink.GitLab (41)
GetSourceLinkUrl.cs (2)
27protected override string? BuildSourceLinkUrl(Uri contentUri, Uri gitUri, string relativeUrl, string revisionId, ITaskItem? hostItem)
src\sourcelink\src\Common\GitProvider\GetSourceLinkUrlGitTask.cs (20)
54protected virtual Uri GetDefaultContentUriFromHostUri(string authority, Uri gitUri) 57protected virtual Uri GetDefaultContentUriFromRepositoryUri(Uri repositoryUri) 60protected abstract string? BuildSourceLinkUrl(Uri contentUrl, Uri gitUri, string relativeUrl, string revisionId, ITaskItem? hostItem); 100if (!Uri.TryCreate(gitUrl, UriKind.Absolute, out var gitUri)) 118if (!TryGetMatchingContentUri(mappings, gitUri, out var contentUri, out var hostItem)) 151public readonly Uri ContentUri; 154public UrlMapping(string host, ITaskItem? hostItem, int port, Uri contentUri, bool hasDefaultContentUri) 168private IEnumerable<UrlMapping> GetUrlMappings(Uri gitUri) 170static bool IsValidContentUri(Uri uri) 179if (!UriUtilities.TryParseAuthority(hostUrl, out var hostUri)) 185Uri? contentUri; 192else if (!Uri.TryCreate(contentUrl, UriKind.Absolute, out contentUri) || !IsValidContentUri(contentUri)) 205if (Uri.TryCreate(RepositoryUrl, UriKind.Absolute, out var uri)) 225private static bool TryGetMatchingContentUri(UrlMapping[] mappings, Uri repoUri, [NotNullWhen(true)] out Uri? contentUri, out ITaskItem? hostItem)
src\sourcelink\src\Common\GitProvider\TranslateRepositoryUrlGitTask.cs (11)
29protected virtual string? TranslateSshUrl(Uri uri) 32protected virtual string? TranslateGitUrl(Uri uri) 35protected virtual string? TranslateHttpUrl(Uri uri) 56static bool isMatchingHostUri(Uri hostUri, Uri uri) 63if (Uri.TryCreate(url, UriKind.Absolute, out var uri) && 115private IEnumerable<Uri> GetHostUris() 121if (UriUtilities.TryParseAuthority(item.ItemSpec, out var hostUri)) 133if (IsSingleProvider && Uri.TryCreate(RepositoryUrl, UriKind.Absolute, out var repositoryUri))
src\sourcelink\src\Common\Utilities\UriUtilities.cs (8)
13public static bool TryParseAuthority(string value, [NotNullWhen(true)] out Uri? uri) 14=> Uri.TryCreate("unknown://" + value, UriKind.Absolute, out uri) && 17public static int GetExplicitPort(this Uri uri) 76public static string GetScheme(this Uri uri) 79public static string GetHost(this Uri uri) 82public static string GetAuthority(this Uri uri) 85public static string GetPath(this Uri uri) 88public static string GetPathAndQuery(this Uri uri)
Microsoft.SourceLink.GitWeb (46)
GetSourceLinkUrl.cs (4)
23protected override Uri GetDefaultContentUriFromHostUri(string authority, Uri gitUri) 26protected override string BuildSourceLinkUrl(Uri contentUri, Uri gitUri, string relativeUrl, string revisionId, ITaskItem? hostItem)
src\sourcelink\src\Common\GitProvider\GetSourceLinkUrlGitTask.cs (20)
54protected virtual Uri GetDefaultContentUriFromHostUri(string authority, Uri gitUri) 57protected virtual Uri GetDefaultContentUriFromRepositoryUri(Uri repositoryUri) 60protected abstract string? BuildSourceLinkUrl(Uri contentUrl, Uri gitUri, string relativeUrl, string revisionId, ITaskItem? hostItem); 100if (!Uri.TryCreate(gitUrl, UriKind.Absolute, out var gitUri)) 118if (!TryGetMatchingContentUri(mappings, gitUri, out var contentUri, out var hostItem)) 151public readonly Uri ContentUri; 154public UrlMapping(string host, ITaskItem? hostItem, int port, Uri contentUri, bool hasDefaultContentUri) 168private IEnumerable<UrlMapping> GetUrlMappings(Uri gitUri) 170static bool IsValidContentUri(Uri uri) 179if (!UriUtilities.TryParseAuthority(hostUrl, out var hostUri)) 185Uri? contentUri; 192else if (!Uri.TryCreate(contentUrl, UriKind.Absolute, out contentUri) || !IsValidContentUri(contentUri)) 205if (Uri.TryCreate(RepositoryUrl, UriKind.Absolute, out var uri)) 225private static bool TryGetMatchingContentUri(UrlMapping[] mappings, Uri repoUri, [NotNullWhen(true)] out Uri? contentUri, out ITaskItem? hostItem)
src\sourcelink\src\Common\GitProvider\TranslateRepositoryUrlGitTask.cs (11)
29protected virtual string? TranslateSshUrl(Uri uri) 32protected virtual string? TranslateGitUrl(Uri uri) 35protected virtual string? TranslateHttpUrl(Uri uri) 56static bool isMatchingHostUri(Uri hostUri, Uri uri) 63if (Uri.TryCreate(url, UriKind.Absolute, out var uri) && 115private IEnumerable<Uri> GetHostUris() 121if (UriUtilities.TryParseAuthority(item.ItemSpec, out var hostUri)) 133if (IsSingleProvider && Uri.TryCreate(RepositoryUrl, UriKind.Absolute, out var repositoryUri))
src\sourcelink\src\Common\Utilities\UriUtilities.cs (8)
13public static bool TryParseAuthority(string value, [NotNullWhen(true)] out Uri? uri) 14=> Uri.TryCreate("unknown://" + value, UriKind.Absolute, out uri) && 17public static int GetExplicitPort(this Uri uri) 76public static string GetScheme(this Uri uri) 79public static string GetHost(this Uri uri) 82public static string GetAuthority(this Uri uri) 85public static string GetPath(this Uri uri) 88public static string GetPathAndQuery(this Uri uri)
TranslateRepositoryUrls.cs (3)
25protected override string TranslateSshUrl(Uri uri) 28protected override string TranslateGitUrl(Uri uri) 31protected override string TranslateHttpUrl(Uri uri)
Microsoft.SourceLink.Tools.Package (1)
SourceLinkMap.cs (1)
214var escapedPath = string.Join("/", path.Substring(file.Path.Length).Split(new[] { '/', '\\' }).Select(Uri.EscapeDataString));
Microsoft.Svcutil.NamedPipeMetadataImporter (2)
NamedPipeMetadataImporter.cs (2)
22public XmlReader GetReader(Uri uri) 30public async Task<XmlReader> GetMetadatadataAsync(Uri uri)
Microsoft.TemplateEngine.Abstractions (1)
Mount\IMountPointFactory.cs (1)
18/// <param name="mountPointUri">Valid <see cref="Uri"/> that represents mount point.</param>
Microsoft.TemplateEngine.Cli (2)
NuGet\NugetApiManager.cs (2)
141public Uri? LicenseUrl { get; } 147public Uri? ProjectUrl { get; }
Microsoft.TemplateEngine.Edge (6)
Mount\Archive\ZipFileMountPoint.cs (2)
56parts[i] = Uri.UnescapeDataString(parts[i]); 75string unescaped = Uri.UnescapeDataString(entry.Name);
Mount\Archive\ZipFileMountPointFactory.cs (2)
19if (!Uri.TryCreate(mountPointUri, UriKind.Absolute, out var uri))
Mount\FileSystem\FileSystemMountPointFactory.cs (2)
17if (!Uri.TryCreate(mountPointUri, UriKind.Absolute, out var uri))
Microsoft.TemplateEngine.Utils (1)
EngineEnvironmentSettingsExtensions.cs (1)
12/// Tries to mount a <see cref="IMountPoint"/> from specified <see cref="Uri"/>.
Microsoft.TemplateSearch.Common (2)
Providers\NuGetMetadataSearchProvider.cs (2)
29private readonly Uri[] _searchMetadataUris = 166foreach (Uri searchMetadataUri in _searchMetadataUris)
Microsoft.TestPlatform.CommunicationUtilities (57)
_generated\104\TestPlatformJsonContext.GetJsonTypeInfo.g.cs (2)
298if (type == typeof(global::System.Collections.Generic.ICollection<global::System.Uri>)) 414if (type == typeof(global::System.Uri))
_generated\27\TestPlatformJsonContext.AttachmentSet.g.cs (6)
32ObjectWithParameterizedConstructorCreator = static args => new global::Microsoft.VisualStudio.TestPlatform.ObjectModel.AttachmentSet((global::System.Uri)args[0], (string)args[1]), 35ConstructorAttributeProviderFactory = static () => typeof(global::Microsoft.VisualStudio.TestPlatform.ObjectModel.AttachmentSet).GetConstructor(InstanceMemberBindingFlags, binder: null, new[] {typeof(global::System.Uri), typeof(string)}, modifiers: null), 53var info0 = new global::System.Text.Json.Serialization.Metadata.JsonPropertyInfoValues<global::System.Uri> 68AttributeProviderFactory = static () => typeof(global::Microsoft.VisualStudio.TestPlatform.ObjectModel.AttachmentSet).GetProperty("Uri", InstanceMemberBindingFlags, null, typeof(global::System.Uri), global::System.Array.Empty<global::System.Type>(), null), 71properties[0] = global::System.Text.Json.Serialization.Metadata.JsonMetadataServices.CreatePropertyInfo<global::System.Uri>(options, info0); 145ParameterType = typeof(global::System.Uri),
_generated\38\TestPlatformJsonContext.TestRunAttachmentsProcessingProgressEventArgs.g.cs (6)
32ObjectWithParameterizedConstructorCreator = static args => new global::Microsoft.VisualStudio.TestPlatform.ObjectModel.Client.TestRunAttachmentsProcessingProgressEventArgs((long)args[0], (global::System.Collections.Generic.ICollection<global::System.Uri>)args[1], (long)args[2], (long)args[3]), 35ConstructorAttributeProviderFactory = static () => typeof(global::Microsoft.VisualStudio.TestPlatform.ObjectModel.Client.TestRunAttachmentsProcessingProgressEventArgs).GetConstructor(InstanceMemberBindingFlags, binder: null, new[] {typeof(long), typeof(global::System.Collections.Generic.ICollection<global::System.Uri>), typeof(long), typeof(long)}, modifiers: null), 73var info1 = new global::System.Text.Json.Serialization.Metadata.JsonPropertyInfoValues<global::System.Collections.Generic.ICollection<global::System.Uri>> 88AttributeProviderFactory = static () => typeof(global::Microsoft.VisualStudio.TestPlatform.ObjectModel.Client.TestRunAttachmentsProcessingProgressEventArgs).GetProperty("CurrentAttachmentProcessorUris", InstanceMemberBindingFlags, null, typeof(global::System.Collections.Generic.ICollection<global::System.Uri>), global::System.Array.Empty<global::System.Type>(), null), 91properties[1] = global::System.Text.Json.Serialization.Metadata.JsonMetadataServices.CreatePropertyInfo<global::System.Collections.Generic.ICollection<global::System.Uri>>(options, info1); 173ParameterType = typeof(global::System.Collections.Generic.ICollection<global::System.Uri>),
_generated\46\TestPlatformJsonContext.InvokedDataCollector.g.cs (6)
32ObjectWithParameterizedConstructorCreator = static args => new global::Microsoft.VisualStudio.TestPlatform.ObjectModel.InvokedDataCollector((global::System.Uri)args[0], (string)args[1], (string)args[2], (string)args[3], (bool)args[4]), 35ConstructorAttributeProviderFactory = static () => typeof(global::Microsoft.VisualStudio.TestPlatform.ObjectModel.InvokedDataCollector).GetConstructor(InstanceMemberBindingFlags, binder: null, new[] {typeof(global::System.Uri), typeof(string), typeof(string), typeof(string), typeof(bool)}, modifiers: null), 53var info0 = new global::System.Text.Json.Serialization.Metadata.JsonPropertyInfoValues<global::System.Uri> 68AttributeProviderFactory = static () => typeof(global::Microsoft.VisualStudio.TestPlatform.ObjectModel.InvokedDataCollector).GetProperty("Uri", InstanceMemberBindingFlags, null, typeof(global::System.Uri), global::System.Array.Empty<global::System.Type>(), null), 71properties[0] = global::System.Text.Json.Serialization.Metadata.JsonMetadataServices.CreatePropertyInfo<global::System.Uri>(options, info0); 187ParameterType = typeof(global::System.Uri),
_generated\49\TestPlatformJsonContext.TestCase.g.cs (3)
137var info4 = new global::System.Text.Json.Serialization.Metadata.JsonPropertyInfoValues<global::System.Uri> 152AttributeProviderFactory = static () => typeof(global::Microsoft.VisualStudio.TestPlatform.ObjectModel.TestCase).GetProperty("ExecutorUri", InstanceMemberBindingFlags, null, typeof(global::System.Uri), global::System.Array.Empty<global::System.Type>(), null), 155properties[4] = global::System.Text.Json.Serialization.Metadata.JsonMetadataServices.CreatePropertyInfo<global::System.Uri>(options, info4);
_generated\61\TestPlatformJsonContext.UriDataAttachment.g.cs (6)
32ObjectWithParameterizedConstructorCreator = static args => new global::Microsoft.VisualStudio.TestPlatform.ObjectModel.UriDataAttachment((global::System.Uri)args[0], (string)args[1]), 35ConstructorAttributeProviderFactory = static () => typeof(global::Microsoft.VisualStudio.TestPlatform.ObjectModel.UriDataAttachment).GetConstructor(InstanceMemberBindingFlags, binder: null, new[] {typeof(global::System.Uri), typeof(string)}, modifiers: null), 73var info1 = new global::System.Text.Json.Serialization.Metadata.JsonPropertyInfoValues<global::System.Uri> 88AttributeProviderFactory = static () => typeof(global::Microsoft.VisualStudio.TestPlatform.ObjectModel.UriDataAttachment).GetProperty("Uri", InstanceMemberBindingFlags, null, typeof(global::System.Uri), global::System.Array.Empty<global::System.Type>(), null), 91properties[1] = global::System.Text.Json.Serialization.Metadata.JsonMetadataServices.CreatePropertyInfo<global::System.Uri>(options, info1); 121ParameterType = typeof(global::System.Uri),
_generated\69\TestPlatformJsonContext.ICollectionUri.g.cs (12)
13private global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::System.Collections.Generic.ICollection<global::System.Uri>>? _ICollectionUri; 19public global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::System.Collections.Generic.ICollection<global::System.Uri>> ICollectionUri 22get => _ICollectionUri ??= (global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::System.Collections.Generic.ICollection<global::System.Uri>>)Options.GetTypeInfo(typeof(global::System.Collections.Generic.ICollection<global::System.Uri>)); 25private global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::System.Collections.Generic.ICollection<global::System.Uri>> Create_ICollectionUri(global::System.Text.Json.JsonSerializerOptions options) 27if (!TryGetTypeInfoForRuntimeCustomConverter<global::System.Collections.Generic.ICollection<global::System.Uri>>(options, out global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::System.Collections.Generic.ICollection<global::System.Uri>> jsonTypeInfo)) 29var info = new global::System.Text.Json.Serialization.Metadata.JsonCollectionInfoValues<global::System.Collections.Generic.ICollection<global::System.Uri>> 37jsonTypeInfo = global::System.Text.Json.Serialization.Metadata.JsonMetadataServices.CreateICollectionInfo<global::System.Collections.Generic.ICollection<global::System.Uri>, global::System.Uri>(options, info); 47private void ICollectionUriSerializeHandler(global::System.Text.Json.Utf8JsonWriter writer, global::System.Collections.Generic.ICollection<global::System.Uri>? value) 57foreach (global::System.Uri element in value)
_generated\98\TestPlatformJsonContext.Uri.g.cs (8)
13private global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::System.Uri>? _Uri; 19public global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::System.Uri> Uri 22get => _Uri ??= (global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::System.Uri>)Options.GetTypeInfo(typeof(global::System.Uri)); 25private global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::System.Uri> Create_Uri(global::System.Text.Json.JsonSerializerOptions options) 27if (!TryGetTypeInfoForRuntimeCustomConverter<global::System.Uri>(options, out global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::System.Uri> jsonTypeInfo)) 29jsonTypeInfo = global::System.Text.Json.Serialization.Metadata.JsonMetadataServices.CreateValueInfo<global::System.Uri>(options, global::System.Text.Json.Serialization.Metadata.JsonMetadataServices.UriConverter);
Serialization\AttachmentConverters.cs (2)
25var uri = new Uri(element.GetProperty("Uri").GetString()!); 65var uri = new Uri(element.GetProperty("Uri").GetString()!);
Serialization\TestObjectBaseConverter.cs (1)
152case Uri u: writer.WriteStringValue(u.OriginalString); break;
SocketTransport.cs (2)
88return Uri.TryCreate(string.Concat("tcp://", endpointAddress), UriKind.Absolute, out Uri? uri)
TcpClientExtensions.cs (2)
123return Uri.TryCreate(string.Concat("tcp://", value), UriKind.Absolute, out Uri? uri)
TestPlatformJsonContext.cs (1)
91[JsonSerializable(typeof(Uri))]
Microsoft.TestPlatform.CrossPlatEngine (35)
AttachmentsProcessing\TestRunAttachmentsProcessingManager.cs (1)
142ICollection<Uri>? attachmentProcessorUris = dataCollectorAttachmentsProcessor.DataCollectorAttachmentProcessorInstance.GetExtensionUris()?.ToList();
Client\MTP\MtpProxyExecutionManager.cs (4)
474if (!TryCreateFileUri(path!, out Uri? fileUri)) 495private static bool TryCreateFileUri(string path, out Uri? uri) 499uri = Uri.TryCreate(path, UriKind.Absolute, out Uri? absolute) && absolute.IsFile
Client\TestLoggerManager.cs (6)
169TryGetUriFromFriendlyName(logger.FriendlyName, out var loggerUri) && 353internal bool InitializeLoggerByUri(Uri uri, Dictionary<string, string?>? parameters) 403internal bool TryGetUriFromFriendlyName(string? friendlyName, [NotNullWhen(true)] out Uri? loggerUri) 567&& Uri.TryCreate(extensionUri, UriKind.Absolute, out var loggerUri) 614private bool InitializeKnownLogger(ITestLogger logger, Uri uri, Dictionary<string, string?>? parameters)
Execution\BaseRunTests.cs (5)
286protected abstract IEnumerable<Tuple<Uri, string>>? GetExecutorUriExtensionMap( 292Tuple<Uri, string> executorUriExtensionTuple, 308Tuple<Uri, string> executorUriExtensionTuple, 360private bool RunTestInternalWithExecutors(IEnumerable<Tuple<Uri, string>> executorUriExtensionMap, long totalTests) 363var executorUriExtensionMapList = executorUriExtensionMap as IList<Tuple<Uri, string>> ?? executorUriExtensionMap.ToList();
Execution\MSTestV1TelemetryHelper.cs (2)
17internal static bool IsMsTestV1Adapter([NotNullWhen(true)] Uri? executorUri) 29var executorUri = testResult?.TestCase?.ExecutorUri;
Execution\RunTestsWithSources.cs (9)
31private Dictionary<Tuple<Uri, string>, IEnumerable<string>>? _executorUriVsSourceList; 51internal RunTestsWithSources(IRequestData requestData, Dictionary<string, IEnumerable<string>> adapterSourceMap, string? package, string? runSettings, TestExecutionContext testExecutionContext, ITestCaseEventsHandler? testCaseEventsHandler, IInternalTestRunEventsHandler testRunEventsHandler, Dictionary<Tuple<Uri, string>, IEnumerable<string>>? executorUriVsSourceList) 96protected override IEnumerable<Tuple<Uri, string>> GetExecutorUriExtensionMap(IFrameworkHandle testExecutorFrameworkHandle, RunContext runContext) 110Tuple<Uri, string> executorUriExtensionTuple, 120Tuple<Uri, string> executorUriExtensionTuple, 134private Dictionary<Tuple<Uri, string>, IEnumerable<string>> GetExecutorVsSourcesList(IMessageLogger logger) 136var result = new Dictionary<Tuple<Uri, string>, IEnumerable<string>>(); 172var executorUri = discoverer.Metadata.DefaultExecutorUri; 183var executorUriExtensionTuple = new Tuple<Uri, string>(executorUri, kvp.Key);
Execution\RunTestsWithTests.cs (8)
25private Dictionary<Tuple<Uri, string>, List<TestCase>>? _executorUriVsTestList; 43internal RunTestsWithTests(IRequestData requestData, IEnumerable<TestCase> testCases, string? package, string? runSettings, TestExecutionContext testExecutionContext, ITestCaseEventsHandler? testCaseEventsHandler, IInternalTestRunEventsHandler testRunEventsHandler, Dictionary<Tuple<Uri, string>, List<TestCase>>? executorUriVsTestList) 56protected override IEnumerable<Tuple<Uri, string>> GetExecutorUriExtensionMap(IFrameworkHandle testExecutorFrameworkHandle, RunContext runContext) 68Tuple<Uri, string> executorUri, 78Tuple<Uri, string> executorUri, 117private static Dictionary<Tuple<Uri, string>, List<TestCase>> GetExecutorVsTestCaseList(IEnumerable<TestCase> tests) 119var result = new Dictionary<Tuple<Uri, string>, List<TestCase>>(); 124var executorUriExtensionTuple = new Tuple<Uri, string>(
Microsoft.TestPlatform.Extensions.BlameDataCollector (2)
BlameTestObject.cs (2)
32public BlameTestObject(string fullyQualifiedName, Uri executorUri, string source) 70public Uri? ExecutorUri { get; set; }
Microsoft.TestPlatform.Utilities (2)
CodeCoverageDataAttachmentsHandler.cs (2)
34private static readonly Uri CodeCoverageDataCollectorUri = new(CoverageUri); 42public IEnumerable<Uri>? GetExtensionUris()
Microsoft.VisualStudio.TestPlatform.Common (17)
DataCollection\DataCollectionAttachmentManager.cs (6)
83AttachmentSets = new ConcurrentDictionary<DataCollectionContext, ConcurrentDictionary<Uri, AttachmentSet>>(); 94internal ConcurrentDictionary<DataCollectionContext, ConcurrentDictionary<Uri, AttachmentSet>> AttachmentSets 163public void AddAttachment(FileTransferInformation fileTransferInfo, AsyncCompletedEventHandler? sendFileCompletedCallback, Uri uri, string friendlyName) 173AttachmentSets.GetOrAdd(fileTransferInfo.Context, _ => new ConcurrentDictionary<Uri, AttachmentSet>()); 237private void AddNewFileTransfer(FileTransferInformation fileTransferInfo, AsyncCompletedEventHandler? sendFileCompletedCallback, Uri uri, string friendlyName) 340private void LogError(string errorMessage, Uri collectorUri, string collectorFriendlyName, Guid testCaseId)
DataCollection\DataCollectorConfig.cs (2)
41public Uri? TypeUri { get; private set; } 82private static Uri? GetTypeUri(Type dataCollectorType)
DataCollection\Interfaces\IDataCollectionAttachmentManager.cs (1)
58void AddAttachment(FileTransferInformation fileTransferInfo, AsyncCompletedEventHandler? sendFileCompletedCallback, Uri dataCollectorUri, string friendlyName);
ExtensionFramework\TestDiscoveryExtensionManager.cs (1)
191public Uri? DefaultExecutorUri
ExtensionFramework\TestExtensionManager.cs (5)
88public Dictionary<Uri, LazyExtension<TExtension, TMetadata>> TestExtensionByUri 99public LazyExtension<TExtension, TMetadata>? TryGetTestExtension(Uri extensionUri) 116foreach (var availableExtensionUri in TestExtensionByUri.Keys) 134TestExtensionByUri = new Dictionary<Uri, LazyExtension<TExtension, TMetadata>>(); 144Uri? uri = null;
Interfaces\ITestDiscovererCapabilities.cs (1)
24Uri? DefaultExecutorUri { get; }
RequestData.cs (1)
67internal Func<Uri, object?>? KnownExtensionInstanceFactory { get; set; }
Microsoft.VisualStudio.TestPlatform.Extensions.Trx.TestLogger (6)
ObjectModel\CollectorDataEntry.cs (2)
36private readonly Uri _uri; 59public CollectorDataEntry(Uri uri, string collectorDisplayName, string agentName, IList<IDataAttachment>? attachments)
ObjectModel\UriDataAttachment.cs (3)
32public UriDataAttachment(string description, Uri uri, TrxFileHelper trxFileHelper) 52public Uri Uri { get; private set; } 100var uriToUse = new Uri(TrxFileHelper.MakePathRelative(Uri.OriginalString, baseDirectory), UriKind.Relative);
Utility\Converter.cs (1)
475Uri sourceFileUri = new(fileName, UriKind.Relative);
Microsoft.VisualStudio.TestPlatform.ObjectModel (21)
AttachmentSet.cs (5)
22public Uri Uri { get; private set; } 37public AttachmentSet(Uri uri, string displayName) 66public Uri Uri { get; } 68public UriDataAttachment(Uri uri, string? description) 81var uri = new UriBuilder() { Scheme = "file", Host = "", Path = localFilePath }.Uri;
Client\Events\TestRunAttachmentsProcessingProgressEventArgs.cs (2)
20public TestRunAttachmentsProcessingProgressEventArgs(long currentAttachmentProcessorIndex, ICollection<Uri> currentAttachmentProcessorUris, long currentAttachmentProcessorProgress, long attachmentProcessorsCount) 38public ICollection<Uri> CurrentAttachmentProcessorUris { get; private set; }
DataCollector\DataCollectorSettings.cs (1)
20public Uri? Uri
DataCollector\IDataCollectorAttachmentProcessor.cs (1)
22IEnumerable<Uri>? GetExtensionUris();
DataCollector\IDataCollectorAttachments.cs (1)
24Uri GetExtensionUri();
InvokedDataCollector.cs (2)
19public InvokedDataCollector(Uri uri, string friendlyName, string assemblyQualifiedName, string filePath, bool hasAttachmentProcessor) 32public Uri Uri { get; private set; }
Logger\LoggerSettings.cs (1)
20public Uri? Uri
Logging\Events\DataCollectionMessageEventArgs.cs (1)
39public Uri? Uri
Nuget.Frameworks\NuGetFrameworkFactory.cs (1)
268folderName = Uri.UnescapeDataString(folderName);
TestCase.cs (4)
52public TestCase(string fullyQualifiedName, Uri executorUri, string source) 119public Uri ExecutorUri 257ExecutorUri = value as Uri ?? new Uri((value as string)!); 336public static readonly TestProperty ExecutorUri = TestProperty.Register("TestCase.ExecutorUri", ExecutorUriLabel, string.Empty, string.Empty, typeof(Uri), ValidateExecutorUri, TestPropertyAttributes.Hidden, typeof(TestCase));
TestProperty\TestProperty.cs (2)
52|| valueType == typeof(Uri) 198type = typeof(Uri);
Microsoft.Web.XmlTransform (1)
XmlTransformationLogger.cs (1)
226Uri uri = new Uri(fileName);
netstandard (1)
netstandard.cs (1)
2223[assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Uri))]
NuGet.Build.Tasks (1)
RestoreTaskEx.cs (1)
109options[nameof(BinaryLoggerParameters)] = Uri.EscapeDataString(BinaryLoggerParameters);
NuGet.Build.Tasks.Console (1)
MSBuildStaticGraphRestore.cs (1)
1252Parameters = Uri.UnescapeDataString(binaryLoggerParameters)
NuGet.Build.Tasks.Pack (4)
PackTaskLogic.cs (4)
162Uri tempUri; 163if (Uri.TryCreate(request.LicenseUrl, UriKind.Absolute, out tempUri)) 167if (Uri.TryCreate(request.ProjectUrl, UriKind.Absolute, out tempUri)) 171if (Uri.TryCreate(request.IconUrl, UriKind.Absolute, out tempUri))
NuGet.CommandLine.XPlat (34)
_generated\13\PackageSearchJsonContext.IPackageSearchMetadata.g.cs (18)
133var info4 = new global::System.Text.Json.Serialization.Metadata.JsonPropertyInfoValues<global::System.Uri> 148AttributeProviderFactory = static () => typeof(global::NuGet.Protocol.Core.Types.IPackageSearchMetadata).GetProperty("IconUrl", InstanceMemberBindingFlags, null, typeof(global::System.Uri), global::System.Array.Empty<global::System.Type>(), null), 151properties[4] = global::System.Text.Json.Serialization.Metadata.JsonMetadataServices.CreatePropertyInfo<global::System.Uri>(options, info4); 173var info6 = new global::System.Text.Json.Serialization.Metadata.JsonPropertyInfoValues<global::System.Uri> 188AttributeProviderFactory = static () => typeof(global::NuGet.Protocol.Core.Types.IPackageSearchMetadata).GetProperty("LicenseUrl", InstanceMemberBindingFlags, null, typeof(global::System.Uri), global::System.Array.Empty<global::System.Type>(), null), 191properties[6] = global::System.Text.Json.Serialization.Metadata.JsonMetadataServices.CreatePropertyInfo<global::System.Uri>(options, info6); 193var info7 = new global::System.Text.Json.Serialization.Metadata.JsonPropertyInfoValues<global::System.Uri> 208AttributeProviderFactory = static () => typeof(global::NuGet.Protocol.Core.Types.IPackageSearchMetadata).GetProperty("ProjectUrl", InstanceMemberBindingFlags, null, typeof(global::System.Uri), global::System.Array.Empty<global::System.Type>(), null), 211properties[7] = global::System.Text.Json.Serialization.Metadata.JsonMetadataServices.CreatePropertyInfo<global::System.Uri>(options, info7); 213var info8 = new global::System.Text.Json.Serialization.Metadata.JsonPropertyInfoValues<global::System.Uri> 228AttributeProviderFactory = static () => typeof(global::NuGet.Protocol.Core.Types.IPackageSearchMetadata).GetProperty("ReadmeUrl", InstanceMemberBindingFlags, null, typeof(global::System.Uri), global::System.Array.Empty<global::System.Type>(), null), 231properties[8] = global::System.Text.Json.Serialization.Metadata.JsonMetadataServices.CreatePropertyInfo<global::System.Uri>(options, info8); 253var info10 = new global::System.Text.Json.Serialization.Metadata.JsonPropertyInfoValues<global::System.Uri> 268AttributeProviderFactory = static () => typeof(global::NuGet.Protocol.Core.Types.IPackageSearchMetadata).GetProperty("ReportAbuseUrl", InstanceMemberBindingFlags, null, typeof(global::System.Uri), global::System.Array.Empty<global::System.Type>(), null), 271properties[10] = global::System.Text.Json.Serialization.Metadata.JsonMetadataServices.CreatePropertyInfo<global::System.Uri>(options, info10); 273var info11 = new global::System.Text.Json.Serialization.Metadata.JsonPropertyInfoValues<global::System.Uri> 288AttributeProviderFactory = static () => typeof(global::NuGet.Protocol.Core.Types.IPackageSearchMetadata).GetProperty("PackageDetailsUrl", InstanceMemberBindingFlags, null, typeof(global::System.Uri), global::System.Array.Empty<global::System.Type>(), null), 291properties[11] = global::System.Text.Json.Serialization.Metadata.JsonMetadataServices.CreatePropertyInfo<global::System.Uri>(options, info11);
_generated\14\PackageSearchJsonContext.PackageVulnerabilityMetadata.g.cs (4)
53var info0 = new global::System.Text.Json.Serialization.Metadata.JsonPropertyInfoValues<global::System.Uri> 68AttributeProviderFactory = static () => typeof(global::NuGet.Protocol.PackageVulnerabilityMetadata).GetProperty("AdvisoryUrl", InstanceMemberBindingFlags, null, typeof(global::System.Uri), global::System.Array.Empty<global::System.Type>(), null), 71properties[0] = global::System.Text.Json.Serialization.Metadata.JsonMetadataServices.CreatePropertyInfo<global::System.Uri>(options, info0); 98private static extern void __set_PackageVulnerabilityMetadata_AdvisoryUrl(global::NuGet.Protocol.PackageVulnerabilityMetadata obj, global::System.Uri value);
_generated\29\PackageSearchJsonContext.Uri.g.cs (8)
13private global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::System.Uri>? _Uri; 19public global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::System.Uri> Uri 22get => _Uri ??= (global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::System.Uri>)Options.GetTypeInfo(typeof(global::System.Uri)); 25private global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::System.Uri> Create_Uri(global::System.Text.Json.JsonSerializerOptions options) 27if (!TryGetTypeInfoForRuntimeCustomConverter<global::System.Uri>(options, out global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::System.Uri> jsonTypeInfo)) 29jsonTypeInfo = global::System.Text.Json.Serialization.Metadata.JsonMetadataServices.CreateValueInfo<global::System.Uri>(options, global::System.Text.Json.Serialization.Metadata.JsonMetadataServices.UriConverter);
_generated\36\PackageSearchJsonContext.GetJsonTypeInfo.g.cs (1)
138if (type == typeof(global::System.Uri))
_generated\8\PackageSearchJsonContext.LicenseMetadata.g.cs (3)
155var info5 = new global::System.Text.Json.Serialization.Metadata.JsonPropertyInfoValues<global::System.Uri> 170AttributeProviderFactory = static () => typeof(global::NuGet.Packaging.LicenseMetadata).GetProperty("LicenseUrl", InstanceMemberBindingFlags, null, typeof(global::System.Uri), global::System.Array.Empty<global::System.Type>(), null), 173properties[5] = global::System.Text.Json.Serialization.Metadata.JsonMetadataServices.CreatePropertyInfo<global::System.Uri>(options, info5);
NuGet.Commands (8)
CommandRunners\PushRunner.cs (1)
97var sourceUri = packageUpdateResource.SourceUri;
TrustedSignersCommand\TrustedSignerActionsProvider.cs (1)
220public async Task AddTrustedRepositoryAsync(string name, Uri serviceIndex, IEnumerable<string> owners, CancellationToken token)
TrustedSignersCommand\TrustedSignersCommandRunner.cs (5)
127var serviceIndex = ValidateAndParseV3ServiceIndexUrl(trustedSignersArgs.ServiceIndex); 172var sourceServiceIndex = ValidateAndParseV3ServiceIndexUrl(packageSource.Source); 354private Uri ValidateAndParseV3ServiceIndexUrl(string serviceIndex) 356var validUri = Uri.TryCreate(serviceIndex, UriKind.Absolute, out var serviceIndexUri);
Utility\PackageSourceProviderExtensions.cs (1)
49Uri result = UriUtility.TryCreateSourceUri(source, UriKind.Absolute);
NuGet.Common (20)
AuthTypeFilteredCredentials.cs (1)
40public NetworkCredential? GetCredential(Uri uri, string authType)
PathUtil\PathUtility.cs (4)
292Uri resultUri = new Uri(new Uri(basePath), new Uri(relativePath, UriKind.Relative)); 324public static string GetPath(Uri uri) 334return Uri.UnescapeDataString(path.Replace('/', Path.DirectorySeparatorChar)); 435Uri.UnescapeDataString(z.FullName),
PathUtil\PathValidator.cs (2)
84/// Validates that url is properly formatted as an URL based on .NET <see cref="System.Uri">Uri</see> class. 92return Regex.IsMatch(url, @"^\w+://", RegexOptions.IgnoreCase | RegexOptions.CultureInvariant) && Uri.TryCreate(url, UriKind.Absolute, out _);
UriUtility.cs (13)
13private static bool IsHttpUrl(Uri uri) 15return uri.Scheme == Uri.UriSchemeHttp || uri.Scheme == Uri.UriSchemeHttps; 21public static Uri CreateSourceUri(string source, UriKind kind = UriKind.Absolute) 30public static Uri? TryCreateSourceUri(string source, UriKind kind) 34Uri? uri; 35return Uri.TryCreate(source, kind, out uri) ? uri : null; 59return Uri.EscapeDataString(value).Replace("'", "''").Replace("%27", "''"); 78Uri? uri; 79if (Uri.TryCreate(localOrUriPath, UriKind.RelativeOrAbsolute, out uri)) 122var relativeUri = TryCreateSourceUri(local, UriKind.Relative); 137var absoluteUri = TryCreateSourceUri(local, UriKind.Absolute); 160var uri = TryCreateSourceUri(source!, UriKind.Absolute);
NuGet.Configuration (25)
Credential\ICredentialCache.cs (2)
11void Add(Uri uri, ICredentials credentials); 12ICredentials GetCredentials(Uri uri);
Credential\ICredentialService.cs (2)
30Uri uri, 50Uri uri,
PackageSource\PackageSource.cs (3)
65Uri? uri = TrySourceAsUri; 74public Uri? TrySourceAsUri => UriUtility.TryCreateSourceUri(Source, UriKind.Absolute); 79public Uri SourceUri => UriUtility.CreateSourceUri(Source, UriKind.Absolute);
Proxy\IProxyCache.cs (1)
11IWebProxy? GetProxy(Uri uri);
Proxy\IProxyCredentialCache.cs (1)
24void UpdateCredential(Uri proxyAddress, NetworkCredential credentials);
Proxy\ProxyCache.cs (7)
23private readonly ConcurrentDictionary<Uri, ICredentials> _cachedCredentials = new ConcurrentDictionary<Uri, ICredentials>(); 61public IWebProxy? GetProxy(Uri sourceUri) 124Uri? uri; 126&& Uri.TryCreate(host, UriKind.Absolute, out uri)) 152public void UpdateCredential(Uri proxyAddress, NetworkCredential credentials) 165public NetworkCredential? GetCredential(Uri proxyAddress, string authType)
Proxy\WebProxy.cs (6)
33public WebProxy(Uri proxyAddress) 44public Uri ProxyAddress { get; private set; } 62public Uri GetProxy(Uri destination) => ProxyAddress; 64public bool IsBypassed(Uri uri) 95private static Uri CreateProxyUri(string address)
Settings\Settings.cs (2)
723if (Uri.TryCreate(path, UriKind.Relative, out var _) &&
Utility\SettingsUtility.cs (1)
417var sourceUri = UriUtility.TryCreateSourceUri(source!, UriKind.RelativeOrAbsolute);
NuGet.Credentials (16)
CredentialService.cs (11)
76Uri uri, 161Uri uri, 173var rootUri = GetRootUri(uri); 195private bool TryFromCredentialCache(Uri uri, CredentialRequestType type, bool isRetry, ICredentialProvider provider, 211private void AddToCredentialCache(Uri uri, CredentialRequestType type, ICredentialProvider provider, 217private static string RetryCacheKey(Uri uri, CredentialRequestType type, ICredentialProvider provider) 222private static string CredentialCacheKey(Uri uri, CredentialRequestType type, ICredentialProvider provider) 224var rootUri = GetRootUri(uri); 228private static Uri GetRootUri(Uri uri) 233private static string GetUriKey(Uri uri, CredentialRequestType type, ICredentialProvider provider)
DefaultNetworkCredentialsCredentialProvider.cs (1)
42Uri uri,
ICredentialProvider.cs (1)
36Uri uri,
PluginCredentialProvider.cs (1)
92Uri uri,
SecurePluginCredentialProvider.cs (2)
85public async Task<CredentialResponse> GetAsync(Uri uri, IWebProxy proxy, CredentialRequestType type, string message, bool isRetry, bool nonInteractive, CancellationToken cancellationToken) 178private async Task SetProxyCredentialsToPlugin(Uri uri, IWebProxy proxy, PluginCreationResult plugin, CancellationToken cancellationToken)
NuGet.Frameworks (1)
NuGetFrameworkFactory.cs (1)
265folderName = Uri.UnescapeDataString(folderName);
NuGet.PackageManagement (13)
Utility\PackagesConfigLockFileUtility.cs (2)
57var projectUri = new Uri(msbuildProject.MSBuildProjectPath); 58var lockFileUri = new Uri(lockFileName);
Utility\PackagesFolderPathUtility.cs (1)
51return Uri.UnescapeDataString(path.Replace(Path.AltDirectorySeparatorChar, Path.DirectorySeparatorChar));
Utility\UriHelper.cs (10)
24public static void OpenExternalLink(Uri url) 60Uri uri; 61if (Uri.TryCreate(source, UriKind.Absolute, out uri)) 119private static bool IsHttpUrl(Uri uri) 121return (uri.Scheme == Uri.UriSchemeHttp || uri.Scheme == Uri.UriSchemeHttps); 126Uri currentURI; 127if (Uri.TryCreate(currentSource, UriKind.RelativeOrAbsolute, out currentURI)) 142Uri currentURI; 143if (Uri.TryCreate(currentSource, UriKind.RelativeOrAbsolute, out currentURI))
NuGet.Packaging (50)
PackageArchiveReader.cs (1)
308var normalizedPath = Uri.UnescapeDataString(packageFileName.Replace('/', Path.DirectorySeparatorChar));
PackageCreation\Authoring\IPackageMetadata.cs (3)
19Uri? IconUrl { get; } 20Uri? LicenseUrl { get; } 21Uri? ProjectUrl { get; }
PackageCreation\Authoring\LicenseMetadata.cs (2)
20public static readonly Uri LicenseFileDeprecationUrl = new Uri("https://aka.ms/deprecateLicenseUrl"); 94public Uri LicenseUrl
PackageCreation\Authoring\ManifestMetadata.cs (3)
112public Uri? IconUrl 132public Uri? LicenseUrl 150public Uri? ProjectUrl
PackageCreation\Authoring\PackageBuilder.cs (7)
29private static readonly Uri DefaultUri = new Uri("http://defaultcontainer/"); 247public Uri? IconUrl { get; set; } 251public Uri? LicenseUrl { get; set; } 253public Uri? ProjectUrl { get; set; } 1127.Select(Uri.EscapeDataString); 1138var partUri = new Uri(DefaultUri, escapedPath); 1141Uri safeUnescapedUri = new Uri(partUri.GetComponents(UriComponents.Path, UriFormat.SafeUnescaped), UriKind.Relative);
PackageExtraction\ZipArchiveExtensions.cs (1)
45return Uri.UnescapeDataString(path);
PackageReaderBase.cs (1)
583var normalizedPath = Uri.UnescapeDataString(p.Replace('/', Path.DirectorySeparatorChar));
Rules\DefaultManifestValuesRule.cs (9)
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"); 38Uri.TryCreate(nuspecReader.GetProjectUrl(), UriKind.RelativeOrAbsolute, out var projectUrl); 44Uri.TryCreate(nuspecReader.GetLicenseUrl(), UriKind.RelativeOrAbsolute, out var licenseUrl); 50Uri.TryCreate(nuspecReader.GetIconUrl(), UriKind.RelativeOrAbsolute, out var iconUrl);
Signing\Authoring\RepositorySignPackageRequest.cs (2)
17public Uri V3ServiceIndexUrl { get; } 53Uri v3ServiceIndexUrl,
Signing\Signatures\IRepositorySignature.cs (1)
11Uri V3ServiceIndexUrl { get; }
Signing\Signatures\NuGetV3ServiceIndexUrl.cs (4)
16public Uri V3ServiceIndexUrl { get; } 18public NuGetV3ServiceIndexUrl(Uri v3ServiceIndexUrl) 54Uri? url; 56if (!Uri.TryCreate(urlString, UriKind.Absolute, out url))
Signing\Signatures\RepositoryCountersignature.cs (3)
18public Uri V3ServiceIndexUrl { get; } 26Uri v3ServiceIndexUrl, 62var v3ServiceIndexUrl = AttributeUtility.GetNuGetV3ServiceIndexUrl(countersignature.SignedAttributes);
Signing\Signatures\RepositoryPrimarySignature.cs (1)
16public Uri V3ServiceIndexUrl { get; }
Signing\Timestamp\IRfc3161TimestampRequest.cs (1)
11Task<IRfc3161TimestampToken> SubmitRequestAsync(Uri timestampUri, TimeSpan timeout);
Signing\Timestamp\Rfc3161TimestampProvider.cs (6)
24private readonly Uri _timestamperUrl; 27public Rfc3161TimestampProvider(Uri timeStampServerUrl) 30if (!string.Equals(timeStampServerUrl.Scheme, Uri.UriSchemeHttp, StringComparison.Ordinal) && 31!string.Equals(timeStampServerUrl.Scheme, Uri.UriSchemeHttps, StringComparison.Ordinal)) 37nameof(Uri.UriSchemeHttp), 38nameof(Uri.UriSchemeHttps)));
Signing\Timestamp\Rfc3161TimestampRequestNetstandard21Wrapper.cs (3)
37public async Task<IRfc3161TimestampToken> SubmitRequestAsync(Uri timestampUri, TimeSpan timeout) 50if (timestampUri.Scheme != Uri.UriSchemeHttp && timestampUri.Scheme != Uri.UriSchemeHttps)
Signing\Utility\AttributeUtility.cs (2)
78public static CryptographicAttributeObject CreateNuGetV3ServiceIndexUrl(Uri v3ServiceIndexUrl) 112public static Uri GetNuGetV3ServiceIndexUrl(CryptographicAttributeObjectCollection signedAttributes)
NuGet.Protocol (353)
_generated\107\JsonContext.PackageVulnerabilityInfo.g.cs (6)
32ObjectWithParameterizedConstructorCreator = static args => new global::NuGet.Protocol.Model.PackageVulnerabilityInfo((global::System.Uri)args[0], (global::NuGet.Protocol.PackageVulnerabilitySeverity)args[1], (global::NuGet.Versioning.VersionRange)args[2]), 35ConstructorAttributeProviderFactory = static () => typeof(global::NuGet.Protocol.Model.PackageVulnerabilityInfo).GetConstructor(InstanceMemberBindingFlags, binder: null, new[] {typeof(global::System.Uri), typeof(global::NuGet.Protocol.PackageVulnerabilitySeverity), typeof(global::NuGet.Versioning.VersionRange)}, modifiers: null), 53var info0 = new global::System.Text.Json.Serialization.Metadata.JsonPropertyInfoValues<global::System.Uri> 68AttributeProviderFactory = static () => typeof(global::NuGet.Protocol.Model.PackageVulnerabilityInfo).GetProperty("Url", InstanceMemberBindingFlags, null, typeof(global::System.Uri), global::System.Array.Empty<global::System.Type>(), null), 71properties[0] = global::System.Text.Json.Serialization.Metadata.JsonMetadataServices.CreatePropertyInfo<global::System.Uri>(options, info0); 123ParameterType = typeof(global::System.Uri),
_generated\109\JsonContext.RegistrationLeafItem.g.cs (3)
73var info1 = new global::System.Text.Json.Serialization.Metadata.JsonPropertyInfoValues<global::System.Uri> 88AttributeProviderFactory = static () => typeof(global::NuGet.Protocol.Model.RegistrationLeafItem).GetProperty("PackageContent", InstanceMemberBindingFlags, null, typeof(global::System.Uri), global::System.Array.Empty<global::System.Type>(), null), 91properties[1] = global::System.Text.Json.Serialization.Metadata.JsonMetadataServices.CreatePropertyInfo<global::System.Uri>(options, info1);
_generated\113\JsonContext.V3VulnerabilityIndexEntry.g.cs (6)
32ObjectWithParameterizedConstructorCreator = static args => new global::NuGet.Protocol.Model.V3VulnerabilityIndexEntry((string)args[0], (global::System.Uri)args[1], (string)args[2], (string)args[3]), 35ConstructorAttributeProviderFactory = static () => typeof(global::NuGet.Protocol.Model.V3VulnerabilityIndexEntry).GetConstructor(InstanceMemberBindingFlags, binder: null, new[] {typeof(string), typeof(global::System.Uri), typeof(string), typeof(string)}, modifiers: null), 74var info1 = new global::System.Text.Json.Serialization.Metadata.JsonPropertyInfoValues<global::System.Uri> 89AttributeProviderFactory = static () => typeof(global::NuGet.Protocol.Model.V3VulnerabilityIndexEntry).GetProperty("Url", InstanceMemberBindingFlags, null, typeof(global::System.Uri), global::System.Array.Empty<global::System.Type>(), null), 92properties[1] = global::System.Text.Json.Serialization.Metadata.JsonMetadataServices.CreatePropertyInfo<global::System.Uri>(options, info1); 154ParameterType = typeof(global::System.Uri),
_generated\115\JsonContext.PackageSearchMetadataRegistration.g.cs (27)
53var info0 = new global::System.Text.Json.Serialization.Metadata.JsonPropertyInfoValues<global::System.Uri> 68AttributeProviderFactory = static () => typeof(global::NuGet.Protocol.PackageSearchMetadataRegistration).GetProperty("CatalogUri", InstanceMemberBindingFlags, null, typeof(global::System.Uri), global::System.Array.Empty<global::System.Type>(), null), 71properties[0] = global::System.Text.Json.Serialization.Metadata.JsonMetadataServices.CreatePropertyInfo<global::System.Uri>(options, info0); 173var info6 = new global::System.Text.Json.Serialization.Metadata.JsonPropertyInfoValues<global::System.Uri> 188AttributeProviderFactory = static () => typeof(global::NuGet.Protocol.PackageSearchMetadata).GetProperty("IconUrl", InstanceMemberBindingFlags, null, typeof(global::System.Uri), global::System.Array.Empty<global::System.Type>(), null), 191properties[6] = global::System.Text.Json.Serialization.Metadata.JsonMetadataServices.CreatePropertyInfo<global::System.Uri>(options, info6); 213var info8 = new global::System.Text.Json.Serialization.Metadata.JsonPropertyInfoValues<global::System.Uri> 219Converter = (global::System.Text.Json.Serialization.JsonConverter<global::System.Uri>)ExpandConverter(typeof(global::System.Uri), new global::NuGet.Protocol.Converters.SafeUriStjConverter(), options), 228AttributeProviderFactory = static () => typeof(global::NuGet.Protocol.PackageSearchMetadata).GetProperty("LicenseUrl", InstanceMemberBindingFlags, null, typeof(global::System.Uri), global::System.Array.Empty<global::System.Type>(), null), 231properties[8] = global::System.Text.Json.Serialization.Metadata.JsonMetadataServices.CreatePropertyInfo<global::System.Uri>(options, info8); 293var info12 = new global::System.Text.Json.Serialization.Metadata.JsonPropertyInfoValues<global::System.Uri> 299Converter = (global::System.Text.Json.Serialization.JsonConverter<global::System.Uri>)ExpandConverter(typeof(global::System.Uri), new global::NuGet.Protocol.Converters.SafeUriStjConverter(), options), 308AttributeProviderFactory = static () => typeof(global::NuGet.Protocol.PackageSearchMetadata).GetProperty("ProjectUrl", InstanceMemberBindingFlags, null, typeof(global::System.Uri), global::System.Array.Empty<global::System.Type>(), null), 311properties[12] = global::System.Text.Json.Serialization.Metadata.JsonMetadataServices.CreatePropertyInfo<global::System.Uri>(options, info12); 333var info14 = new global::System.Text.Json.Serialization.Metadata.JsonPropertyInfoValues<global::System.Uri> 339Converter = (global::System.Text.Json.Serialization.JsonConverter<global::System.Uri>)ExpandConverter(typeof(global::System.Uri), new global::NuGet.Protocol.Converters.SafeUriStjConverter(), options), 348AttributeProviderFactory = static () => typeof(global::NuGet.Protocol.PackageSearchMetadata).GetProperty("ReadmeUrl", InstanceMemberBindingFlags, null, typeof(global::System.Uri), global::System.Array.Empty<global::System.Type>(), null), 351properties[14] = global::System.Text.Json.Serialization.Metadata.JsonMetadataServices.CreatePropertyInfo<global::System.Uri>(options, info14); 373var info16 = new global::System.Text.Json.Serialization.Metadata.JsonPropertyInfoValues<global::System.Uri> 388AttributeProviderFactory = static () => typeof(global::NuGet.Protocol.PackageSearchMetadata).GetProperty("ReportAbuseUrl", InstanceMemberBindingFlags, null, typeof(global::System.Uri), global::System.Array.Empty<global::System.Type>(), null), 391properties[16] = global::System.Text.Json.Serialization.Metadata.JsonMetadataServices.CreatePropertyInfo<global::System.Uri>(options, info16); 393var info17 = new global::System.Text.Json.Serialization.Metadata.JsonPropertyInfoValues<global::System.Uri> 408AttributeProviderFactory = static () => typeof(global::NuGet.Protocol.PackageSearchMetadata).GetProperty("PackageDetailsUrl", InstanceMemberBindingFlags, null, typeof(global::System.Uri), global::System.Array.Empty<global::System.Type>(), null), 411properties[17] = global::System.Text.Json.Serialization.Metadata.JsonMetadataServices.CreatePropertyInfo<global::System.Uri>(options, info17);
_generated\116\JsonContext.PackageVulnerabilityMetadata.g.cs (3)
53var info0 = new global::System.Text.Json.Serialization.Metadata.JsonPropertyInfoValues<global::System.Uri> 68AttributeProviderFactory = static () => typeof(global::NuGet.Protocol.PackageVulnerabilityMetadata).GetProperty("AdvisoryUrl", InstanceMemberBindingFlags, null, typeof(global::System.Uri), global::System.Array.Empty<global::System.Type>(), null), 71properties[0] = global::System.Text.Json.Serialization.Metadata.JsonMetadataServices.CreatePropertyInfo<global::System.Uri>(options, info0);
_generated\12\PackageSearchJsonContext.PackageSearchMetadata.g.cs (24)
153var info5 = new global::System.Text.Json.Serialization.Metadata.JsonPropertyInfoValues<global::System.Uri> 168AttributeProviderFactory = static () => typeof(global::NuGet.Protocol.PackageSearchMetadata).GetProperty("IconUrl", InstanceMemberBindingFlags, null, typeof(global::System.Uri), global::System.Array.Empty<global::System.Type>(), null), 171properties[5] = global::System.Text.Json.Serialization.Metadata.JsonMetadataServices.CreatePropertyInfo<global::System.Uri>(options, info5); 193var info7 = new global::System.Text.Json.Serialization.Metadata.JsonPropertyInfoValues<global::System.Uri> 199Converter = (global::System.Text.Json.Serialization.JsonConverter<global::System.Uri>)ExpandConverter(typeof(global::System.Uri), new global::NuGet.Protocol.Converters.SafeUriStjConverter(), options), 208AttributeProviderFactory = static () => typeof(global::NuGet.Protocol.PackageSearchMetadata).GetProperty("LicenseUrl", InstanceMemberBindingFlags, null, typeof(global::System.Uri), global::System.Array.Empty<global::System.Type>(), null), 211properties[7] = global::System.Text.Json.Serialization.Metadata.JsonMetadataServices.CreatePropertyInfo<global::System.Uri>(options, info7); 273var info11 = new global::System.Text.Json.Serialization.Metadata.JsonPropertyInfoValues<global::System.Uri> 279Converter = (global::System.Text.Json.Serialization.JsonConverter<global::System.Uri>)ExpandConverter(typeof(global::System.Uri), new global::NuGet.Protocol.Converters.SafeUriStjConverter(), options), 288AttributeProviderFactory = static () => typeof(global::NuGet.Protocol.PackageSearchMetadata).GetProperty("ProjectUrl", InstanceMemberBindingFlags, null, typeof(global::System.Uri), global::System.Array.Empty<global::System.Type>(), null), 291properties[11] = global::System.Text.Json.Serialization.Metadata.JsonMetadataServices.CreatePropertyInfo<global::System.Uri>(options, info11); 313var info13 = new global::System.Text.Json.Serialization.Metadata.JsonPropertyInfoValues<global::System.Uri> 319Converter = (global::System.Text.Json.Serialization.JsonConverter<global::System.Uri>)ExpandConverter(typeof(global::System.Uri), new global::NuGet.Protocol.Converters.SafeUriStjConverter(), options), 328AttributeProviderFactory = static () => typeof(global::NuGet.Protocol.PackageSearchMetadata).GetProperty("ReadmeUrl", InstanceMemberBindingFlags, null, typeof(global::System.Uri), global::System.Array.Empty<global::System.Type>(), null), 331properties[13] = global::System.Text.Json.Serialization.Metadata.JsonMetadataServices.CreatePropertyInfo<global::System.Uri>(options, info13); 353var info15 = new global::System.Text.Json.Serialization.Metadata.JsonPropertyInfoValues<global::System.Uri> 368AttributeProviderFactory = static () => typeof(global::NuGet.Protocol.PackageSearchMetadata).GetProperty("ReportAbuseUrl", InstanceMemberBindingFlags, null, typeof(global::System.Uri), global::System.Array.Empty<global::System.Type>(), null), 371properties[15] = global::System.Text.Json.Serialization.Metadata.JsonMetadataServices.CreatePropertyInfo<global::System.Uri>(options, info15); 373var info16 = new global::System.Text.Json.Serialization.Metadata.JsonPropertyInfoValues<global::System.Uri> 388AttributeProviderFactory = static () => typeof(global::NuGet.Protocol.PackageSearchMetadata).GetProperty("PackageDetailsUrl", InstanceMemberBindingFlags, null, typeof(global::System.Uri), global::System.Array.Empty<global::System.Type>(), null), 391properties[16] = global::System.Text.Json.Serialization.Metadata.JsonMetadataServices.CreatePropertyInfo<global::System.Uri>(options, info16);
_generated\13\PackageSearchJsonContext.PackageSearchMetadataRegistration.g.cs (27)
53var info0 = new global::System.Text.Json.Serialization.Metadata.JsonPropertyInfoValues<global::System.Uri> 68AttributeProviderFactory = static () => typeof(global::NuGet.Protocol.PackageSearchMetadataRegistration).GetProperty("CatalogUri", InstanceMemberBindingFlags, null, typeof(global::System.Uri), global::System.Array.Empty<global::System.Type>(), null), 71properties[0] = global::System.Text.Json.Serialization.Metadata.JsonMetadataServices.CreatePropertyInfo<global::System.Uri>(options, info0); 173var info6 = new global::System.Text.Json.Serialization.Metadata.JsonPropertyInfoValues<global::System.Uri> 188AttributeProviderFactory = static () => typeof(global::NuGet.Protocol.PackageSearchMetadata).GetProperty("IconUrl", InstanceMemberBindingFlags, null, typeof(global::System.Uri), global::System.Array.Empty<global::System.Type>(), null), 191properties[6] = global::System.Text.Json.Serialization.Metadata.JsonMetadataServices.CreatePropertyInfo<global::System.Uri>(options, info6); 213var info8 = new global::System.Text.Json.Serialization.Metadata.JsonPropertyInfoValues<global::System.Uri> 219Converter = (global::System.Text.Json.Serialization.JsonConverter<global::System.Uri>)ExpandConverter(typeof(global::System.Uri), new global::NuGet.Protocol.Converters.SafeUriStjConverter(), options), 228AttributeProviderFactory = static () => typeof(global::NuGet.Protocol.PackageSearchMetadata).GetProperty("LicenseUrl", InstanceMemberBindingFlags, null, typeof(global::System.Uri), global::System.Array.Empty<global::System.Type>(), null), 231properties[8] = global::System.Text.Json.Serialization.Metadata.JsonMetadataServices.CreatePropertyInfo<global::System.Uri>(options, info8); 293var info12 = new global::System.Text.Json.Serialization.Metadata.JsonPropertyInfoValues<global::System.Uri> 299Converter = (global::System.Text.Json.Serialization.JsonConverter<global::System.Uri>)ExpandConverter(typeof(global::System.Uri), new global::NuGet.Protocol.Converters.SafeUriStjConverter(), options), 308AttributeProviderFactory = static () => typeof(global::NuGet.Protocol.PackageSearchMetadata).GetProperty("ProjectUrl", InstanceMemberBindingFlags, null, typeof(global::System.Uri), global::System.Array.Empty<global::System.Type>(), null), 311properties[12] = global::System.Text.Json.Serialization.Metadata.JsonMetadataServices.CreatePropertyInfo<global::System.Uri>(options, info12); 333var info14 = new global::System.Text.Json.Serialization.Metadata.JsonPropertyInfoValues<global::System.Uri> 339Converter = (global::System.Text.Json.Serialization.JsonConverter<global::System.Uri>)ExpandConverter(typeof(global::System.Uri), new global::NuGet.Protocol.Converters.SafeUriStjConverter(), options), 348AttributeProviderFactory = static () => typeof(global::NuGet.Protocol.PackageSearchMetadata).GetProperty("ReadmeUrl", InstanceMemberBindingFlags, null, typeof(global::System.Uri), global::System.Array.Empty<global::System.Type>(), null), 351properties[14] = global::System.Text.Json.Serialization.Metadata.JsonMetadataServices.CreatePropertyInfo<global::System.Uri>(options, info14); 373var info16 = new global::System.Text.Json.Serialization.Metadata.JsonPropertyInfoValues<global::System.Uri> 388AttributeProviderFactory = static () => typeof(global::NuGet.Protocol.PackageSearchMetadata).GetProperty("ReportAbuseUrl", InstanceMemberBindingFlags, null, typeof(global::System.Uri), global::System.Array.Empty<global::System.Type>(), null), 391properties[16] = global::System.Text.Json.Serialization.Metadata.JsonMetadataServices.CreatePropertyInfo<global::System.Uri>(options, info16); 393var info17 = new global::System.Text.Json.Serialization.Metadata.JsonPropertyInfoValues<global::System.Uri> 408AttributeProviderFactory = static () => typeof(global::NuGet.Protocol.PackageSearchMetadata).GetProperty("PackageDetailsUrl", InstanceMemberBindingFlags, null, typeof(global::System.Uri), global::System.Array.Empty<global::System.Type>(), null), 411properties[17] = global::System.Text.Json.Serialization.Metadata.JsonMetadataServices.CreatePropertyInfo<global::System.Uri>(options, info17);
_generated\135\JsonContext.Uri.g.cs (8)
13private global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::System.Uri>? _Uri; 19public global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::System.Uri> Uri 22get => _Uri ??= (global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::System.Uri>)Options.GetTypeInfo(typeof(global::System.Uri)); 25private global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::System.Uri> Create_Uri(global::System.Text.Json.JsonSerializerOptions options) 27if (!TryGetTypeInfoForRuntimeCustomConverter<global::System.Uri>(options, out global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::System.Uri> jsonTypeInfo)) 29jsonTypeInfo = global::System.Text.Json.Serialization.Metadata.JsonMetadataServices.CreateValueInfo<global::System.Uri>(options, global::System.Text.Json.Serialization.Metadata.JsonMetadataServices.UriConverter);
_generated\14\PackageSearchJsonContext.PackageVulnerabilityMetadata.g.cs (3)
53var info0 = new global::System.Text.Json.Serialization.Metadata.JsonPropertyInfoValues<global::System.Uri> 68AttributeProviderFactory = static () => typeof(global::NuGet.Protocol.PackageVulnerabilityMetadata).GetProperty("AdvisoryUrl", InstanceMemberBindingFlags, null, typeof(global::System.Uri), global::System.Array.Empty<global::System.Type>(), null), 71properties[0] = global::System.Text.Json.Serialization.Metadata.JsonMetadataServices.CreatePropertyInfo<global::System.Uri>(options, info0);
_generated\143\JsonContext.GetJsonTypeInfo.g.cs (1)
174if (type == typeof(global::System.Uri))
_generated\29\PackageSearchJsonContext.Uri.g.cs (8)
13private global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::System.Uri>? _Uri; 19public global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::System.Uri> Uri 22get => _Uri ??= (global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::System.Uri>)Options.GetTypeInfo(typeof(global::System.Uri)); 25private global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::System.Uri> Create_Uri(global::System.Text.Json.JsonSerializerOptions options) 27if (!TryGetTypeInfoForRuntimeCustomConverter<global::System.Uri>(options, out global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::System.Uri> jsonTypeInfo)) 29jsonTypeInfo = global::System.Text.Json.Serialization.Metadata.JsonMetadataServices.CreateValueInfo<global::System.Uri>(options, global::System.Text.Json.Serialization.Metadata.JsonMetadataServices.UriConverter);
_generated\36\PackageSearchJsonContext.GetJsonTypeInfo.g.cs (1)
138if (type == typeof(global::System.Uri))
_generated\52\PluginJsonContext.GetAuthenticationCredentialsRequest.g.cs (7)
32ObjectWithParameterizedConstructorCreator = static args => new global::NuGet.Protocol.Plugins.GetAuthenticationCredentialsRequest((global::System.Uri)args[0], (bool)args[1], (bool)args[2], (bool)args[3]), 35ConstructorAttributeProviderFactory = static () => typeof(global::NuGet.Protocol.Plugins.GetAuthenticationCredentialsRequest).GetConstructor(InstanceMemberBindingFlags, binder: null, new[] {typeof(global::System.Uri), typeof(bool), typeof(bool), typeof(bool)}, modifiers: null), 53var info0 = new global::System.Text.Json.Serialization.Metadata.JsonPropertyInfoValues<global::System.Uri> 68AttributeProviderFactory = static () => typeof(global::NuGet.Protocol.Plugins.GetAuthenticationCredentialsRequest).GetProperty("Uri", InstanceMemberBindingFlags, null, typeof(global::System.Uri), global::System.Array.Empty<global::System.Type>(), null), 71properties[0] = global::System.Text.Json.Serialization.Metadata.JsonMetadataServices.CreatePropertyInfo<global::System.Uri>(options, info0); 149global::System.Uri __value_Uri = ((global::NuGet.Protocol.Plugins.GetAuthenticationCredentialsRequest)value).Uri; 167ParameterType = typeof(global::System.Uri),
_generated\8\PackageSearchJsonContext.RegistrationLeafItem.g.cs (3)
73var info1 = new global::System.Text.Json.Serialization.Metadata.JsonPropertyInfoValues<global::System.Uri> 88AttributeProviderFactory = static () => typeof(global::NuGet.Protocol.Model.RegistrationLeafItem).GetProperty("PackageContent", InstanceMemberBindingFlags, null, typeof(global::System.Uri), global::System.Array.Empty<global::System.Type>(), null), 91properties[1] = global::System.Text.Json.Serialization.Metadata.JsonMetadataServices.CreatePropertyInfo<global::System.Uri>(options, info1);
_generated\91\PluginJsonContext.Uri.g.cs (8)
13private global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::System.Uri>? _Uri; 19public global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::System.Uri> Uri 22get => _Uri ??= (global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::System.Uri>)Options.GetTypeInfo(typeof(global::System.Uri)); 25private global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::System.Uri> Create_Uri(global::System.Text.Json.JsonSerializerOptions options) 27if (!TryGetTypeInfoForRuntimeCustomConverter<global::System.Uri>(options, out global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::System.Uri> jsonTypeInfo)) 29jsonTypeInfo = global::System.Text.Json.Serialization.Metadata.JsonMetadataServices.CreateValueInfo<global::System.Uri>(options, global::System.Text.Json.Serialization.Metadata.JsonMetadataServices.UriConverter);
_generated\95\PluginJsonContext.GetJsonTypeInfo.g.cs (1)
214if (type == typeof(global::System.Uri))
Converters\PackageVulnerabilityInfoConverter.cs (2)
15Uri? uri = null; 28uri = serializer.Deserialize<Uri>(reader);
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");
Converters\SafeUriConverter.cs (2)
22if (Uri.TryCreate(reader.Value?.ToString()?.Trim(), UriKind.Absolute, out Uri? uri))
Converters\SafeUriStjConverter.cs (5)
15internal sealed class SafeUriStjConverter : JsonConverter<Uri> 17public override Uri? Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) 21Uri.TryCreate(reader.GetString()?.Trim(), UriKind.Absolute, out Uri? uri); 29public override void Write(Utf8JsonWriter writer, Uri value, JsonSerializerOptions options)
DependencyInfo\PackageInfo.cs (1)
19public required Uri PackageContent { get; init; }
DependencyInfo\RegistrationUtility.cs (2)
37Uri registrationUri, 118Uri registrationUri,
DependencyInfo\ResolverMetadataClient.cs (5)
30Uri registrationUri, 56Uri registrationUri, 93Uri registrationUri, 143private static RemoteSourceDependencyInfo ProcessPackageVersion(RegistrationLeafItem leaf, NuGetVersion version, Uri registrationUri) 221Uri registrationUri,
Events\ProtocolDiagnosticHttpEvent.cs (1)
18Uri url,
Events\ProtocolDiagnosticHttpEventBase.cs (2)
11public Uri Url { get; } 31Uri url,
Events\ProtocolDiagnosticInProgressHttpEvent.cs (1)
12Uri url,
HttpSource\HttpCacheUtility.cs (1)
19Uri sourceUri,
HttpSource\HttpHandlerResourceV3.cs (1)
46public static Action<Uri, ICredentials>? CredentialsSuccessfullyUsed { get; set; }
HttpSource\HttpHandlerResourceV3Provider.cs (1)
59var sourceUri = packageSource.SourceUri;
HttpSource\HttpRequestMessageFactory.cs (2)
41public static HttpRequestMessage Create(HttpMethod method, Uri requestUri, ILogger log) 88Uri requestUri,
HttpSource\HttpRetryHandler.cs (1)
113var requestUri = requestMessage.RequestUri!;
HttpSource\HttpSource.cs (1)
22private readonly Uri _sourceUri;
HttpSource\HttpSourceAuthenticationHandler.cs (1)
310private void CredentialsSuccessfullyUsed(Uri uri, ICredentials credentials)
HttpSource\HttpSourceCredentials.cs (1)
73NetworkCredential? ICredentials.GetCredential(Uri uri, string authType)
HttpSource\HttpSourceRequest.cs (1)
22public HttpSourceRequest(Uri uri, ILogger log)
HttpSource\ProxyAuthenticationHandler.cs (4)
73var requestUri = request.RequestUri ?? throw new ArgumentException(message: "request.RequestUri must not be null"); 148private async Task<bool> AcquireCredentialsAsync(Uri requestUri, Guid cacheVersion, IWebProxy proxy, ICredentialService credentialService, ILogger log, CancellationToken cancellationToken) 171var proxyAddress = proxy.GetProxy(requestUri); 199private static async Task<NetworkCredential?> PromptForProxyCredentialsAsync(Uri proxyAddress, IWebProxy proxy, ICredentialService credentialService, ILogger log, CancellationToken cancellationToken)
HttpSource\TokenStore.cs (9)
11private readonly ConcurrentDictionary<Uri, string> _tokenCache = new ConcurrentDictionary<Uri, string>(); 17public string? GetToken(Uri sourceUri) 30var rootUri = GetRootUri(sourceUri); 39public void AddToken(Uri sourceUri, string token) 53var rootUri = GetRootUri(sourceUri); 57private void StoreToken(Uri uri, string token) 65private static Uri GetRootUri(Uri uri)
LegacyFeed\AutoCompleteResourceV2Feed.cs (2)
24private readonly Uri _baseUri; 86Uri apiEndpointUri,
LegacyFeed\V2FeedParser.cs (1)
268Uri downloadUri,
LocalRepositories\FindLocalPackagesResource.cs (1)
28public abstract LocalPackageInfo? GetPackage(Uri path, ILogger logger, CancellationToken token);
LocalRepositories\FindLocalPackagesResourcePackagesConfig.cs (1)
30public override LocalPackageInfo? GetPackage(Uri path, ILogger logger, CancellationToken token)
LocalRepositories\FindLocalPackagesResourceUnzipped.cs (6)
23private readonly Lazy<Dictionary<Uri, LocalPackageInfo>> _pathIndex; 30_pathIndex = new Lazy<Dictionary<Uri, LocalPackageInfo>>(() => GetPathIndex(_packages)); 38public override LocalPackageInfo? GetPackage(Uri path, ILogger logger, CancellationToken token) 81private static Dictionary<Uri, LocalPackageInfo> GetPathIndex(Lazy<IReadOnlyList<LocalPackageInfo>> packages) 83var index = new Dictionary<Uri, LocalPackageInfo>(); 87var path = UriUtility.CreateSourceUri(package.Path, UriKind.Absolute);
LocalRepositories\FindLocalPackagesResourceV2.cs (1)
29public override LocalPackageInfo? GetPackage(Uri path, ILogger logger, CancellationToken token)
LocalRepositories\FindLocalPackagesResourceV3.cs (1)
29public override LocalPackageInfo? GetPackage(Uri path, ILogger logger, CancellationToken token)
LocalRepositories\LocalPackageSearchResource.cs (1)
186Uri? currentURI = UriUtility.TryCreateSourceUri(currentSource, UriKind.Absolute);
Model\IPackageSearchMetadata.cs (6)
24Uri IconUrl { get; } 26Uri LicenseUrl { get; } 27Uri ProjectUrl { get; } 28Uri ReadmeUrl { get; } 30Uri ReportAbuseUrl { get; } 31Uri PackageDetailsUrl { get; }
Model\LocalPackageSearchMetadata.cs (12)
39public Uri? IconUrl => GetIconUri(); 45public Uri? LicenseUrl => Convert(_nuspec.GetLicenseUrl()); 64public Uri? ProjectUrl => Convert(_nuspec.GetProjectUrl()); 71public Uri? ReadmeUrl => null; 76public Uri? ReportAbuseUrl => null; 78public Uri? PackageDetailsUrl => null; 115private static Uri? Convert(string? uri) 117Uri? fullUri = null; 121Uri.TryCreate(uri, UriKind.Absolute, out fullUri); 192private Uri? GetIconUri() 201var baseUri = Convert(_package.Path)!; 220var baseUri = Convert(_package.Path)!;
Model\PackageSearchMetadata.cs (6)
61public Uri IconUrl { get; internal set; } 84public Uri LicenseUrl { get; internal set; } 130public Uri ProjectUrl { get; internal set; } 142public Uri ReadmeUrl { get; internal set; } 150public Uri ReportAbuseUrl { get; set; } 154public Uri PackageDetailsUrl { get; set; }
Model\PackageSearchMetadataBuilder.cs (6)
37public Uri IconUrl { get; set; } 39public Uri LicenseUrl { get; set; } 42public Uri ProjectUrl { get; set; } 44public Uri ReadmeUrl { get; set; } 46public Uri ReportAbuseUrl { get; set; } 47public Uri PackageDetailsUrl { get; set; }
Model\PackageSearchMetadataRegistration.cs (2)
18/// The <see cref="Uri"/> of this package in the catalog. 23public Uri CatalogUri { get; internal set; }
Model\PackageSearchMetadataV2Feed.cs (9)
82public Uri? IconUrl { get; private set; } 86public Uri? LicenseUrl { get; private set; } 95public Uri? ProjectUrl { get; private set; } 106public Uri? ReadmeUrl { get; } = null; // The ReadmeUrl has not been added to the V2 feed. 110public Uri? ReportAbuseUrl { get; private set; } 112public Uri? PackageDetailsUrl { get; private set; } 142private static Uri? GetUriSafe(string? url) 144Uri.TryCreate(url, UriKind.Absolute, out Uri? uri);
Model\PackageVulnerabilityInfo.cs (2)
16public Uri Url { get; } 32public PackageVulnerabilityInfo(Uri url, PackageVulnerabilitySeverity severity, VersionRange versions)
Model\PackageVulnerabilityMetadata.cs (2)
19public Uri AdvisoryUrl { get; internal set; } = null!; 27public PackageVulnerabilityMetadata(Uri advisoryUrl, int severity)
Model\RegistrationLeafItem.cs (1)
21public Uri? PackageContent { get; set; }
Model\ServiceIndexEntry.cs (2)
17public Uri Uri { get; } 29public ServiceIndexEntry(Uri serviceUri, string serviceType, SemanticVersion clientVersion)
Model\V3VulnerabilityIndexEntry.cs (2)
20public Uri Url { get; } 30public V3VulnerabilityIndexEntry(string name, Uri url, string updated, string? comment)
Plugins\Messages\GetAuthenticationCredentialsRequest.cs (2)
18public Uri Uri { get; } 46public GetAuthenticationCredentialsRequest(Uri uri, bool isRetry, bool isNonInteractive, bool canShowDialog)
Plugins\RequestHandlers\GetCredentialsRequestHandler.cs (3)
249var sourceUri = packageSource.SourceUri; 266var sourceUri = packageSource.SourceUri; 267var proxyUri = _proxy.GetProxy(sourceUri);
Providers\OwnerDetailsUriResourceV3Provider.cs (1)
30Uri? uriTemplate = serviceIndex.GetServiceEntryUri(ServiceTypes.OwnerDetailsUriTemplate);
Providers\PackageDetailsUriResourceV3Provider.cs (1)
28var uri = serviceIndex.GetServiceEntryUri(ServiceTypes.PackageDetailsUriTemplate);
Providers\PackageUpdateResourceV3Provider.cs (1)
33var baseUrl = serviceIndex.GetServiceEntryUri(ServiceTypes.PackagePublish);
Providers\RegistrationResourceV3Provider.cs (1)
30var baseUrl = serviceIndex.GetServiceEntryUri(ServiceTypes.RegistrationsBaseUrl);
Providers\RepositorySignatureResourceProvider.cs (1)
54var repositorySignaturesResourceUri = serviceEntry.Uri;
Providers\SymbolPackageUpdateResourceV3Provider.cs (1)
30var baseUrl = serviceIndex.GetServiceEntryUri(ServiceTypes.SymbolPackagePublish);
Providers\V3FeedListResourceProvider.cs (1)
32var baseUrl = serviceIndex.GetServiceEntryUri(ServiceTypes.LegacyGallery);
Providers\VulnerabilityInfoResourceV3Provider.cs (1)
26Uri? baseUri = serviceIndexResource?.GetServiceEntryUri(ServiceTypes.VulnerabilityInfo);
RemoteRepositories\HttpFileSystemBasedFindPackageByIdResource.cs (3)
43private readonly IReadOnlyList<Uri> _baseUris; 60IReadOnlyList<Uri> baseUris, 64IReadOnlyList<Uri> baseUris,
Resources\AutoCompleteResourceV3.cs (4)
69var queryUri = BuildQueryUri(packageIdPrefix, includePrerelease); 98var queryUri = BuildQueryUri(packageIdPrefix, includePrerelease); 129private Uri BuildQueryUri(string packageIdPrefix, bool includePrerelease) 131var searchUrl = _serviceIndex.GetServiceEntryUri(ServiceTypes.SearchAutocompleteService);
Resources\DependencyInfoResourceV3.cs (3)
79var uri = _regResource.GetUri(package.Id); 117var uri = _regResource.GetUri(packageId); 152var uri = _regResource.GetUri(packageId);
Resources\DownloadResourceV3.cs (5)
83private async Task<Uri> GetDownloadUrl(PackageIdentity identity, ILogger log, CancellationToken token) 87Uri downloadUri = null; 126private async Task<Uri> GetDownloadUrlFromItemAsync(PackageIdentity identity, SourceCacheContext sourceCacheContext, ILogger log, CancellationToken token) 134private async Task<Uri> GetDownloadUrlFromJObjectAsync(PackageIdentity identity, SourceCacheContext sourceCacheContext, ILogger log, CancellationToken token) 173var uri = await GetDownloadUrl(identity, logger, token);
Resources\OwnerDetailsUriTemplateResourceV3.cs (2)
27public static OwnerDetailsUriTemplateResourceV3? CreateOrNull(Uri uriTemplate) 49public Uri GetUri(string owner)
Resources\PackageDetailsUriResourceV3.cs (3)
34Uri uri; 35var isValidUri = Uri.TryCreate(uriTemplate, UriKind.Absolute, out uri); 52public Uri GetUri(string id, NuGetVersion version)
Resources\PackageMetadataResourceV3.cs (2)
115var registrationUri = _regResource.GetUri(packageId); 226Uri registrationUri,
Resources\PackageSearchResourceV3.cs (7)
24private readonly IReadOnlyList<Uri> _searchEndpoints; 25private readonly IReadOnlyList<Uri>? _packageTypeCapableEndpoints; 30IReadOnlyList<Uri> searchEndpoints, 31IReadOnlyList<Uri>? packageTypeCapableEndpoints = null, 96Func<Uri, Task<T>> getResultAsync, 116IReadOnlyList<Uri> endpoints = packageTypeFilterRequested 122var endpoint = endpoints[i];
Resources\PackageUpdateResource.cs (19)
52public Uri SourceUri 230Uri symbolSourceUri = UriUtility.CreateSourceUri(symbolSource); 286Uri packageSourceUri = UriUtility.CreateSourceUri(source); 321Uri symbolSourceUri = UriUtility.CreateSourceUri(symbolSource); 363var sourceUri = UriUtility.CreateSourceUri(source); 434Uri serviceEndpointUrl = GetServiceEndpointUrl(source, string.Empty, noServiceEndpoint); 438if (logErrorForHttpSources && serviceEndpointUrl.Scheme == Uri.UriSchemeHttp && !allowInsecureConnections) 642Uri serviceEndpointUrl, 677private async Task PushPackageToFileSystem(Uri sourceUri, 734var sourceUri = GetServiceEndpointUrl(source, string.Empty, noServiceEndpoint); 741if (sourceUri.Scheme == Uri.UriSchemeHttp && !allowInsecureConnections) 760var serviceEndpointUrl = GetServiceEndpointUrl(source, url, noServiceEndpoint); 797var sourceuri = UriUtility.CreateSourceUri(source); 848private Uri GetServiceEndpointUrl(string source, string path, bool noServiceEndpoint) 850var baseUri = EnsureTrailingSlash(source); 851Uri requestUri; 865private static Uri EnsureTrailingSlash(string value) 920var serviceEndpointUrl = GetServiceEndpointUrl(NuGetConstants.DefaultGalleryServerUrl, 964var sourceUri = UriUtility.CreateSourceUri(source);
Resources\PluginResource.cs (2)
106var sourceUri = _packageSource.SourceUri; 143private bool TryGetCachedCredentials(Uri uri, bool isProxy, out ICredentials credentials)
Resources\RawSearchResourceV3.cs (3)
21private readonly Uri[] _searchEndpoints; 23public RawSearchResourceV3(HttpSource client, IEnumerable<Uri> searchEndpoints) 45var endpoint = _searchEndpoints[i];
Resources\RegistrationResourceV3.cs (8)
28public RegistrationResourceV3(HttpSource client, Uri baseUrl) 45/// Gets the <see cref="Uri"/> for the source backing this resource. 47public Uri BaseUri { get; } 52public virtual Uri GetUri(string packageId) 68public virtual Uri GetUri(string id, NuGetVersion version) 86public virtual Uri GetUri(PackageIdentity package) 134var registrationUri = GetUri(packageId); 194Uri registrationUri = GetUri(packageId);
Resources\ReportAbuseResourceV3.cs (3)
35public Uri GetReportAbuseUrl(string id, NuGetVersion version) 53Uri uri; 54var isValidUri = Uri.TryCreate(uriTemplate, UriKind.Absolute, out uri);
Resources\RepositorySignatureResource.cs (4)
43if (!Uri.TryCreate(repositoryCertificateInfo.ContentUrl, UriKind.Absolute, out Uri? repositoryContentUrl) 66if (!Uri.TryCreate(cert.ContentUrl, UriKind.Absolute, out Uri? contentUrl)
Resources\ServiceIndexResourceV3.cs (9)
140public virtual Uri? GetServiceEntryUri(params string[] orderedTypes) 150public virtual IReadOnlyList<Uri> GetServiceEntryUris(params string[] orderedTypes) 160public virtual IReadOnlyList<Uri> GetServiceEntryUris(NuGetVersion clientVersion, params string[] orderedTypes) 182if (string.IsNullOrEmpty(id) || !Uri.TryCreate(id, UriKind.Absolute, out Uri? uri)) 187if (packageSource != null && uri.Scheme == Uri.UriSchemeHttp && packageSource.IsHttps) 246Uri? uri; 247if (string.IsNullOrEmpty(id) || !Uri.TryCreate(id, UriKind.Absolute, out uri)) 254if (packageSource != null && uri.Scheme == Uri.UriSchemeHttp && packageSource.IsHttps)
Resources\SymbolPackageUpdateResourceV3.cs (1)
27public Uri SourceUri
Resources\VulnerabilityInfoResourceV3.cs (2)
38Uri vulnerabilityIndexUrl = await GetIndexUrlAsync(cancellationToken); 72async Task<Uri> GetIndexUrlAsync(CancellationToken cancellationToken)
SourcePackageDependencyInfo.cs (3)
35Uri? downloadUri, 52Uri? downloadUri, 77public Uri? DownloadUri { get; }
Utility\GetDownloadResultUtility.cs (1)
26Uri uri,
Utility\LocalFolderUtility.cs (3)
30public static LocalPackageInfo? GetPackage(Uri path, ILogger log) 813var uriResult = new Uri(root, UriKind.RelativeOrAbsolute); 838private static FileInfo GetAndVerifyFileInfo(Uri fileUri)
Utility\OfflineFeedUtility.cs (1)
79var pathUri = UriUtility.TryCreateSourceUri(path, UriKind.RelativeOrAbsolute);
Pipelines.AppHost (1)
AppHost.cs (1)
283var fileShareUri = new Uri($"https://{storageAccountName}.file.core.windows.net/{fileShareName}");
QuarantineTools.Tests (4)
QuarantineScriptTests.cs (4)
407if (!Uri.TryCreate(url, UriKind.Absolute, out var uri)) 411return uri.Scheme == Uri.UriSchemeHttp || uri.Scheme == Uri.UriSchemeHttps;
Roslyn.Diagnostics.Analyzers (5)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\DiagnosticDescriptorExtensions.cs (5)
255internal static Uri? GetValidHelpLinkUri(this DiagnosticDescriptor descriptor) 256=> Uri.TryCreate(descriptor.HelpLinkUri, UriKind.Absolute, out var uri) && 257(uri.Scheme == Uri.UriSchemeHttp || uri.Scheme == Uri.UriSchemeHttps) ? uri : null;
Security.TransportSecurity.IntegrationTests (4)
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);
Shared.Tests (4)
ImageDataUri\ImageDataUri.cs (2)
16internal static Uri GetImageDataUri() 25internal static Uri GetPdfDataUri()
JsonSchemaExporter\TestTypes.cs (2)
99yield return new TestData<Uri>(new("http://example.com"), """{"type":["string","null"], "format":"uri"}"""); 1243[JsonSerializable(typeof(Uri))]
System (1)
src\runtime\src\libraries\shims\System\ref\System.cs (1)
923[assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Uri))]
System.CommandLine.StaticCompletions (2)
shells\ZshShellProvider.cs (2)
341else if (sym is Option<Uri> || sym is Argument<Uri>)
System.ComponentModel.Annotations (4)
System\ComponentModel\DataAnnotations\UrlAttribute.cs (4)
22case Uri valueAsUri when valueAsUri.IsAbsoluteUri: 24return valueAsUri.Scheme == Uri.UriSchemeHttp 25|| valueAsUri.Scheme == Uri.UriSchemeHttps 26|| valueAsUri.Scheme == Uri.UriSchemeFtp;
System.ComponentModel.TypeConverter (14)
System\ComponentModel\Design\DesigntimeLicenseContext.cs (1)
54Uri uri = new Uri(fileName);
System\ComponentModel\ReflectTypeDescriptionProvider.cs (4)
139/// <see cref="Uri"/> and <see cref="CultureInfo"/> are the only types that can be inherited for which 178[typeof(Uri)] = new IntrinsicTypeConverterData((type) => new UriTypeConverter()), 1585Debug.Assert(callingType != typeof(Uri) && callingType != typeof(CultureInfo)); 1592if (baseType == typeof(Uri) || baseType == typeof(CultureInfo))
System\ComponentModel\UriTypeConverter.cs (9)
25return sourceType == typeof(string) || sourceType == typeof(Uri) || base.CanConvertFrom(context, sourceType); 34return destinationType == typeof(Uri) || destinationType == typeof(InstanceDescriptor) || base.CanConvertTo(context, destinationType); 53if (value is Uri uri) 69if (value is Uri uri) 73ConstructorInfo? ctor = typeof(Uri).GetConstructor(BindingFlags.Public | BindingFlags.Instance, null, new Type[] { typeof(string), typeof(UriKind) }, null); 83if (destinationType == typeof(Uri)) 96return Uri.TryCreate(text, UriKind.RelativeOrAbsolute, out _); 98return value is Uri; 101private static UriKind GetUriKind(Uri uri) => uri.IsAbsoluteUri ? UriKind.Absolute : UriKind.Relative;
System.Configuration.ConfigurationManager (5)
src\runtime\src\libraries\Common\src\System\Security\IdentityHelper.cs (1)
21internal static string GetNormalizedUriHash(Uri uri)
System\Configuration\ClientConfigPaths.cs (4)
90if (Uri.IsWellFormedUriString(externalConfigPath, UriKind.Absolute)) 92Uri externalConfigUri = new Uri(externalConfigPath, UriKind.Absolute); 263else if (Uri.TryCreate(Path.Combine(AppDomain.CurrentDomain.BaseDirectory, assembly.ManifestModule.Name), UriKind.Absolute, out Uri codeBase))
System.Data.Common (5)
System\Data\Common\DataStorage.cs (1)
93typeof(Uri),
System\Data\Common\ObjectStorage.cs (1)
335if (type == typeof(Uri))
System\Data\TypeLimiter.cs (1)
171typeof(Uri),
System\Data\xmlsaver.cs (1)
267if (type == typeof(Uri))
System\Data\XMLSchema.cs (1)
1812new NameType("anyURI", typeof(System.Uri) ), /* XSD Apr */
System.Diagnostics.EventLog (1)
System\Diagnostics\Reader\ProviderMetadata.cs (1)
116public Uri? HelpLink
System.Diagnostics.Process (2)
System\Diagnostics\ProcessUtils.Unix.cs (2)
161else if (Uri.TryCreate(filename, UriKind.Absolute, out Uri? uri))
System.DirectoryServices.AccountManagement (2)
System\DirectoryServices\AccountManagement\AD\ADStoreCtx.cs (2)
2425if (Uri.TryCreate(ctxBase.Path, UriKind.Absolute, out Uri ldapUri))
System.DirectoryServices.Protocols (37)
System\DirectoryServices\Protocols\common\DirectoryAttribute.cs (7)
32public DirectoryAttribute(string name, Uri value) : this(name, (object)value) 145if (!(value is string) && !(value is byte[]) && !(value is Uri)) 158public int Add(Uri value) => Add((object)value); 164if (!(value is string) && !(value is byte[]) && !(value is Uri)) 176if (!(values is string[]) && !(values is byte[][]) && !(values is Uri[])) 202public void Insert(int index, Uri value) => Insert(index, (object)value); 217if (!(value is string) && !(value is byte[]) && !(value is Uri))
System\DirectoryServices\Protocols\common\DirectoryRequest.cs (1)
122public CompareRequest(string distinguishedName, string attributeName, Uri value)
System\DirectoryServices\Protocols\common\DirectoryResponse.cs (13)
9internal Uri[] _directoryReferral; 11internal DirectoryResponse(string dn, DirectoryControl[] controls, ResultCode result, string message, Uri[] referral) 47public virtual Uri[] Referral 53return Array.Empty<Uri>(); 56Uri[] tempReferral = new Uri[_directoryReferral.Length]; 68internal DeleteResponse(string dn, DirectoryControl[] controls, ResultCode result, string message, Uri[] referral) : base(dn, controls, result, message, referral) { } 73internal AddResponse(string dn, DirectoryControl[] controls, ResultCode result, string message, Uri[] referral) : base(dn, controls, result, message, referral) { } 78internal ModifyResponse(string dn, DirectoryControl[] controls, ResultCode result, string message, Uri[] referral) : base(dn, controls, result, message, referral) { } 83internal ModifyDNResponse(string dn, DirectoryControl[] controls, ResultCode result, string message, Uri[] referral) : base(dn, controls, result, message, referral) { } 88internal CompareResponse(string dn, DirectoryControl[] controls, ResultCode result, string message, Uri[] referral) : base(dn, controls, result, message, referral) { } 95internal ExtendedResponse(string dn, DirectoryControl[] controls, ResultCode result, string message, Uri[] referral) : base(dn, controls, result, message, referral) { } 124internal SearchResponse(string dn, DirectoryControl[] controls, ResultCode result, string message, Uri[] referral) : base(dn, controls, result, message, referral) { }
System\DirectoryServices\Protocols\common\SearchResults.cs (6)
10private readonly Uri[] _resultReferences; 12internal SearchResultReference(Uri[] uris) => _resultReferences = uris; 14public Uri[] Reference 20return Array.Empty<Uri>(); 23Uri[] tempUri = new Uri[_resultReferences.Length];
System\DirectoryServices\Protocols\ldap\LdapConnection.cs (8)
595else if (assertion[0] is Uri uri) 1301else if (modAttribute[j] is Uri) 1303byteArray = encoder.GetBytes(((Uri)modAttribute[j]).ToString()); 1414Uri[] responseReferral = null; 1601internal unsafe int ConstructParsedResult(IntPtr ldapResult, ref int serverError, ref string responseDn, ref string responseMessage, ref Uri[] responseReferral, ref DirectoryControl[] responseControl) 1638responseReferral = new Uri[referralList.Count]; 1841Uri[] uris = new Uri[referralList.Count];
System\DirectoryServices\Protocols\ldap\LdapSessionOptions.cs (2)
563Uri[] responseReferral = null; 634responseReferral = new Uri[referralList.Count];
System.IO.IsolatedStorage (2)
src\runtime\src\libraries\Common\src\System\Security\IdentityHelper.cs (1)
21internal static string GetNormalizedUriHash(Uri uri)
System\IO\IsolatedStorage\Helper.cs (1)
132Uri locationUri = new Uri(location);
System.IO.Packaging (122)
System\IO\Packaging\FileFormatException.cs (6)
55public FileFormatException(Uri? sourceUri) 73public FileFormatException(Uri? sourceUri, string? message) 89public FileFormatException(Uri? sourceUri, Exception? innerException) 110public FileFormatException(Uri? sourceUri, string? message, Exception? innerException) 151public Uri? SourceUri 159private readonly Uri? _sourceUri;
System\IO\Packaging\InternalRelationshipCollection.cs (9)
82internal PackageRelationship Add(Uri targetUri, TargetMode targetMode, string relationshipType, string? id) 203private static Uri GetRelationshipPartUri(PackagePart? part) 205Uri sourceUri; 342Uri targetUri = new Uri(targetAttributeValue, DotNetRelativeOrAbsolute); 386private PackageRelationship Add(Uri targetUri, TargetMode targetMode, string relationshipType, string? id, bool parsing) 410Uri resolvedUri = GetResolvedTargetUri(targetUri, targetMode); 546private Uri GetResolvedTargetUri(Uri target, TargetMode targetMode) 621private readonly Uri _uri; // the URI of our relationship part
System\IO\Packaging\Package.cs (13)
187public PackagePart CreatePart(Uri partUri, string contentType) 210public PackagePart CreatePart(Uri partUri, 259public PackagePart GetPart(Uri partUri) 282public virtual bool PartExists(Uri partUri) 307public void DeletePart(Uri partUri) 353Uri owningPartUri = PackUriHelper.GetSourcePartUriFromRelationshipPartUri(validatedPartUri); 355if (Uri.Compare(owningPartUri, PackUriHelper.PackageRootUri, UriComponents.SerializationInfoString, UriFormat.UriEscaped, StringComparison.Ordinal) == 0) 578public PackageRelationship CreateRelationship(Uri targetUri, TargetMode targetMode, string relationshipType) 602public PackageRelationship CreateRelationship(Uri targetUri, TargetMode targetMode, string relationshipType, string? id) 729protected abstract PackagePart CreatePartCore(Uri partUri, 741protected abstract PackagePart? GetPartCore(Uri partUri); 750protected abstract void DeletePartCore(Uri partUri); 1134private PackagePart? GetPartHelper(Uri partUri)
System\IO\Packaging\PackagePart.cs (6)
39protected PackagePart(Package package, Uri partUri) 67protected PackagePart(Package package, Uri partUri, string? contentType) 97Uri partUri, 134public Uri Uri 376public PackageRelationship CreateRelationship(Uri targetUri, TargetMode targetMode, string relationshipType) 402public PackageRelationship CreateRelationship(Uri targetUri, TargetMode targetMode, string relationshipType, string? id)
System\IO\Packaging\PackageRelationship.cs (6)
28public Uri SourceUri 43public Uri TargetUri 113internal PackageRelationship(Package package, PackagePart? sourcePart, Uri targetUri, TargetMode targetMode, string relationshipType, string id) 160internal static Uri ContainerRelationshipPartName 174private readonly Uri _targetUri; 179private static readonly Uri s_containerRelationshipPartName = PackUriHelper.CreatePartUri(new Uri("/_rels/.rels", UriKind.Relative));
System\IO\Packaging\PackageRelationshipSelector.cs (4)
31public PackageRelationshipSelector(Uri sourceUri, PackageRelationshipSelectorType selectorType, string selectionCriteria) 37if (Uri.Compare(sourceUri, PackUriHelper.PackageRootUri, UriComponents.SerializationInfoString, UriFormat.UriEscaped, StringComparison.Ordinal) != 0) 63public Uri SourceUri 164private readonly Uri _sourceUri;
System\IO\Packaging\PackUriHelper.cs (35)
36public static Uri CreatePartUri(Uri partUri) 47Uri resolvedUri = new Uri(s_defaultUri, partUri); 76public static Uri ResolvePartUri(Uri sourcePartUri, Uri targetUri) 84Uri resolvedUri; 102public static Uri GetRelativeUri(Uri sourcePartUri, Uri targetPartUri) 120public static Uri GetNormalizedPartUri(Uri partUri) 140public static int ComparePartUri(Uri? firstPartUri, Uri? secondPartUri) 165public static bool IsRelationshipPartUri(Uri partUri) 187public static Uri GetRelationshipPartUri(Uri partUri) 191if (Uri.Compare(partUri, PackageRootUri, UriComponents.SerializationInfoString, UriFormat.UriEscaped, StringComparison.Ordinal) == 0) 240public static Uri GetSourcePartUriFromRelationshipPartUri(Uri relationshipPartUri) 287internal static Uri PackageRootUri 299internal static bool TryValidatePartUri(Uri partUri, [NotNullWhen(true)] out ValidatedPartUri? validatedPartUri) 337internal static ValidatedPartUri ValidatePartUri(Uri partUri) 358internal static string GetStringForPartUri(Uri partUri) 370private static Exception? GetExceptionIfPartUriInvalid(Uri partUri, out string partUriString) 435private static void ThrowIfAbsoluteUri(Uri uri) 442private static ArgumentException? GetExceptionIfAbsoluteUri(Uri uri) 509private static int CompareUsingSystemUri(Uri? firstUri, Uri? secondUri) 511return Uri.Compare( 520private static string GetStringForPartUriFromAnyUri(Uri partUri) 525Uri safeUnescapedUri; 570private static readonly Uri s_defaultUri = new Uri("http://defaultcontainer/"); 573private static readonly Uri s_packageRootUri = new Uri("/", UriKind.Relative); 886private static readonly Uri s_containerRelationshipNormalizedPartUri = new ValidatedPartUri("/_RELS/.RELS",
System\IO\Packaging\PackUriHelper.PackUriScheme.cs (35)
31public static Uri Create(Uri packageUri) 49public static Uri Create(Uri packageUri, Uri? partUri) 70public static Uri Create(Uri packageUri, Uri? partUri, string? fragment) 102absolutePackageUri = string.Concat(PackUriHelper.UriSchemePack, Uri.SchemeDelimiter, absolutePackageUri); 104Uri packUri = new Uri(absolutePackageUri); 131public static Uri GetPackageUri(Uri packUri) 134ValidateAndGetPackUriComponents(packUri, out Uri packageUri, out _); 154public static Uri? GetPartUri(Uri packUri) 157ValidateAndGetPackUriComponents(packUri, out _, out Uri? partUri); 174public static int ComparePackUri(Uri? firstPackUri, Uri? secondPackUri) 185ValidateAndGetPackUriComponents(firstPackUri, out Uri firstPackageUri, out Uri? firstPartUri); 186ValidateAndGetPackUriComponents(secondPackUri, out Uri secondPackageUri, out Uri? secondPartUri); 214internal static void ValidateAndGetPackUriComponents(Uri packUri, out Uri packageUri, out Uri? partUri) 249private static Uri ValidatePackageUri(Uri packageUri) 261private static Uri ValidatePackUri(Uri packUri) 290path = path.Replace(c.ToString(), Uri.HexEscape(c)); 298private static Uri GetPackageUriComponent(Uri packUri) 309Uri packageUri = new Uri(Uri.UnescapeDataString(hostAndPort)); 318private static PackUriHelper.ValidatedPartUri? GetPartUriComponent(Uri packUri)
System\IO\Packaging\PartBasedPackageProperties.cs (2)
444Uri propertiesPartUri = PackUriHelper.ResolvePartUri( 728private static Uri GeneratePropertyPartUri()
System\IO\Packaging\ZipPackage.cs (4)
36protected override PackagePart CreatePartCore(Uri partUri, 79protected override PackagePart? GetPartCore(Uri partUri) 108protected override void DeletePartCore(Uri partUri) 214Uri partUri = new Uri(GetOpcNameFromZipItemName(zipArchiveEntry.FullName), UriKind.Relative);
System\IO\Packaging\ZipPackagePartPiece.cs (2)
131&& Uri.TryCreate(ZipPackage.GetOpcNameFromZipItemName(prefixName), UriKind.Relative, out Uri? unvalidatedPartUri)
System.Net.Http (156)
src\runtime\src\libraries\Common\src\System\Net\CredentialCacheKey.cs (7)
14public readonly Uri UriPrefix; 18internal CredentialCacheKey(Uri uriPrefix, string authenticationType) 28internal bool Match(Uri uri, int prefixLen, string authenticationType) 58private bool IsPrefix(Uri uri, int prefixLen) 61Uri uriPrefix = UriPrefix; 112public static bool TryGetCredential(Dictionary<CredentialCacheKey, NetworkCredential> cache, Uri uriPrefix, string authType, [NotNullWhen(true)] out Uri? mostSpecificMatchUri, [NotNullWhen(true)] out NetworkCredential? mostSpecificMatch)
src\runtime\src\libraries\Common\src\System\Net\Http\UriRedactionHelper.cs (1)
51public static string? GetRedactedUriString(Uri? uri)
System\Net\Http\DiagnosticsHandler.cs (13)
128if (request.RequestUri is Uri requestUri && requestUri.IsAbsoluteUri) 266[DynamicDependency(nameof(Uri.Host), typeof(Uri))] 267[DynamicDependency(nameof(Uri.Port), typeof(Uri))] 299[DynamicDependency(nameof(Uri.Host), typeof(Uri))] 300[DynamicDependency(nameof(Uri.Port), typeof(Uri))] 320[DynamicDependency(nameof(Uri.Host), typeof(Uri))] 321[DynamicDependency(nameof(Uri.Port), typeof(Uri))]
System\Net\Http\FormUrlEncodedContent.cs (1)
58while (!Uri.TryEscapeDataString(data, builder.RawChars.Slice(builder.Length), out charsWritten))
System\Net\Http\Headers\ContentDispositionHeaderValue.cs (2)
520if (Uri.IsHexEncoding(dataString, index)) // %FF 523unescapedBytes[unescapedBytesCount++] = (byte)Uri.HexUnescape(dataString, ref index);
System\Net\Http\Headers\HttpContentHeaders.cs (2)
73public Uri? ContentLocation 75get { return (Uri?)GetSingleParsedValue(KnownHeaders.ContentLocation.Descriptor); }
System\Net\Http\Headers\HttpRequestHeaders.cs (2)
188public Uri? Referrer 190get { return (Uri?)GetSingleParsedValue(KnownHeaders.Referer.Descriptor); }
System\Net\Http\Headers\HttpResponseHeaders.cs (2)
47public Uri? Location 49get { return (Uri?)GetSingleParsedValue(KnownHeaders.Location.Descriptor); }
System\Net\Http\Headers\UriHeaderParser.cs (6)
42if (!Uri.TryCreate(uriString, _uriKind, out Uri? uri)) 47if (!Uri.TryCreate(uriString, _uriKind, out uri)) 90Debug.Assert(value is Uri); 91Uri uri = (Uri)value;
System\Net\Http\HttpClient.cs (23)
32private Uri? _baseAddress; 86public Uri? BaseAddress 167public Task<string> GetStringAsync(Uri? requestUri) => 173public Task<string> GetStringAsync(Uri? requestUri, CancellationToken cancellationToken) 241public Task<byte[]> GetByteArrayAsync(Uri? requestUri) => 247public Task<byte[]> GetByteArrayAsync(Uri? requestUri, CancellationToken cancellationToken) 321public Task<Stream> GetStreamAsync(Uri? requestUri) => 324public Task<Stream> GetStreamAsync(Uri? requestUri, CancellationToken cancellationToken) 368public Task<HttpResponseMessage> GetAsync(Uri? requestUri) => 374public Task<HttpResponseMessage> GetAsync(Uri? requestUri, HttpCompletionOption completionOption) => 380public Task<HttpResponseMessage> GetAsync(Uri? requestUri, CancellationToken cancellationToken) => 386public Task<HttpResponseMessage> GetAsync(Uri? requestUri, HttpCompletionOption completionOption, CancellationToken cancellationToken) => 392public Task<HttpResponseMessage> PostAsync(Uri? requestUri, HttpContent? content) => 398public Task<HttpResponseMessage> PostAsync(Uri? requestUri, HttpContent? content, CancellationToken cancellationToken) 408public Task<HttpResponseMessage> PutAsync(Uri? requestUri, HttpContent? content) => 414public Task<HttpResponseMessage> PutAsync(Uri? requestUri, HttpContent? content, CancellationToken cancellationToken) 424public Task<HttpResponseMessage> PatchAsync(Uri? requestUri, HttpContent? content) => 430public Task<HttpResponseMessage> PatchAsync(Uri? requestUri, HttpContent? content, CancellationToken cancellationToken) 440public Task<HttpResponseMessage> DeleteAsync(Uri? requestUri) => 446public Task<HttpResponseMessage> DeleteAsync(Uri? requestUri, CancellationToken cancellationToken) => 764Uri? requestUri = null; 831private static Uri? CreateUri(string? uri) => 834private HttpRequestMessage CreateRequestMessage(HttpMethod method, Uri? uri) =>
System\Net\Http\HttpMessageInvoker.cs (1)
105request.RequestUri is Uri requestUri &&
System\Net\Http\HttpRequestMessage.cs (4)
29private Uri? _requestUri; 103public Uri? RequestUri 126: this(HttpMethod.Get, (Uri?)null) 130public HttpRequestMessage(HttpMethod method, Uri? requestUri)
System\Net\Http\HttpRuleParser.cs (1)
318if (!Uri.TryCreate($"http://{host}/", UriKind.Absolute, out _))
System\Net\Http\HttpTelemetry.cs (1)
183public void Redirect(Uri redirectUri)
System\Net\Http\Metrics\MetricsHandler.cs (1)
146if (request.RequestUri is Uri requestUri && requestUri.IsAbsoluteUri)
System\Net\Http\NetEventSource.Http.cs (3)
22public static void UriBaseAddress(object obj, Uri? baseAddress) 56public static void AuthenticationInfo(Uri uri, string message) 67public static void AuthenticationError(Uri? uri, string message)
System\Net\Http\SocketsHttpHandler\AuthenticationHelper.cs (6)
80private static bool TryGetValidAuthenticationChallengeForScheme(string scheme, AuthenticationType authenticationType, Uri uri, ICredentials credentials, 110private static bool TryGetAuthenticationChallenge(HttpResponseMessage response, bool isProxyAuth, Uri authUri, ICredentials credentials, out AuthenticationChallenge challenge) 213private static async ValueTask<HttpResponseMessage> SendWithAuthAsync(HttpRequestMessage request, Uri authUri, bool async, ICredentials credentials, bool preAuthenticate, bool isProxyAuth, bool doRequestAuth, HttpConnectionPool pool, CancellationToken cancellationToken) 218Uri? preAuthCredentialUri = null; 237(Uri uriPrefix, NetworkCredential credential)? preAuthCredentialPair; 375public static ValueTask<HttpResponseMessage> SendWithProxyAuthAsync(HttpRequestMessage request, Uri proxyUri, bool async, ICredentials proxyCredentials, bool doRequestAuth, HttpConnectionPool pool, CancellationToken cancellationToken)
System\Net\Http\SocketsHttpHandler\AuthenticationHelper.NtAuth.cs (2)
46private static async Task<HttpResponseMessage> SendWithNtAuthAsync(HttpRequestMessage request, Uri authUri, bool async, ICredentials credentials, TokenImpersonationLevel impersonationLevel, bool isProxyAuth, HttpConnection connection, HttpConnectionPool connectionPool, CancellationToken cancellationToken) 205public static Task<HttpResponseMessage> SendWithNtProxyAuthAsync(HttpRequestMessage request, Uri proxyUri, bool async, ICredentials proxyCredentials, TokenImpersonationLevel impersonationLevel, HttpConnection connection, HttpConnectionPool connectionPool, CancellationToken cancellationToken)
System\Net\Http\SocketsHttpHandler\ConnectionPool\HttpConnectionPool.cs (3)
37private readonly Uri? _proxyUri; 80public HttpConnectionPool(HttpConnectionPoolManager poolManager, HttpConnectionKind kind, string? host, int port, string? sslHostName, Uri? proxyUri, string? telemetryServerAddress) 295public Uri? ProxyUri => _proxyUri;
System\Net\Http\SocketsHttpHandler\CookieHelper.cs (1)
21Uri requestUri = response.RequestMessage.RequestUri;
System\Net\Http\SocketsHttpHandler\FailedProxyCache.cs (9)
31private readonly ConcurrentDictionary<Uri, long> _failedProxies = new ConcurrentDictionary<Uri, long>(); 43/// <param name="uri">The <see cref="Uri"/> of the proxy to check.</param> 45public long GetProxyRenewTicks(Uri uri) 76public void SetProxyFailed(Uri uri) 87public bool TryRenewProxy(Uri uri, long renewTicks) => 88_failedProxies.TryRemove(new KeyValuePair<Uri, long>(uri, renewTicks)); 124foreach (KeyValuePair<Uri, long> kvp in _failedProxies) 128((ICollection<KeyValuePair<Uri, long>>)_failedProxies).Remove(kvp);
System\Net\Http\SocketsHttpHandler\HttpAuthority.cs (2)
24var builder = new UriBuilder(Uri.UriSchemeHttp, host, port); 25Uri uri = builder.Uri;
System\Net\Http\SocketsHttpHandler\HttpConnection.cs (2)
332Debug.Assert(request.RequestUri.Scheme == Uri.UriSchemeHttp); 398void WriteHost(Uri requestUri)
System\Net\Http\SocketsHttpHandler\HttpConnectionPoolManager.cs (9)
230private HttpConnectionKey GetConnectionKey(HttpRequestMessage request, Uri? proxyUri, bool isProxyConnect) 232Uri? uri = request.RequestUri; 315Uri? uri = request.RequestUri; 336public ValueTask<HttpResponseMessage> SendAsyncCore(HttpRequestMessage request, Uri? proxyUri, bool async, bool doRequestAuth, bool isProxyConnect, CancellationToken cancellationToken) 375public ValueTask<HttpResponseMessage> SendProxyConnectAsync(HttpRequestMessage request, Uri proxyUri, bool async, CancellationToken cancellationToken) 388Uri? proxyUri = null; 433private async ValueTask<HttpResponseMessage> SendAsyncMultiProxy(HttpRequestMessage request, bool async, bool doRequestAuth, MultiProxy multiProxy, Uri? firstProxy, CancellationToken cancellationToken) 532public readonly Uri? ProxyUri; 535public HttpConnectionKey(HttpConnectionKind kind, string? host, int port, string? sslHostName, Uri? proxyUri, string identity)
System\Net\Http\SocketsHttpHandler\HttpEnvironmentProxy.cs (21)
11private readonly Uri? _httpProxy; 12private readonly Uri? _httpsProxy; 14public HttpEnvironmentProxyCredentials(Uri? httpProxy, NetworkCredential? httpCred, 15Uri? httpsProxy, NetworkCredential? httpsCred) 23public NetworkCredential? GetCredential(Uri? uri, string authType) 33public static HttpEnvironmentProxyCredentials? TryCreate(Uri? httpProxy, Uri? httpsProxy) 68value = Uri.UnescapeDataString(value); 98private readonly Uri? _httpProxyUri; // String URI for HTTP requests 99private readonly Uri? _httpsProxyUri; // String URI for HTTPS requests 103private HttpEnvironmentProxy(Uri? httpProxy, Uri? httpsProxy, string? bypassList) 118private static unsafe Uri? GetUriFromString(string? value) 176string auth = Uri.UnescapeDataString(value.AsSpan(0, separatorIndex)); 221ub.UserName = Uri.EscapeDataString(user); 226ub.Password = Uri.EscapeDataString(password); 229Uri uri = ub.Uri; 253private bool IsMatchInBypassList(Uri input) 288public Uri? GetProxy(Uri uri) 296public bool IsBypassed(Uri uri)
System\Net\Http\SocketsHttpHandler\HttpEnvironmentProxy.Unix.cs (3)
21Uri? httpProxy = GetUriFromString(Environment.GetEnvironmentVariable(EnvHttpProxyLC)); 27Uri? httpsProxy = GetUriFromString(Environment.GetEnvironmentVariable(EnvHttpsProxyLC)) ?? 32Uri? allProxy = GetUriFromString(Environment.GetEnvironmentVariable(EnvAllProxyLC)) ??
System\Net\Http\SocketsHttpHandler\HttpNoProxy.cs (3)
9public Uri? GetProxy(Uri destination) => null; 10public bool IsBypassed(Uri host) => true;
System\Net\Http\SocketsHttpHandler\IMultiWebProxy.cs (2)
7/// An <see cref="IWebProxy"/> capable of returning more than one proxy for a single <see cref="Uri"/>. 14public MultiProxy GetMultiProxy(Uri uri);
System\Net\Http\SocketsHttpHandler\MultiProxy.cs (12)
15private readonly Uri[]? _uris; 19private Uri? _currentUri; 21private MultiProxy(FailedProxyCache? failedProxyCache, Uri[] uris) 41public static MultiProxy Empty => new MultiProxy(null, Array.Empty<Uri>()); 53Uri[] uris = Array.Empty<Uri>(); 56while (TryParseProxyConfigPart(span, secure, manualSettingsUsed: true, out Uri? uri, out int charactersConsumed)) 93public bool ReadNext([NotNullWhen(true)] out Uri? uri, out bool isFinalProxy) 110Uri? oldestFailedProxyUri = null; 153private bool ReadNextHelper([NotNullWhen(true)] out Uri? uri, out bool isFinalProxy) 196private static bool TryParseProxyConfigPart(ReadOnlySpan<char> proxyString, bool secure, bool manualSettingsUsed, [NotNullWhen(true)] out Uri? uri, out int charactersConsumed) 261if ((proxyType & wantedFlag) != 0 && Uri.TryCreate(string.Concat("http://", proxyString.Slice(0, iter)), UriKind.Absolute, out uri))
System\Net\Http\SocketsHttpHandler\PreAuthCredentialCache.cs (5)
16public void Add(Uri uriPrefix, string authType, NetworkCredential cred) 29public void Remove(Uri uriPrefix, string authType) 44public (Uri uriPrefix, NetworkCredential credential)? GetCredential(Uri uriPrefix, string authType) 54CredentialCacheHelper.TryGetCredential(_cache, uriPrefix, authType, out Uri? mostSpecificMatchUri, out NetworkCredential? mostSpecificMatch);
System\Net\Http\SocketsHttpHandler\RedirectHandler.cs (4)
32Uri? redirectUri; 93private Uri? GetUriForRedirect(Uri requestUri, HttpResponseMessage response) 109Uri? location = response.Headers.Location;
System\Net\Http\SocketsHttpHandler\SocketsHttpHandler.cs (1)
678Uri? requestUri = request.RequestUri;
System\Net\Http\SocketsHttpHandler\SocksHelper.cs (1)
32public static async ValueTask EstablishSocksTunnelAsync(Stream stream, string host, int port, Uri proxyUri, ICredentials? proxyCredentials, bool async, CancellationToken cancellationToken)
System.Net.Http.Json (40)
System\Net\Http\Json\HttpClientJsonExtensions.cs (11)
19private static Task<object?> FromJsonAsyncCore(Func<HttpClient, Uri?, CancellationToken, Task<HttpResponseMessage>> getMethod, HttpClient client, Uri? requestUri, Type type, JsonSerializerOptions? options, CancellationToken cancellationToken = default) => 24private static Task<TValue?> FromJsonAsyncCore<TValue>(Func<HttpClient, Uri?, CancellationToken, Task<HttpResponseMessage>> getMethod, HttpClient client, Uri? requestUri, JsonSerializerOptions? options, CancellationToken cancellationToken = default) => 27private static Task<object?> FromJsonAsyncCore(Func<HttpClient, Uri?, CancellationToken, Task<HttpResponseMessage>> getMethod, HttpClient client, Uri? requestUri, Type type, JsonSerializerContext context, CancellationToken cancellationToken = default) => 30private static Task<TValue?> FromJsonAsyncCore<TValue>(Func<HttpClient, Uri?, CancellationToken, Task<HttpResponseMessage>> getMethod, HttpClient client, Uri? requestUri, JsonTypeInfo<TValue> jsonTypeInfo, CancellationToken cancellationToken) => 34Func<HttpClient, Uri?, CancellationToken, Task<HttpResponseMessage>> getMethod, 36Uri? requestUri, 111private static Uri? CreateUri(string? uri) =>
System\Net\Http\Json\HttpClientJsonExtensions.Delete.cs (7)
18private static readonly Func<HttpClient, Uri?, CancellationToken, Task<HttpResponseMessage>> s_deleteAsync = 48public static Task<object?> DeleteFromJsonAsync(this HttpClient client, Uri? requestUri, Type type, JsonSerializerOptions? options, CancellationToken cancellationToken = default) => 78public static Task<TValue?> DeleteFromJsonAsync<TValue>(this HttpClient client, Uri? requestUri, JsonSerializerOptions? options, CancellationToken cancellationToken = default) => 104public static Task<object?> DeleteFromJsonAsync(this HttpClient client, Uri? requestUri, Type type, JsonSerializerContext context, CancellationToken cancellationToken = default) => 130public static Task<TValue?> DeleteFromJsonAsync<TValue>(this HttpClient client, Uri? requestUri, JsonTypeInfo<TValue> jsonTypeInfo, CancellationToken cancellationToken = default) => 158public static Task<object?> DeleteFromJsonAsync(this HttpClient client, Uri? requestUri, Type type, CancellationToken cancellationToken = default) => 186public static Task<TValue?> DeleteFromJsonAsync<TValue>(this HttpClient client, Uri? requestUri, CancellationToken cancellationToken = default) =>
System\Net\Http\Json\HttpClientJsonExtensions.Get.AsyncEnumerable.cs (6)
53Uri? requestUri, 89Uri? requestUri, 126Uri? requestUri, 134Uri? requestUri, 145Uri? requestUri, 155Uri? requestUri,
System\Net\Http\Json\HttpClientJsonExtensions.Get.cs (7)
18private static readonly Func<HttpClient, Uri?, CancellationToken, Task<HttpResponseMessage>> s_getAsync = 28public static Task<object?> GetFromJsonAsync(this HttpClient client, Uri? requestUri, Type type, JsonSerializerOptions? options, CancellationToken cancellationToken = default) => 38public static Task<TValue?> GetFromJsonAsync<TValue>(this HttpClient client, Uri? requestUri, JsonSerializerOptions? options, CancellationToken cancellationToken = default) => 44public static Task<object?> GetFromJsonAsync(this HttpClient client, Uri? requestUri, Type type, JsonSerializerContext context, CancellationToken cancellationToken = default) => 50public static Task<TValue?> GetFromJsonAsync<TValue>(this HttpClient client, Uri? requestUri, JsonTypeInfo<TValue> jsonTypeInfo, CancellationToken cancellationToken = default) => 60public static Task<object?> GetFromJsonAsync(this HttpClient client, Uri? requestUri, Type type, CancellationToken cancellationToken = default) => 70public static Task<TValue?> GetFromJsonAsync<TValue>(this HttpClient client, Uri? requestUri, CancellationToken cancellationToken = default) =>
System\Net\Http\Json\HttpClientJsonExtensions.Patch.cs (3)
48public static Task<HttpResponseMessage> PatchAsJsonAsync<TValue>(this HttpClient client, Uri? requestUri, TValue value, JsonSerializerOptions? options = null, CancellationToken cancellationToken = default) 83public static Task<HttpResponseMessage> PatchAsJsonAsync<TValue>(this HttpClient client, Uri? requestUri, TValue value, CancellationToken cancellationToken) 116public static Task<HttpResponseMessage> PatchAsJsonAsync<TValue>(this HttpClient client, Uri? requestUri, TValue value, JsonTypeInfo<TValue> jsonTypeInfo, CancellationToken cancellationToken = default)
System\Net\Http\Json\HttpClientJsonExtensions.Post.cs (3)
26public static Task<HttpResponseMessage> PostAsJsonAsync<TValue>(this HttpClient client, Uri? requestUri, TValue value, JsonSerializerOptions? options = null, CancellationToken cancellationToken = default) 41public static Task<HttpResponseMessage> PostAsJsonAsync<TValue>(this HttpClient client, Uri? requestUri, TValue value, CancellationToken cancellationToken) 52public static Task<HttpResponseMessage> PostAsJsonAsync<TValue>(this HttpClient client, Uri? requestUri, TValue value, JsonTypeInfo<TValue> jsonTypeInfo, CancellationToken cancellationToken = default)
System\Net\Http\Json\HttpClientJsonExtensions.Put.cs (3)
26public static Task<HttpResponseMessage> PutAsJsonAsync<TValue>(this HttpClient client, Uri? requestUri, TValue value, JsonSerializerOptions? options = null, CancellationToken cancellationToken = default) 41public static Task<HttpResponseMessage> PutAsJsonAsync<TValue>(this HttpClient client, Uri? requestUri, TValue value, CancellationToken cancellationToken) 52public static Task<HttpResponseMessage> PutAsJsonAsync<TValue>(this HttpClient client, Uri? requestUri, TValue value, JsonTypeInfo<TValue> jsonTypeInfo, CancellationToken cancellationToken = default)
System.Net.Http.WinHttpHandler (19)
System\Net\Http\WinHttpAuthHelper.cs (6)
60Uri uri = state.RequestMessage.RequestUri; 189Uri? proxyUri; 239Uri uri, 266public void SaveServerCredentialsToCache(Uri uri, uint authScheme, ICredentials serverCredentials) 314Uri uri, 384private static uint ChooseAuthScheme(uint supportedSchemes, Uri? uri, ICredentials? credentials)
System\Net\Http\WinHttpCookieContainerAdapter.cs (2)
49public static void ResetCookieRequestHeaders(WinHttpRequestState state, Uri redirectUri) 88public static string? GetCookieHeader(Uri uri, CookieContainer cookies)
System\Net\Http\WinHttpHandler.cs (9)
597Uri? requestUri = request.RequestUri; 603if (requestUri.Scheme != Uri.UriSchemeHttp && requestUri.Scheme != Uri.UriSchemeHttps) 1013state.RequestMessage.RequestUri.Scheme == Uri.UriSchemeHttps && responseMessage.Headers.Location?.Scheme == Uri.UriSchemeHttp) 1287Uri uri = state.RequestMessage.RequestUri; 1295Uri? proxyUri = state.Proxy.IsBypassed(uri) ? null : state.Proxy.GetProxy(uri); 1406private void SetRequestHandleClientCertificateOptions(SafeWinHttpHandle requestHandle, Uri requestUri) 1437private void SetEnableHttp2PlusClientCertificate(Uri requestUri, Version requestVersion)
System\Net\Http\WinHttpRequestCallback.cs (2)
101var redirectUri = new Uri(Marshal.PtrToStringUni(statusInformation)!); 219private static void OnRequestRedirect(WinHttpRequestState state, Uri redirectUri)
System.Net.HttpListener (32)
src\runtime\src\libraries\Common\src\System\Net\CookieParser.cs (2)
628if (Uri.TryCreate(CheckQuoted(_tokenizer.Value), UriKind.Absolute, out Uri? parsed))
System\Net\HttpListenerRequest.cs (6)
21private Uri? _requestUri; 28private CookieCollection ParseCookies(Uri? uri, string setCookieHeader) 211public Uri? UrlReferrer 221bool success = Uri.TryCreate(referrer, UriKind.RelativeOrAbsolute, out Uri? urlReferrer); 226public Uri? Url => RequestUri;
System\Net\HttpListenerRequestUriBuilder.cs (7)
44private Uri? _requestUri; 61public static Uri GetRequestUri(string rawUri, string cookedUriScheme, string cookedUriHost, 70private Uri Build() 84bool isValid = Uri.TryCreate(_cookedUriScheme + Uri.SchemeDelimiter + _cookedUriHost + _cookedUriPath + 142_requestUriString.Append(Uri.SchemeDelimiter); 153if (!Uri.TryCreate(_requestUriString.ToString(), UriKind.Absolute, out _requestUri))
System\Net\Managed\HttpEndPointListener.cs (1)
175private HttpListener? SearchListener(Uri? uri, out ListenerPrefix? prefix)
System\Net\Managed\HttpEndPointManager.cs (1)
96if (lp.Host != "*" && lp.Host != "+" && Uri.CheckHostName(lp.Host) == UriHostNameType.Unknown)
System\Net\Managed\HttpListenerRequest.Managed.cs (4)
151Uri? raw_uri = null; 153if (MaybeUri(_rawUrl!.ToLowerInvariant()) && Uri.TryCreate(_rawUrl, UriKind.Absolute, out raw_uri)) 170if (!Uri.TryCreate(base_uri + path, UriKind.Absolute, out _requestUri)) 378private Uri? RequestUri => _requestUri;
System\Net\ServiceNameStore.cs (8)
51UriHostNameType hostType = Uri.CheckHostName(hostPortAndDistinguisher); 86hostType = Uri.CheckHostName(host); // Revalidate the host 100Uri? constructedUri; 102if (!Uri.TryCreate(Uri.UriSchemeHttp + Uri.SchemeDelimiter + host, UriKind.Absolute, out constructedUri)) 220if (Uri.IsWellFormedUriString(uriPrefix, UriKind.Absolute)) 222Uri hostUri = new Uri(uriPrefix);
System\Net\WebSockets\HttpListenerWebSocketContext.cs (3)
13private readonly Uri _requestUri; 29Uri requestUri, 65public override Uri RequestUri => _requestUri;
System.Net.Mail (5)
System\Net\Mail\AlternateView.cs (1)
51public Uri? BaseUri
System\Net\Mail\Attachment.cs (3)
257internal Uri? ContentLocation 261Uri? uri; 262if (!Uri.TryCreate(_part.ContentLocation, UriKind.RelativeOrAbsolute, out uri))
System\Net\Mail\LinkedResource.cs (1)
39public Uri? ContentLink
System.Net.Primitives (31)
src\runtime\src\libraries\Common\src\System\Net\CookieParser.cs (2)
628if (Uri.TryCreate(CheckQuoted(_tokenizer.Value), UriKind.Absolute, out Uri? parsed))
src\runtime\src\libraries\Common\src\System\Net\CredentialCacheKey.cs (7)
14public readonly Uri UriPrefix; 18internal CredentialCacheKey(Uri uriPrefix, string authenticationType) 28internal bool Match(Uri uri, int prefixLen, string authenticationType) 58private bool IsPrefix(Uri uri, int prefixLen) 61Uri uriPrefix = UriPrefix; 112public static bool TryGetCredential(Dictionary<CredentialCacheKey, NetworkCredential> cache, Uri uriPrefix, string authType, [NotNullWhen(true)] out Uri? mostSpecificMatchUri, [NotNullWhen(true)] out NetworkCredential? mostSpecificMatch)
System\Net\Cookie.cs (3)
51private Uri? m_commentUri; // Do not rename (binary serialization) 133public Uri? CommentUri 358internal void VerifyAndSetDefaults(CookieVariant variant, Uri uri)
System\Net\CookieContainer.cs (11)
192Uri? uri; 219if (!Uri.TryCreate(uriSb.ToString(), UriKind.Absolute, out uri)) 545public void Add(Uri uri, Cookie cookie) 556public void Add(Uri uri, CookieCollection cookies) 569internal CookieCollection CookieCutter(Uri uri, string? headerName, string setCookieHeader) 639public CookieCollection GetCookies(Uri uri) 672internal CookieCollection? InternalGetCookies(Uri uri) 702private void BuildCookieCollectionFromDomainMatches(Uri uri, bool isSecure, int port, ref CookieCollection? cookies, List<string> matchingDomainKeys) 825public string GetCookieHeader(Uri uri) 832internal string GetCookieHeader(Uri uri, out string optCookie2) 861public void SetCookies(Uri uri, string cookieHeader)
System\Net\CredentialCache.cs (3)
24public void Add(Uri uriPrefix, string authType, NetworkCredential cred) 74public void Remove(Uri? uriPrefix, string? authType) 127public NetworkCredential? GetCredential(Uri uriPrefix, string authType)
System\Net\ICredentials.cs (1)
22NetworkCredential? GetCredential(Uri uri, string authType);
System\Net\IWebProxy.cs (3)
14Uri? GetProxy(Uri destination); 15bool IsBypassed(Uri host);
System\Net\NetworkCredential.cs (1)
144public NetworkCredential GetCredential(Uri? uri, string? authenticationType)
System.Net.Requests (58)
System\Net\FileWebRequest.cs (5)
22private readonly Uri _uri; 31internal FileWebRequest(Uri uri) 33if (uri.Scheme != (object)Uri.UriSchemeFile) 109public override Uri RequestUri => _uri; 307public WebRequest Create(Uri uri) => new FileWebRequest(uri);
System\Net\FileWebResponse.cs (3)
19private readonly Uri _uri; 24internal FileWebResponse(FileWebRequest request, Uri uri, FileAccess access, bool useAsync) 97public override Uri ResponseUri
System\Net\FtpControlStream.cs (6)
48private Uri? _responseUri; 773Uri uri, 859internal Uri ResponseUri 964Uri baseUri = request.RequestUri; 993Uri? newUri; 994if (!Uri.TryCreate(baseUri, escapedFilename, out newUri))
System\Net\FtpWebRequest.cs (7)
189private readonly Uri _uri; 336public override Uri RequestUri 483internal FtpWebRequest(Uri uri) 487if ((object)uri.Scheme != (object)Uri.UriSchemeFtp) 509username = Uri.UnescapeDataString(userInfo.AsSpan(0, index)); 511password = Uri.UnescapeDataString(userInfo.AsSpan(index)); 1711public WebRequest Create(Uri uri)
System\Net\FtpWebResponse.cs (3)
15private readonly Uri _responseUri; 24internal FtpWebResponse(Stream? responseStream, long contentLength, Uri responseUri, FtpStatusCode statusCode, string? statusLine, DateTime lastModified, string? bannerMessage, string? welcomeMessage, string? exitMessage) 122public override Uri ResponseUri
System\Net\GlobalProxySelection.cs (3)
27public Uri GetProxy(Uri uri) => uri; 29public bool IsBypassed(Uri uri) => true; // no proxy, always bypasses
System\Net\HttpWebRequest.cs (9)
38private readonly Uri _requestUri = null!; 70private Uri? _hostUri; 210internal HttpWebRequest(Uri uri) 343public Uri Address 367Uri hostUri = _hostUri ?? Address; 380Uri? hostUri; 943public override Uri RequestUri 1651private bool TryGetHostUri(string hostName, [NotNullWhen(true)] out Uri? hostUri) 1654return Uri.TryCreate(s, UriKind.Absolute, out hostUri);
System\Net\HttpWebResponse.cs (3)
25private readonly Uri _requestUri; 58internal HttpWebResponse(HttpResponseMessage _message, Uri requestUri, CookieContainer? cookieContainer) 229public override Uri ResponseUri
System\Net\ICredentialPolicy.cs (1)
8bool ShouldSendCredential(Uri challengeUri, WebRequest request, NetworkCredential credential, IAuthenticationModule authenticationModule);
System\Net\IWebRequestCreate.cs (1)
21WebRequest Create(Uri uri);
System\Net\ServicePoint\ServicePoint.cs (2)
22internal ServicePoint(Uri address) 41public Uri Address { get; }
System\Net\ServicePoint\ServicePointManager.cs (6)
103public static ServicePoint FindServicePoint(Uri address) => FindServicePoint(address, null); 107public static ServicePoint FindServicePoint(Uri address, IWebProxy? proxy) 170private static bool ProxyAddressIfNecessary(ref Uri address, IWebProxy? proxy) 176Uri? proxyAddress = proxy.GetProxy(address); 196private static string MakeQueryString(Uri address) => address.IsDefaultPort ? 200private static string MakeQueryString(Uri address, bool isProxy)
System\Net\WebRequest.cs (8)
75private static WebRequest Create(Uri requestUri, bool useUriBase) 170public static WebRequest Create(Uri requestUri) 189public static WebRequest CreateDefault(Uri requestUri) 205public static HttpWebRequest CreateHttp(Uri requestUri) 252if (Uri.TryCreate(prefix, UriKind.Absolute, out Uri? tempUri)) 328public WebRequest Create(Uri Uri) 407public virtual Uri RequestUri
System\Net\WebResponse.cs (1)
121public virtual Uri ResponseUri
System.Net.Security (17)
src\runtime\src\libraries\Common\src\System\Net\Http\X509ResourceClient.cs (11)
26static partial void ReportRedirected(Uri newUri); 27static partial void ReportRedirectNotFollowed(Uri redirectUri); 118private static extern Uri? GetRequestUri([UnsafeAccessorType(HttpRequestMessageTypeName)] object requestMessage); 120private static extern void SetRequestUri([UnsafeAccessorType(HttpRequestMessageTypeName)] object requestMessage, Uri? value); 146private static extern Uri? GetLocation([UnsafeAccessorType(HttpResponseHeadersTypeName)] object headers); 184Uri uri = new Uri(uriString); 207Uri? redirectUri; 213Uri? location = GetLocation(responseHeaders); 274private static Uri? GetUriForRedirect(Uri requestUri, int statusCode, Uri? location, out bool hasRedirect)
System\Net\Security\SslStreamCertificateContext.Linux.cs (2)
232if (Uri.TryCreate(entry, UriKind.Absolute, out Uri? uri))
System\Security\Authentication\ExtendedProtection\ServiceNameCollection.cs (4)
189UriHostNameType hostType = Uri.CheckHostName(hostPortAndDistinguisher); 224hostType = Uri.CheckHostName( 241Uri? constructedUri; 245if (!Uri.TryCreate(string.Concat(HttpSchemeAndDelimiter, host), UriKind.Absolute, out constructedUri))
System.Net.WebClient (72)
System\Net\WebClient.cs (72)
27private Uri? _baseAddress; 218protected virtual WebRequest GetWebRequest(Uri address) 282public byte[] DownloadData(Uri address) 298private byte[] DownloadDataInternal(Uri address, out WebRequest request) 322public void DownloadFile(Uri address, string fileName) 361public Stream OpenRead(Uri address) 388public Stream OpenWrite(Uri address) => 394public Stream OpenWrite(Uri address, string? method) 426public byte[] UploadData(Uri address, byte[] data) => 432public byte[] UploadData(Uri address, string? method, byte[] data) 451private byte[] UploadDataInternal(Uri address, string method, byte[] data, out WebRequest request) 550public byte[] UploadFile(Uri address, string fileName) => 556public byte[] UploadFile(Uri address, string? method, string fileName) 570Uri uri = GetUri(address); 571bool needsHeaderAndBoundary = (uri.Scheme != Uri.UriSchemeFile); 621public byte[] UploadValues(Uri address, NameValueCollection data) => 627public byte[] UploadValues(Uri address, string? method, NameValueCollection data) 658public string UploadString(Uri address, string data) => 664public string UploadString(Uri address, string? method, string data) 688public string DownloadString(Uri address) 778private Uri GetUri(string address) 782Uri? uri; 785if (!Uri.TryCreate(_baseAddress, address, out uri)) 790else if (!Uri.TryCreate(address, UriKind.Absolute, out uri)) 798private Uri GetUri(Uri address) 802Uri? uri = address; 804if (!address.IsAbsoluteUri && _baseAddress != null && !Uri.TryCreate(_baseAddress, address, out uri)) 949if (request.RequestUri.Scheme == Uri.UriSchemeFile) 1016if (request.RequestUri.Scheme == Uri.UriSchemeFile) 1165private string MapToDefaultMethod(Uri address) 1167Uri uri = !address.IsAbsoluteUri && _baseAddress != null ? 1171return string.Equals(uri.Scheme, Uri.UriSchemeFtp, StringComparison.Ordinal) ? 1190public void OpenReadAsync(Uri address) => 1193public void OpenReadAsync(Uri address, object? userToken) 1225public void OpenWriteAsync(Uri address) => 1228public void OpenWriteAsync(Uri address, string? method) => 1231public void OpenWriteAsync(Uri address, string? method, object? userToken) 1287public void DownloadStringAsync(Uri address) => 1290public void DownloadStringAsync(Uri address, object? userToken) 1313public void DownloadDataAsync(Uri address) => 1316public void DownloadDataAsync(Uri address, object? userToken) 1339public void DownloadFileAsync(Uri address, string fileName) => 1342public void DownloadFileAsync(Uri address, string fileName, object? userToken) 1362public void UploadStringAsync(Uri address, string data) => 1365public void UploadStringAsync(Uri address, string? method, string data) => 1368public void UploadStringAsync(Uri address, string? method, string data, object? userToken) 1411public void UploadDataAsync(Uri address, byte[] data) => 1414public void UploadDataAsync(Uri address, string? method, byte[] data) => 1417public void UploadDataAsync(Uri address, string? method, byte[] data, object? userToken) 1450public void UploadFileAsync(Uri address, string fileName) => 1453public void UploadFileAsync(Uri address, string? method, string fileName) => 1456public void UploadFileAsync(Uri address, string? method, string fileName, object? userToken) 1469Uri uri = GetUri(address); 1470bool needsHeaderAndBoundary = (uri.Scheme != Uri.UriSchemeFile); 1487public void UploadValuesAsync(Uri address, NameValueCollection data) => 1490public void UploadValuesAsync(Uri address, string? method, NameValueCollection data) => 1493public void UploadValuesAsync(Uri address, string? method, NameValueCollection data, object? userToken) 1539public Task<string> DownloadStringTaskAsync(Uri address) 1563public Task<Stream> OpenReadTaskAsync(Uri address) 1588public Task<Stream> OpenWriteTaskAsync(Uri address) => 1594public Task<Stream> OpenWriteTaskAsync(Uri address, string? method) 1619public Task<string> UploadStringTaskAsync(Uri address, string data) => 1625public Task<string> UploadStringTaskAsync(Uri address, string? method, string data) 1650public Task<byte[]> DownloadDataTaskAsync(Uri address) 1675public Task DownloadFileTaskAsync(Uri address, string fileName) 1700public Task<byte[]> UploadDataTaskAsync(Uri address, byte[] data) => 1706public Task<byte[]> UploadDataTaskAsync(Uri address, string? method, byte[] data) 1731public Task<byte[]> UploadFileTaskAsync(Uri address, string fileName) => 1737public Task<byte[]> UploadFileTaskAsync(Uri address, string? method, string fileName) 1765public Task<byte[]> UploadValuesTaskAsync(Uri address, NameValueCollection data) => 1768public Task<byte[]> UploadValuesTaskAsync(Uri address, string? method, NameValueCollection data)
System.Net.WebProxy (37)
System\Net\IWebProxyScript.cs (1)
23bool Load(Uri scriptLocation, string script, Type helperType);
System\Net\WebProxy.cs (35)
39public WebProxy() : this((Uri?)null, false, null, null) { } 42/// Initializes a new instance of the <see cref="WebProxy" /> class from the specified <see cref="Uri" /> instance. 46/// If the specified <paramref name="Address"/> contains <see cref="Uri.UserInfo"/>, the credentials 49public WebProxy(Uri? Address) : this(Address, false, null, null) { } 52/// Initializes a new instance of the <see cref="WebProxy" /> class with the <see cref="Uri" /> instance and bypass setting. 54/// <param name="Address">A <see cref="Uri" /> instance that contains the address of the proxy server.</param> 57/// If the specified <paramref name="Address"/> contains <see cref="Uri.UserInfo"/>, the credentials 60public WebProxy(Uri? Address, bool BypassOnLocal) : this(Address, BypassOnLocal, null, null) { } 63/// Initializes a new instance of the <see cref="WebProxy" /> class with the specified <see cref="Uri" /> instance, bypass setting, and list of URIs to bypass. 65/// <param name="Address">A <see cref="Uri" /> instance that contains the address of the proxy server.</param> 69/// If the specified <paramref name="Address"/> contains <see cref="Uri.UserInfo"/>, the credentials 72public WebProxy(Uri? Address, bool BypassOnLocal, [StringSyntax(StringSyntaxAttribute.Regex, RegexOptions.IgnoreCase | RegexOptions.CultureInvariant)] string[]? BypassList) : this(Address, BypassOnLocal, BypassList, null) { } 75/// Initializes a new instance of the <see cref="WebProxy" /> class with the specified <see cref="Uri" /> instance, bypass setting, list of URIs to bypass, and credentials. 77/// <param name="Address">A <see cref="Uri" /> instance that contains the address of the proxy server.</param> 82/// If the specified <paramref name="Address"/> contains <see cref="Uri.UserInfo"/>, the credentials 85public WebProxy(Uri? Address, bool BypassOnLocal, [StringSyntax(StringSyntaxAttribute.Regex, RegexOptions.IgnoreCase | RegexOptions.CultureInvariant)] string[]? BypassList, ICredentials? Credentials) 107/// The <see cref="WebProxy"/> instance is initialized with the <see cref="Address"/> property set to a <see cref="Uri"/> instance of the form <c>http://</c><paramref name="Host"/><c>:</c><paramref name="Port"/>. 180/// A <see cref="Uri"/> instance that contains the address of the proxy server. 183/// If the specified <see cref="Uri"/> contains <see cref="Uri.UserInfo"/>, the credentials 186public Uri? Address 265/// <param name="destination">The <see cref="Uri"/> instance of the requested Internet resource.</param> 267/// The <see cref="Uri"/> instance of the Internet resource, if the resource is on the bypass list; otherwise, the <see cref="Uri"/> instance of the proxy. 270public Uri? GetProxy(Uri destination) 277private static Uri? CreateProxyUri(string? address, int? port = null) 289var proxyUri = new Uri(address); 299private static NetworkCredential? GetCredentialsFromUri(Uri? uri) 319userName = Uri.UnescapeDataString(userInfo.AsSpan(0, colonIndex)); 320password = Uri.UnescapeDataString(userInfo.AsSpan(colonIndex + 1)); 324userName = Uri.UnescapeDataString(userInfo); 354private bool IsMatchInBypassList(Uri input) 399/// <param name="host">The <see cref="Uri"/> instance of the host to check for proxy use.</param> 404public bool IsBypassed(Uri host)
System\Net\WebProxy.Wasm.cs (1)
10private static bool IsLocal(Uri host)
System.Net.WebSockets (1)
System\Net\WebSockets\WebSocketContext.cs (1)
12public abstract Uri RequestUri { get; }
System.Net.WebSockets.Client (6)
System\Net\WebSockets\BrowserWebSockets\BrowserWebSocket.cs (2)
136internal Task ConnectAsync(Uri uri, List<string>? requestedSubProtocols, CancellationToken cancellationToken) 298private void CreateCore(Uri uri, List<string>? requestedSubProtocols)
System\Net\WebSockets\ClientWebSocket.cs (3)
78public Task ConnectAsync(Uri uri, CancellationToken cancellationToken) 90public Task ConnectAsync(Uri uri, HttpMessageInvoker? invoker, CancellationToken cancellationToken) 120private async Task ConnectAsyncCore(Uri uri, HttpMessageInvoker? invoker, CancellationToken cancellationToken)
System\Net\WebSockets\WebSocketHandle.Browser.cs (1)
37public Task ConnectAsync(Uri uri, HttpMessageInvoker? _ /*invoker*/, CancellationToken cancellationToken, ClientWebSocketOptions options)
System.Private.DataContractSerialization (25)
System\Runtime\Serialization\DataContract.cs (4)
661"Uri" => typeof(Uri), 742else if (type == typeof(Uri)) 1682if (Uri.TryCreate(dataContractNs, UriKind.RelativeOrAbsolute, out Uri? uri))
System\Runtime\Serialization\ExtensionDataReader.cs (3)
726Uri uri = isTypedNode ? ((DataNode<Uri>)dataNode).GetValue() : (Uri)dataNode.Value;
System\Runtime\Serialization\Globals.cs (2)
44internal static Type TypeOfUri => field ??= typeof(Uri); 122internal static Uri DataContractXsdBaseNamespaceUri => field ??= new Uri(DataContractXsdBaseNamespace);
System\Runtime\Serialization\PrimitiveDataContract.cs (3)
1095public UriDataContract() : base(typeof(Uri), DictionaryGlobals.UriLocalName, DictionaryGlobals.SchemaNamespace) 1106writer.WriteUri((Uri)obj); 1127writer.WriteUri((Uri?)obj, name, ns);
System\Runtime\Serialization\XmlObjectSerializerWriteContext.cs (3)
323internal virtual void WriteUri(XmlWriterDelegator xmlWriter, Uri value) 330internal virtual void WriteUri(XmlWriterDelegator xmlWriter, Uri value, XmlDictionaryString name, XmlDictionaryString ns) 333WriteNull(xmlWriter, typeof(Uri), true/*isMemberTypeSerializable*/, name, ns);
System\Runtime\Serialization\XmlObjectSerializerWriteContextComplex.cs (3)
100internal override void WriteUri(XmlWriterDelegator xmlWriter, Uri value) 108internal override void WriteUri(XmlWriterDelegator xmlWriter, Uri value, XmlDictionaryString name, XmlDictionaryString ns) 111WriteNull(xmlWriter, typeof(Uri), true/*isMemberTypeSerializable*/, name, ns);
System\Runtime\Serialization\XmlReaderDelegator.cs (3)
327return new DataNode<Uri>(ReadContentAsUri()); 802internal Uri ReadElementContentAsUri() 822internal Uri ReadContentAsUri()
System\Runtime\Serialization\XmlWriterDelegator.cs (4)
347WriteUri((Uri)value); 430WriteUri(((DataNode<Uri>)dataNode).GetValue()); 674internal void WriteUri(Uri? value) 679internal void WriteUri(Uri? value, XmlDictionaryString name, XmlDictionaryString? ns)
System.Private.Uri (100)
System\IriHelper.cs (1)
89if (ch == Uri.c_DummyChar || UriHelper.IsNotSafeForUnescape(ch))
System\PercentEncodingHelper.cs (1)
18Debug.Assert(UriHelper.DecodeHexChars(input[1], input[2]) != Uri.c_DummyChar);
System\Uri.cs (26)
20public partial class Uri : ISpanFormattable, IEquatable<Uri>, ISerializable 451public Uri(Uri baseUri, string? relativeUri, bool dontEscape) 472/// Initializes a new instance of the <see cref="Uri"/> class with the specified URI and additional <see cref="UriCreationOptions"/>. 474/// <param name="uriString">A string that identifies the resource to be represented by the <see cref="Uri"/> instance.</param> 475/// <param name="creationOptions">Options that control how the <seealso cref="Uri"/> is created and behaves.</param> 490public Uri(Uri baseUri, string? relativeUri) 550private void CreateUri(Uri baseUri, string? relativeUri, bool dontEscape) 560Uri? uriResult = ResolveHelper(baseUri, this, ref relativeUri, ref dontEscape); 591public Uri(Uri baseUri, Uri relativeUri) 607Uri? resolvedRelativeUri = ResolveHelper(baseUri, this, ref newUriString, ref dontEscape); 637private static void GetCombinedString(Uri baseUri, string relativeStr, 1579/// Attempts to format a canonical string representation for the <see cref="Uri"/> instance into the specified span. 1659public static bool operator ==(Uri? uri1, Uri? uri2) 1674public static bool operator !=(Uri? uri1, Uri? uri2) 1701Uri? other = comparand as Uri; 1725/// Compares two <see cref="Uri"/> instances for equality. 1727/// <param name="other">The <see cref="Uri"/> to compare to this instance.</param> 1729public bool Equals([NotNullWhen(true)] Uri? other) 1852public Uri MakeRelativeUri(Uri uri) 4409private static string CombineUri(Uri basePart, string relativePart, UriFormat uriFormat) 4689public string MakeRelative(Uri toUri)
System\UriBuilder.cs (11)
23private Uri? _uri; 36_uri = new Uri(Uri.UriSchemeHttp + Uri.SchemeDelimiter + uri); 42public UriBuilder(Uri uri) 117if (!Uri.CheckSchemeName(value)) 125if (!Uri.CheckSchemeName(value)) 222: Uri.InternalEscapeString(value.Replace('\\', '/')); 259public Uri Uri 337var vsb = new ValueStringBuilder(stackalloc char[Uri.StackallocThreshold]); 348schemeDelimiter = host.Length == 0 ? ":" : Uri.SchemeDelimiter; 354? Uri.SchemeDelimiter
System\UriCreationOptions.cs (4)
7/// Options that control how a <seealso cref="Uri"/> is created and behaves. 16/// <see cref="Uri"/> instances created with this option do not support <see cref="Uri.Fragment"/>s. 17/// <see cref="Uri.GetComponents(UriComponents, UriFormat)"/> may not be used for <see cref="UriComponents.Path"/> or <see cref="UriComponents.Query"/>.
System\UriExt.cs (25)
223public static bool TryCreate([NotNullWhen(true), StringSyntax(StringSyntaxAttribute.Uri, "uriKind")] string? uriString, UriKind uriKind, [NotNullWhen(true)] out Uri? result) 230/// Creates a new <see cref="Uri"/> using the specified <see cref="string"/> instance and <see cref="UriCreationOptions"/>. 232/// <param name="uriString">The string representation of the <see cref="Uri"/>.</param> 233/// <param name="creationOptions">Options that control how the <seealso cref="Uri"/> is created and behaves.</param> 234/// <param name="result">The constructed <see cref="Uri"/>.</param> 235/// <returns><see langword="true"/> if the <see cref="Uri"/> was successfully created; otherwise, <see langword="false"/>.</returns> 236public static bool TryCreate([NotNullWhen(true), StringSyntax(StringSyntaxAttribute.Uri)] string? uriString, in UriCreationOptions creationOptions, [NotNullWhen(true)] out Uri? result) 242public static bool TryCreate(Uri? baseUri, string? relativeUri, [NotNullWhen(true)] out Uri? result) 244if (TryCreate(relativeUri, UriKind.RelativeOrAbsolute, out Uri? relativeLink)) 257public static bool TryCreate(Uri? baseUri, Uri? relativeUri, [NotNullWhen(true)] out Uri? result) 327public static int Compare(Uri? uri1, Uri? uri2, UriComponents partsToCompare, UriFormat compareFormat, 362Uri? result; 364if (!Uri.TryCreate(uriString, uriKind, out result)) 640internal static Uri? CreateHelper(string? uriString, bool dontEscape, UriKind uriKind, in UriCreationOptions creationOptions = default) 647Uri result = new(); 665internal static Uri? ResolveHelper(Uri baseUri, Uri? relativeUri, ref string? newUriString, ref bool userEscaped) 838public bool IsBaseOf(Uri uri) 852internal bool IsBaseOfHelper(Uri uriLink) 895private void CreateThisFromUri(Uri otherUri)
System\UriHelper.cs (8)
25var vsb = new ValueStringBuilder(stackalloc char[Uri.StackallocThreshold]); 159vsb = new ValueStringBuilder(stackalloc char[Uri.StackallocThreshold]); 218var vsb = new ValueStringBuilder(stackalloc char[Uri.StackallocThreshold]); 327if (unescaped == Uri.c_DummyChar) 375bool iriParsing = Uri.IriParsingStatic(syntax) 399if (ch == Uri.c_DummyChar) 506/// <para>If either char is not hex, returns <see cref="Uri.c_DummyChar"/>.</para> 516return Uri.c_DummyChar;
System\UriScheme.cs (15)
65protected virtual void InitializeAndValidate(Uri uri, out UriFormatException? parsingError) 77Debug.Assert(sizeof(Uri.Flags) == sizeof(ulong)); 80Uri.Flags previous = Interlocked.Or(ref uri._flags, Uri.Flags.CustomParser_ParseMinimalAlreadyCalled); 81if ((previous & Uri.Flags.CustomParser_ParseMinimalAlreadyCalled) != 0) 98protected virtual string? Resolve(Uri baseUri, Uri? relativeUri, out UriFormatException? parsingError) 110Uri? result = Uri.ResolveHelper(baseUri, relativeUri, ref newUriString, ref userEscaped); 118protected virtual bool IsBaseOf(Uri baseUri, Uri relativeUri) 135protected virtual string GetComponents(Uri uri, UriComponents components, UriFormat format) 155protected virtual bool IsWellFormedOriginalString(Uri uri) 173if (!Uri.CheckSchemeName(schemeName)) 190if (!Uri.CheckSchemeName(schemeName))
System\UriSyntax.cs (9)
260internal void InternalValidate(Uri thisUri, out UriFormatException? parsingError) 266Debug.Assert(sizeof(Uri.Flags) == sizeof(ulong)); 267Interlocked.Or(ref thisUri._flags, Uri.Flags.CustomParser_ParseMinimalAlreadyCalled); 270internal string? InternalResolve(Uri thisBaseUri, Uri uriLink, out UriFormatException? parsingError) 275internal bool InternalIsBaseOf(Uri thisBaseUri, Uri uriLink) 280internal string InternalGetComponents(Uri thisUri, UriComponents uriComponents, UriFormat uriFormat) 285internal bool InternalIsWellFormedOriginalString(Uri thisUri)
System.Private.Xml (147)
System\Xml\Core\IDtdParserAdapter.cs (1)
16Uri? BaseUri { get; }
System\Xml\Core\XmlReaderSettings.cs (1)
343internal XmlReader CreateReader(Stream input, Uri? baseUri, string? baseUriString, XmlParserContext? inputContext)
System\Xml\Core\XmlTextReaderImpl.cs (14)
125public Uri? inputbaseUri; 588Uri baseUri = uriResolver.ResolveUri(null, uriStr); 682internal XmlTextReaderImpl(Stream stream, byte[]? bytes, int byteCount, XmlReaderSettings settings, Uri? baseUri, string? baseUriStr, 2357internal Uri? DtdParserProxy_BaseUri 2829private void InitStreamInput(Uri? baseUri, Stream stream, Encoding? encoding) 2835private void InitStreamInput(Uri? baseUri, string baseUriStr, Stream stream, Encoding? encoding) 2840private void InitStreamInput(Uri? baseUri, string baseUriStr, Stream stream, byte[]? bytes, int byteCount, Encoding? encoding) 2915private void InitTextReaderInput(string baseUriStr, Uri? baseUri, TextReader input) 7905private void PushExternalEntityOrSubset(string? publicId, string? systemId, Uri? baseUri, string? entityName) 7907Uri uri; 7965private bool OpenAndPush(Uri uri) 8009Uri? entityBaseUri = null; 9515private static bool UriEqual(Uri? uri1, string? uri1Str, string? uri2Str, XmlResolver? resolver) 9524Uri uri2 = resolver.ResolveUri(null, uri2Str);
System\Xml\Core\XmlTextReaderImplAsync.cs (7)
860private Task InitStreamInputAsync(Uri baseUri, Stream stream, Encoding? encoding) 866private async Task InitStreamInputAsync(Uri? baseUri, string baseUriStr, Stream stream, byte[]? bytes, int byteCount, Encoding? encoding) 942private Task<int> InitTextReaderInputAsync(string baseUriStr, Uri? baseUri, TextReader input) 5100private async Task PushExternalEntityOrSubsetAsync(string? publicId, string? systemId, Uri? baseUri, string? entityName) 5102Uri uri; 5159private async Task<bool> OpenAndPushAsync(Uri uri) 5201Uri? entityBaseUri = null;
System\Xml\Core\XmlTextReaderImplHelpers.cs (2)
49internal Uri? baseUri; 189Uri? IDtdParserAdapter.BaseUri
System\Xml\IApplicationResourceStreamResolver.cs (1)
17Stream GetApplicationResourceStream(Uri relativeUri);
System\Xml\Resolvers\XmlPreloadedResolver.cs (14)
129private readonly Dictionary<Uri, PreloadedData> _mappings; 171public XmlPreloadedResolver(XmlResolver? fallbackResolver, XmlKnownDtds preloadedDtds, IEqualityComparer<Uri>? uriComparer) 174_mappings = new Dictionary<Uri, PreloadedData>(16, uriComparer); 191public override Uri ResolveUri(Uri? baseUri, string? relativeUri) 225public override object? GetEntity(Uri absoluteUri, string? role, Type? ofObjectToReturn) 262public override bool SupportsType(Uri absoluteUri, Type? type) 279public void Add(Uri uri, byte[] value) 287public void Add(Uri uri, byte[] value, int offset, int count) 299public void Add(Uri uri, Stream value) 321public void Add(Uri uri, string value) 329public IEnumerable<Uri> PreloadedUris 338public void Remove(Uri uri) 347private void Add(Uri uri, PreloadedData data)
System\Xml\Resolvers\XmlPreloadedResolverAsync.cs (1)
14public override Task<object> GetEntityAsync(Uri absoluteUri,
System\Xml\Schema\BaseValidator.cs (2)
23private Uri? _baseUri; 106public Uri? BaseUri
System\Xml\Schema\Chameleonkey.cs (1)
17internal Uri chameleonLocation;
System\Xml\Schema\DataTypeImplementation.cs (5)
2583public override Type ValueType { get { return typeof(Uri); } } 2592internal override Type ListValueType { get { return typeof(Uri[]); } } 2611return ((Uri)value1).Equals((Uri)value2) ? 0 : -1; 2623Uri? uri;
System\Xml\Schema\DtdParser.cs (7)
259Uri? baseUri = readerAdapter.BaseUri; 315Uri? baseUriOb = _readerAdapter.BaseUri; 506Uri? baseUri = _readerAdapter.BaseUri; 3440Uri? tmp = _readerAdapter.BaseUri; 3460Uri? baseUri = _readerAdapter.BaseUri; 3468Uri? baseUri = _readerAdapter.BaseUri; 3475Uri? baseUri = _readerAdapter.BaseUri;
System\Xml\Schema\DtdParserAsync.cs (1)
150Uri? baseUri = _readerAdapter.BaseUri;
System\Xml\Schema\FacetChecker.cs (1)
1414if (value.Equals(((Uri)enumeration[i]!).OriginalString))
System\Xml\Schema\Preprocessor.cs (4)
268Uri? includeLocation = null; 286Uri? ruri = null; 2122private Uri? ResolveSchemaLocationUri(XmlSchema enclosingSchema, string location) 2132private object? GetSchemaEntity(Uri ruri)
System\Xml\Schema\SchemaCollectionpreProcessor.cs (5)
138Uri? includeLocation = null; 174Uri? subUri; 216Uri? ruri = ResolveSchemaLocationUri(schema, schemaLocation); 1791private Uri? ResolveSchemaLocationUri(XmlSchema enclosingSchema, string location) 1803private Stream? GetSchemaEntity(Uri ruri)
System\Xml\Schema\XdrBuilder.cs (2)
519Uri _baseUri = _xmlResolver.ResolveUri(null, _reader.BaseURI); 523Uri ruri = _xmlResolver.ResolveUri(_baseUri, uri.Substring(x_schema.Length));
System\Xml\Schema\XdrValidator.cs (1)
344Uri ruri = this.XmlResolver!.ResolveUri(BaseUri, url);
System\Xml\Schema\XmlSchema.cs (2)
45private Uri? _baseUri; 369internal Uri? BaseUri
System\Xml\Schema\XmlSchemaExternal.cs (2)
13private Uri? _baseUri; 48internal Uri? BaseUri
System\Xml\Schema\XmlSchemaSet.cs (6)
224Uri tempSchemaUri = tempResolver.ResolveUri(null, schemaUri); 264Uri schemaUri = new Uri(schemaDocument.BaseURI!, UriKind.RelativeOrAbsolute); 831internal XmlSchema? FindSchemaByNSAndUrl(Uri? schemaUri, string ns, DictionaryEntry[]? locationsTable) 1098Uri? baseUri; 1226internal bool IsSchemaLoaded(Uri schemaUri, string? targetNamespace, out XmlSchema? schema) 1265internal bool GetSchemaByUri(Uri schemaUri, [NotNullWhen(true)] out XmlSchema? schema)
System\Xml\Schema\XmlSchemaValidator.cs (3)
119private Uri? _sourceUri; 281public Uri? SourceUri 1851Uri ruri = _xmlResolver.ResolveUri(_sourceUri, url);
System\Xml\Schema\XmlValueConverter.cs (6)
326protected static readonly Type UriType = typeof(Uri); 671protected static string AnyUriToString(Uri value) 1734if (IsDerivedFrom(sourceType, UriType)) if (TypeCode == XmlTypeCode.AnyUri) return AnyUriToString((Uri)value); 1870if (IsDerivedFrom(sourceType, UriType)) if (TypeCode == XmlTypeCode.AnyUri) return ((Uri)value); 2256if (IsDerivedFrom(sourceType, UriType)) return AnyUriToString((Uri)value); 2999if (itemTypeDst == UriType) return ToArray<Uri>(value, nsResolver);
System\Xml\Schema\XsdValidator.cs (1)
577Uri ruri = this.XmlResolver!.ResolveUri(BaseUri, url);
System\Xml\Serialization\XmlSchemas.cs (1)
96public int Add(XmlSchema schema, Uri? baseUri)
System\Xml\XmlConvert.cs (5)
1306internal static Uri ToUri(string? s) 1318Uri? uri; 1319if (!Uri.TryCreate(s, UriKind.RelativeOrAbsolute, out uri)) 1327internal static Exception? TryToUri(string s, out Uri? result) 1339if (!Uri.TryCreate(s, UriKind.RelativeOrAbsolute, out result))
System\Xml\XmlDownloadManager.cs (4)
13internal static Stream GetStream(Uri uri, ICredentials? credentials, IWebProxy? proxy) 27internal static Task<Stream> GetStreamAsync(Uri uri, ICredentials? credentials, IWebProxy? proxy) 31Uri fileUri = uri; 40private static async Task<Stream> GetNonFileStreamAsync(Uri uri, ICredentials? credentials, IWebProxy? proxy)
System\Xml\XmlResolver.cs (6)
27public abstract object? GetEntity(Uri absoluteUri, 31public virtual Task<object> GetEntityAsync(Uri absoluteUri, 41public virtual Uri ResolveUri(Uri? baseUri, string? relativeUri) 45Uri uri = new Uri(relativeUri!, UriKind.RelativeOrAbsolute); 79public virtual bool SupportsType(Uri absoluteUri, Type? type)
System\Xml\XmlResolver.FileSystemResolver.cs (2)
31public override object? GetEntity(Uri absoluteUri, string? role, Type? ofObjectToReturn) 42public override Task<object> GetEntityAsync(Uri absoluteUri, string? role, Type? ofObjectToReturn)
System\Xml\XmlResolver.ThrowingResolver.cs (2)
40public override object GetEntity(Uri absoluteUri, string? role, Type? ofObjectToReturn) 45public override Task<object> GetEntityAsync(Uri absoluteUri, string? role, Type? ofObjectToReturn)
System\Xml\XmlSecureResolver.cs (4)
24public override object? GetEntity(Uri absoluteUri, string? role, Type? ofObjectToReturn) => XmlResolver.ThrowingResolver.GetEntity(absoluteUri, role, ofObjectToReturn); 27public override Task<object> GetEntityAsync(Uri absoluteUri, string? role, Type? ofObjectToReturn) => XmlResolver.ThrowingResolver.GetEntityAsync(absoluteUri, role, ofObjectToReturn); 31public override Uri ResolveUri(Uri? baseUri, string? relativeUri) => base.ResolveUri(baseUri, relativeUri);
System\Xml\XmlUrlResolver.cs (4)
39public override object? GetEntity(Uri absoluteUri, string? role, Type? ofObjectToReturn) 50public override async Task<object> GetEntityAsync(Uri absoluteUri, string? role, Type? ofObjectToReturn) 60public override Uri ResolveUri(Uri? baseUri, string? relativeUri) =>
System\Xml\Xsl\Runtime\XmlCollation.cs (2)
163Uri? collationUri; 173if (!Uri.TryCreate(collationLiteral, UriKind.Absolute, out collationUri))
System\Xml\Xsl\Runtime\XmlQueryContext.cs (2)
121Uri? uriResolvedBase, uriResolved; 165private XPathNavigator? ConstructDocument(object dataSource, string? uriRelative, Uri? uriResolved)
System\Xml\Xsl\SourceLineInfo.cs (2)
85Uri? uri; 88System.Uri.TryCreate(uriString, UriKind.Absolute, out uri) &&
System\Xml\Xsl\Xslt\Stylesheet.cs (2)
29public List<Uri> ImportHrefs = new List<Uri>();
System\Xml\Xsl\Xslt\XsltLoader.cs (9)
75Uri resolvedUri = origResolver.ResolveUri(null, uri); 189private Uri ResolveUri(string relativeUri, string baseUri) 191Uri? resolvedBaseUri = (baseUri.Length != 0) ? _xmlResolver.ResolveUri(null, baseUri) : null; 192Uri resolvedUri = _xmlResolver.ResolveUri(resolvedBaseUri, relativeUri); 200private XmlReader CreateReader(Uri uri, XmlResolver xmlResolver) 225private Stylesheet LoadStylesheet(Uri uri, bool include) 254List<Uri> importHrefs = _curStylesheet.ImportHrefs; 487Uri uri = ResolveUri(_input.Value, _input.BaseUri!); 515Uri uri = ResolveUri(_input.Value, _input.BaseUri!);
System\Xml\Xsl\XsltOld\Compiler.cs (3)
566internal Uri ResolveUri(string relativeUri) 570Uri uri = _xmlResolver.ResolveUri((baseUri.Length != 0) ? _xmlResolver.ResolveUri(null, baseUri) : null, relativeUri); 578internal NavigatorInput ResolveDocument(Uri absoluteUri)
System\Xml\Xsl\XsltOld\ContainerAction.cs (5)
196internal Stylesheet CompileImport(Compiler compiler, Uri uri, int id) 229Uri? uri = imports[i] as Uri; 240Uri uri = compiler.ResolveUri(compiler.GetSingleAttribute(compiler.Input.Atoms.Href)); 520Uri uri = compiler.ResolveUri(compiler.GetSingleAttribute(compiler.Input.Atoms.Href));
System\Xml\Xsl\XsltOld\Processor.cs (1)
160internal XPathNavigator GetNavigator(Uri ruri)
System\Xml\Xsl\XsltOld\XsltCompileContext.cs (3)
253private Uri ComposeUri(string thisUri, string baseUri) 257Uri? uriBase = null; 274Uri uri = ComposeUri(it.Current!.Value, baseUri ?? it.Current.BaseURI);
System.Runtime (1)
src\runtime\artifacts\obj\System.Runtime\Release\net11.0\System.Runtime.Forwards.cs (1)
896[assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Uri))]
System.Runtime.Serialization.Schema (3)
System\Runtime\Serialization\Schema\CodeExporter.cs (2)
1539if (Uri.TryCreate(dataContractNamespace, UriKind.RelativeOrAbsolute, out Uri? uri))
System\Runtime\Serialization\Schema\ImportGlobals.cs (1)
87internal static Uri DataContractXsdBaseNamespaceUri => field ??= new Uri(DataContractXsdBaseNamespace);
System.Security.Cryptography (14)
src\runtime\src\libraries\Common\src\System\Net\Http\X509ResourceClient.cs (11)
26static partial void ReportRedirected(Uri newUri); 27static partial void ReportRedirectNotFollowed(Uri redirectUri); 118private static extern Uri? GetRequestUri([UnsafeAccessorType(HttpRequestMessageTypeName)] object requestMessage); 120private static extern void SetRequestUri([UnsafeAccessorType(HttpRequestMessageTypeName)] object requestMessage, Uri? value); 146private static extern Uri? GetLocation([UnsafeAccessorType(HttpResponseHeadersTypeName)] object headers); 184Uri uri = new Uri(uriString); 207Uri? redirectUri; 213Uri? location = GetLocation(responseHeaders); 274private static Uri? GetUriForRedirect(Uri requestUri, int statusCode, Uri? location, out bool hasRedirect)
System\Security\Cryptography\X509Certificates\SubjectAlternativeNameBuilder.cs (1)
36public void AddUri(Uri uri)
System\Security\Cryptography\X509Certificates\X509Certificate2.cs (2)
1707/// <seealso cref="Uri.CheckHostName"/> 1715UriHostNameType kind = Uri.CheckHostName(hostname);
System.ServiceModel.Federation (2)
System\ServiceModel\Federation\WSTrustChannelFactory.cs (2)
44/// <param name="via">The <see cref="Uri" /> that address that the channel uses to send messages.</param> 46public override IWSTrustChannelContract CreateChannel(EndpointAddress endpointAddress, Uri via)
System.ServiceModel.Http (48)
System\ServiceModel\Channels\ClientWebSocketTransportDuplexSessionChannel.cs (2)
30public ClientWebSocketTransportDuplexSessionChannel(HttpChannelFactory<IDuplexSessionChannel> channelFactory, EndpointAddress remoteAddress, Uri via) 217Uri credentialCacheUriPrefix = _channelFactory.GetCredentialCacheUriPrefix(Via);
System\ServiceModel\Channels\HttpChannelFactory.cs (29)
35private volatile MruCache<Uri, Uri> _credentialCacheUriPrefixCache; 218internal Uri GetCredentialCacheUriPrefix(Uri via) 220Uri result; 228_credentialCacheUriPrefixCache = new MruCache<Uri, Uri>(10); 245internal async Task<HttpClient> GetHttpClientAsync(EndpointAddress to, Uri via, 322Uri credentialCacheUriPrefix = GetCredentialCacheUriPrefix(via); 433internal Exception CreateToMustEqualViaException(Uri to, Uri via) 445EndpointAddress target, Uri via, ChannelParameterCollection channelParameters) 480protected virtual void ValidateCreateChannelParameters(EndpointAddress remoteAddress, Uri via) 493protected override TChannel OnCreateChannel(EndpointAddress remoteAddress, Uri via) 506protected virtual TChannel OnCreateChannelCore(EndpointAddress remoteAddress, Uri via) 686internal HttpRequestMessage GetHttpRequestMessage(Uri via) 688Uri httpRequestUri = via; 700private void ApplyManualAddressing(ref EndpointAddress to, ref Uri via, Message message) 704Uri toHeader = message.Headers.To; 742private async Task<(SecurityTokenProviderContainer tokenProvider, SecurityTokenProviderContainer proxyTokenProvider)> CreateAndOpenTokenProvidersCoreAsync(EndpointAddress to, Uri via, ChannelParameterCollection channelParameters, TimeSpan timeout) 759internal Task<(SecurityTokenProviderContainer tokenProvider, SecurityTokenProviderContainer proxyTokenProvider)> CreateAndOpenTokenProvidersAsync(EndpointAddress to, Uri via, ChannelParameterCollection channelParameters, TimeSpan timeout) 792public HttpClientRequestChannel(HttpChannelFactory<IRequestChannel> factory, EndpointAddress to, Uri via, bool manualAddressing) 913internal virtual Task<HttpClient> GetHttpClientAsync(EndpointAddress to, Uri via, TimeoutHelper timeoutHelper) 918protected async Task<HttpClient> GetHttpClientAsync(EndpointAddress to, Uri via, SecurityTokenContainer clientCertificateToken, TimeoutHelper timeoutHelper) 948internal HttpRequestMessage GetHttpRequestMessage(Uri via) 975private Uri _via; 1346var requestUri = _httpRequestMessage.RequestUri; 1364private Uri _address; 1367public WebProxyFactory(Uri address, bool bypassOnLocal, AuthenticationSchemes authenticationScheme)
System\ServiceModel\Channels\HttpsChannelFactory.cs (6)
67protected override void ValidateCreateChannelParameters(EndpointAddress remoteAddress, Uri via) 106protected override TChannel OnCreateChannelCore(EndpointAddress address, Uri via) 153internal async Task<SecurityTokenProvider> CreateAndOpenCertificateTokenProviderAsync(EndpointAddress target, Uri via, ChannelParameterCollection channelParameters, TimeSpan timeout) 167EndpointAddress to, Uri via, ChannelParameterCollection channelParameters, TimeoutHelper timeoutHelper) 313public HttpsClientRequestChannel(HttpsChannelFactory<IRequestChannel> factory, EndpointAddress to, Uri via, bool manualAddressing) 391internal override async Task<HttpClient> GetHttpClientAsync(EndpointAddress to, Uri via, TimeoutHelper timeoutHelper)
System\ServiceModel\Channels\HttpTransportBindingElement.cs (1)
161public Uri ProxyAddress { get; set; }
System\ServiceModel\Channels\HttpTransportDefaults.cs (1)
18internal const Uri ProxyAddress = null;
System\ServiceModel\Channels\TransportDuplexSessionChannel.cs (3)
19private Uri _localVia; 26Uri localVia, 28Uri via)
System\ServiceModel\Channels\WebSocketHelper.cs (3)
48internal static bool IsWebSocketUri(Uri uri) 55internal static Uri NormalizeHttpSchemeWithWsScheme(Uri uri)
System\ServiceModel\Channels\WebSocketTransportDuplexSessionChannel.cs (1)
27public WebSocketTransportDuplexSessionChannel(HttpChannelFactory<IDuplexSessionChannel> channelFactory, EndpointAddress remoteAddress, Uri via)
System\ServiceModel\HttpBindingBase.cs (1)
111public Uri ProxyAddress
System\ServiceModel\WSHttpBindingBase.cs (1)
85public Uri ProxyAddress
System.ServiceModel.NetFramingBase (54)
System\ServiceModel\Channels\AddressingVersionExtensions.cs (2)
14public static Uri AnonymousUri(this AddressingVersion thisPtr) 27public static Uri NoneUri(this AddressingVersion thisPtr)
System\ServiceModel\Channels\BufferedConnection.cs (1)
253public async ValueTask<IConnection> ConnectAsync(Uri uri, TimeSpan timeout)
System\ServiceModel\Channels\Connection.cs (1)
25ValueTask<IConnection> ConnectAsync(Uri uri, TimeSpan timeout);
System\ServiceModel\Channels\ConnectionPool.cs (13)
45protected abstract TKey GetPoolKey(EndpointAddress address, Uri via); 201public TItem TakeConnection(EndpointAddress address, Uri via, TimeSpan timeout, out TKey key) 662protected override string GetPoolKey(EndpointAddress address, Uri via) 682readonly Dictionary<Uri, string> _forwardTable = new Dictionary<Uri, string>(); 683readonly Dictionary<string, ICollection<Uri>> _reverseTable = new Dictionary<string, ICollection<Uri>>(); 685public void Add(Uri uri, string pipeName) 689ICollection<Uri> uris; 692uris = new Collection<Uri>(); 706ICollection<Uri> uris; 710foreach (Uri uri in uris) 717public bool TryGetValue(Uri uri, out string pipeName)
System\ServiceModel\Channels\ConnectionPoolHelper.cs (2)
16private Uri _via; 31public ConnectionPoolHelper(ConnectionPool connectionPool, IConnectionInitiator connectionInitiator, Uri via)
System\ServiceModel\Channels\FramingChannels.cs (6)
22EndpointAddress localAddress, Uri localVia, EndpointAddress remoteAddress, Uri via) 28EndpointAddress remoteAddress, Uri via) 153EndpointAddress remoteAddress, Uri via, IConnectionInitiator connectionInitiator, ConnectionPool connectionPool) 375Uri via, string contentType, TimeSpan timeout) 459public static bool ValidatePreambleResponse(byte[] buffer, int count, ClientFramingDecoder decoder, Uri via)
System\ServiceModel\Channels\FramingDecoders.cs (2)
213private Uri _via; 240public Uri ValueAsUri
System\ServiceModel\Channels\ITransportFactorySettings.cs (1)
24string GetConnectionPoolKey(EndpointAddress address, Uri via);
System\ServiceModel\Channels\NetFramingTransportChannelFactory.cs (4)
220protected override TChannel OnCreateChannel(EndpointAddress address, Uri via) 367internal void ValidateScheme(Uri via) 380protected abstract string GetConnectionPoolKey(EndpointAddress address, Uri via); 390string IConnectionOrientedTransportChannelFactorySettings.GetConnectionPoolKey(EndpointAddress address, Uri via) => GetConnectionPoolKey(address, via);
System\ServiceModel\Channels\OutputChannel.cs (1)
19public abstract Uri Via { get; }
System\ServiceModel\Channels\SingletonConnectionReader.cs (2)
25private Uri _via; 29IConnectionOrientedTransportFactorySettings transportSettings, Uri via)
System\ServiceModel\Channels\SslStreamSecurityUpgradeProvider.cs (3)
140public override StreamUpgradeInitiator CreateUpgradeInitiator(EndpointAddress remoteAddress, Uri via) 264EndpointAddress remoteAddress, Uri via) 419private static void EnsureOutgoingIdentity(IdentityVerifier verifier, EndpointAddress serviceReference, Uri via, AuthorizationContext authorizationContext)
System\ServiceModel\Channels\StreamedFramingRequestChannel.cs (1)
23EndpointAddress remoteAddress, Uri via, IConnectionInitiator connectionInitiator, ConnectionPool connectionPool)
System\ServiceModel\Channels\StreamSecurityUpgradeInitiatorBase.cs (2)
17protected StreamSecurityUpgradeInitiatorBase(string upgradeString, EndpointAddress remoteAddress, Uri via) 26protected Uri Via { get; }
System\ServiceModel\Channels\StreamUpgradeProvider.cs (1)
47public abstract StreamUpgradeInitiator CreateUpgradeInitiator(EndpointAddress remoteAddress, Uri via);
System\ServiceModel\Channels\TransportDuplexSessionChannel.cs (3)
20private Uri _localVia; 27Uri localVia, 29Uri via)
System\ServiceModel\Channels\TransportSecurityHelpers.cs (6)
69internal static SecurityTokenRequirement CreateSspiTokenRequirement(EndpointAddress target, Uri via, string transportScheme) 81SecurityTokenManager tokenManager, EndpointAddress target, Uri via, string transportScheme) 98public static Uri GetListenUri(Uri baseAddress, string relativeAddress) 100Uri fullUri = baseAddress; 120private static void FixIpv6Hostname(UriBuilder uriBuilder, Uri originalUri)
System\ServiceModel\Channels\WindowsStreamSecurityUpgradeProvider.cs (3)
55public override StreamUpgradeInitiator CreateUpgradeInitiator(EndpointAddress remoteAddress, Uri via) 122WindowsStreamSecurityUpgradeProvider parent, EndpointAddress remoteAddress, Uri via) 221private static void AdjustAddress(ref EndpointAddress reference, Uri via)
System.ServiceModel.NetNamedPipe (18)
System\ServiceModel\Channels\NamedPipeChannelFactory.cs (2)
22get { return Uri.UriSchemeNetPipe; } 35protected override string GetConnectionPoolKey(EndpointAddress address, Uri via)
System\ServiceModel\Channels\NamedPipeTransportBindingElement.cs (1)
46get { return Uri.UriSchemeNetPipe; }
System\ServiceModel\Channels\PipeConnectionInitiator.cs (15)
31private Exception CreateConnectFailedException(Uri remoteUri, PipeException innerException) 37public async ValueTask<IConnection> ConnectAsync(Uri remoteUri, TimeSpan timeout) 70internal static string GetPipeName(Uri uri) 144private void PrepareConnect(Uri remoteUri, TimeSpan timeout, out string resolvedAddress, out BackoffTimeoutHelper backoffHelper) 168private IConnection TryConnect(Uri remoteUri, string resolvedAddress, BackoffTimeoutHelper backoffHelper) 251private readonly Uri _pipeUri; 253private PipeSharedMemory(MemoryMappedFile fileMapping, Uri pipeUri) 258private PipeSharedMemory(MemoryMappedFile fileMapping, Uri pipeUri, string pipeName) 265public static PipeSharedMemory Open(string sharedMemoryName, Uri pipeUri) 319private static Exception CreatePipeNameCannotBeAccessedException(IOException ioe, Uri pipeUri) 351builder.Append(Uri.UriSchemeNetPipe); 385builder.Append(Uri.UriSchemeNetPipe); 406public static string GetPath(Uri uri) 423public static void Validate(Uri uri) 425if (uri.Scheme != Uri.UriSchemeNetPipe)
System.ServiceModel.NetTcp (6)
System\ServiceModel\Channels\DnsCache.cs (1)
54public static async Task<IPAddress[]> ResolveAsync(Uri uri)
System\ServiceModel\Channels\SocketConnection.cs (4)
825public static Exception ConvertConnectException(SocketException socketException, Uri remoteUri, TimeSpan timeSpent, Exception innerException) 872private static async Task<IPAddress[]> GetIPAddressesAsync(Uri uri) 914private static TimeoutException CreateTimeoutException(Uri uri, TimeSpan timeout, IPAddress[] addresses, int invalidAddressCount, 937public async ValueTask<IConnection> ConnectAsync(Uri uri, TimeSpan timeout)
System\ServiceModel\Channels\TcpChannelFactory.cs (1)
32protected override string GetConnectionPoolKey(EndpointAddress address, Uri via)
System.ServiceModel.Primitives (225)
Internals\System\Xml\XmlMtomReader.cs (1)
410contentID = string.Format(CultureInfo.InvariantCulture, "<{0}>", Uri.UnescapeDataString(uri.Substring(MimeGlobals.ContentIDScheme.Length)));
System\IdentityModel\Claims\Claim.cs (1)
189public static Claim CreateUriClaim(Uri uri)
System\ServiceModel\ChannelFactory.cs (3)
461public virtual TChannel CreateChannel(EndpointAddress address, Uri via) 490internal UChannel CreateChannel<UChannel>(EndpointAddress address, Uri via) 563public static TChannel CreateChannel(Binding binding, EndpointAddress endpointAddress, Uri via)
System\ServiceModel\Channels\Addressing.cs (14)
363protected ToHeader(Uri to, AddressingVersion version) 405public Uri To { get; } 407public static ToHeader Create(Uri toUri, XmlDictionaryString dictionaryTo, AddressingVersion addressingVersion) 431public static ToHeader Create(Uri to, AddressingVersion addressingVersion) 459public static Uri ReadHeaderValue(XmlDictionaryReader reader, AddressingVersion version) 464public static Uri ReadHeaderValue(XmlDictionaryReader reader, AddressingVersion version, UriCache uriCache) 486Uri to = ReadHeaderValue(reader, version, uriCache); 533public DictionaryToHeader(Uri to, XmlDictionaryString dictionaryTo, AddressingVersion version) 551public FullToHeader(Uri to, string actor, bool mustUnderstand, bool relay, AddressingVersion version) 794internal static readonly Uri ReplyRelationshipType = new Uri(Addressing10Strings.ReplyRelationship); 814public virtual Uri RelationshipType 834public static RelatesToHeader Create(UniqueId messageId, AddressingVersion addressingVersion, Uri relationshipType) 866public static void ReadHeaderValue(XmlDictionaryReader reader, AddressingVersion version, out Uri relationshipType, out UniqueId messageId) 891Uri relationship;
System\ServiceModel\Channels\AddressingVersion.cs (3)
14private Uri _noneUri; 118internal Uri AnonymousUri { get; } 120internal Uri NoneUri
System\ServiceModel\Channels\BindingContext.cs (1)
47public Uri ListenUriBaseAddress { get; set; }
System\ServiceModel\Channels\ChannelFactoryBase.cs (3)
118public TChannel CreateChannel(EndpointAddress address, Uri via) 133private TChannel InternalCreateChannel(EndpointAddress address, Uri via) 156protected abstract TChannel OnCreateChannel(EndpointAddress address, Uri via);
System\ServiceModel\Channels\ClientReliableChannelBinder.cs (9)
20protected ClientReliableChannelBinder(EndpointAddress to, Uri via, IChannelFactory<TChannel> factory, 76public Uri Via { get; } 78public static IClientReliableChannelBinder CreateBinder(EndpointAddress to, Uri via, 227public DuplexClientReliableChannelBinder(EndpointAddress to, Uri via, 311public DuplexClientReliableChannelBinder(EndpointAddress to, Uri via, 342public DuplexSessionClientReliableChannelBinder(EndpointAddress to, Uri via, 386public RequestClientReliableChannelBinder(EndpointAddress to, Uri via, 488public RequestClientReliableChannelBinder(EndpointAddress to, Uri via, 519public RequestSessionClientReliableChannelBinder(EndpointAddress to, Uri via,
System\ServiceModel\Channels\ClientReliableDuplexSessionChannel.cs (1)
52public override Uri Via => RemoteAddress.Uri;
System\ServiceModel\Channels\DuplexChannel.cs (1)
19public abstract Uri Via { get; }
System\ServiceModel\Channels\IChannelFactory.cs (1)
17TChannel CreateChannel(EndpointAddress to, Uri via);
System\ServiceModel\Channels\IChannelListener.cs (1)
10Uri Uri { get; }
System\ServiceModel\Channels\IOutputChannel.cs (1)
13Uri Via { get; }
System\ServiceModel\Channels\IReliableChannelBinder.cs (1)
44Uri Via { get; }
System\ServiceModel\Channels\IRequestChannel.cs (1)
13Uri Via { get; }
System\ServiceModel\Channels\LayeredChannelFactory.cs (1)
261public Uri Via
System\ServiceModel\Channels\Message.cs (7)
2220public Uri CreateUri(string uriString) 2222Uri uri = Get(uriString); 2231private Uri Get(string key) 2249private void Set(string key, Uri value) 2269private Uri _value; 2271public Entry(string key, Uri value) 2279public Uri Value
System\ServiceModel\Channels\MessageBuffer.cs (1)
61private Uri _to;
System\ServiceModel\Channels\MessageHeaders.cs (7)
345public Uri To 817private int FindRelatesTo(Uri relationshipType, out UniqueId messageId) 825Uri tempRelationship; 1128internal UniqueId GetRelatesTo(Uri relationshipType) 1140private void GetRelatesToValues(int index, out Uri relationshipType, out UniqueId messageId) 1678internal void SetRelatesTo(Uri relationshipType, UniqueId messageId) 1698private void SetRelatesTo(Uri relationshipType, RelatesToHeader relatesToHeader)
System\ServiceModel\Channels\MessageProperties.cs (3)
18private Uri _via; 306public Uri Via 753Via = (Uri)value;
System\ServiceModel\Channels\OutputChannel.cs (1)
19public abstract Uri Via { get; }
System\ServiceModel\Channels\ReliableChannelFactory.cs (1)
111protected override TChannel OnCreateChannel(EndpointAddress address, Uri via)
System\ServiceModel\Channels\ReliableOutputSessionChannel.cs (1)
87public override Uri Via
System\ServiceModel\Channels\RequestChannel.cs (2)
21protected RequestChannel(ChannelManagerBase channelFactory, EndpointAddress to, Uri via, bool manualAddressing) 41public Uri Via { get; }
System\ServiceModel\Channels\SecurityChannelFactory.cs (9)
140protected override TChannel OnCreateChannel(EndpointAddress address, Uri via) 252UChannel innerChannel, EndpointAddress to, Uri via) 265public Uri Via { get; } 337public SecurityOutputChannel(ChannelManagerBase factory, SecurityProtocolFactory securityProtocolFactory, IOutputChannel innerChannel, EndpointAddress to, Uri via) 391public SecurityOutputSessionChannel(ChannelManagerBase factory, SecurityProtocolFactory securityProtocolFactory, IOutputSessionChannel innerChannel, EndpointAddress to, Uri via) 407public SecurityRequestChannel(ChannelManagerBase factory, SecurityProtocolFactory securityProtocolFactory, IRequestChannel innerChannel, EndpointAddress to, Uri via) 490public SecurityRequestSessionChannel(ChannelManagerBase factory, SecurityProtocolFactory securityProtocolFactory, IRequestSessionChannel innerChannel, EndpointAddress to, Uri via) 506public SecurityDuplexChannel(ChannelManagerBase factory, SecurityProtocolFactory securityProtocolFactory, IDuplexChannel innerChannel, EndpointAddress to, Uri via) 671public SecurityDuplexSessionChannel(ChannelManagerBase factory, SecurityProtocolFactory securityProtocolFactory, IDuplexSessionChannel innerChannel, EndpointAddress to, Uri via)
System\ServiceModel\Channels\ServiceChannel.cs (3)
239public Uri ListenUri 349public Uri Via 575Uri localUri = localAddress.Uri;
System\ServiceModel\Channels\ServiceChannelFactory.cs (9)
309public virtual ServiceChannel CreateServiceChannel(EndpointAddress address, Uri via) 331public TChannel CreateChannel<TChannel>(EndpointAddress address, Uri via) 417protected abstract IChannelBinder CreateInnerChannelBinder(EndpointAddress address, Uri via); 518protected override IChannelBinder CreateInnerChannelBinder(EndpointAddress to, Uri via) 537protected override IChannelBinder CreateInnerChannelBinder(EndpointAddress to, Uri via) 557protected override IChannelBinder CreateInnerChannelBinder(EndpointAddress to, Uri via) 578protected override IChannelBinder CreateInnerChannelBinder(EndpointAddress to, Uri via) 607protected override IChannelBinder CreateInnerChannelBinder(EndpointAddress to, Uri via) 633protected override IChannelBinder CreateInnerChannelBinder(EndpointAddress to, Uri via)
System\ServiceModel\Channels\ServiceChannelProxy.cs (4)
645Uri IClientChannel.Via 725Uri IOutputChannel.Via 815Uri IRequestChannel.Via 820Uri IServiceChannel.ListenUri
System\ServiceModel\Channels\TransportChannelFactory.cs (1)
159public void ValidateScheme(Uri via)
System\ServiceModel\Channels\TransportOutputChannel.cs (4)
15private Uri _via; 18protected TransportOutputChannel(ChannelManagerBase channelManager, EndpointAddress to, Uri via, bool manualAddressing, MessageVersion messageVersion) 28Uri toUri; 69public override Uri Via
System\ServiceModel\Channels\TransportSecurityHelpers.cs (6)
65internal static SecurityTokenRequirement CreateSspiTokenRequirement(EndpointAddress target, Uri via, string transportScheme) 77SecurityTokenManager tokenManager, EndpointAddress target, Uri via, string transportScheme, AuthenticationSchemes authenticationScheme, ChannelParameterCollection channelParameters) 94SecurityTokenManager tokenManager, EndpointAddress target, Uri via, 117SecurityTokenManager tokenManager, EndpointAddress target, Uri via, string transportScheme, ChannelParameterCollection channelParameters) 171SecurityTokenManager tokenManager, EndpointAddress target, Uri via, string transportScheme, AuthenticationSchemes authenticationScheme, 189EndpointAddress target, Uri via, string transportScheme)
System\ServiceModel\Channels\WsrmMessageInfo.cs (1)
695public Uri To { get; private set; }
System\ServiceModel\ClientBase.cs (3)
990Uri IClientChannel.Via 1158Uri IOutputChannel.Via 1193Uri IRequestChannel.Via
System\ServiceModel\Description\DispatcherBuilder.cs (2)
54public ListenUriInfo(Uri listenUri, ListenUriMode listenUriMode) 60public Uri ListenUri { get; }
System\ServiceModel\Description\MetadataLocation.cs (2)
32Uri uri; 33if (!Uri.TryCreate(value, UriKind.RelativeOrAbsolute, out uri))
System\ServiceModel\Description\ServiceEndpoint.cs (4)
20private Uri _listenUri; 99public Uri ListenUri 155internal Uri UnresolvedAddress 161internal Uri UnresolvedListenUri
System\ServiceModel\Description\ServiceEndpointCollection.cs (1)
102public ServiceEndpoint Find(Uri address)
System\ServiceModel\Description\ServiceReflector.cs (5)
32if (Uri.IsWellFormedUriString(path, UriKind.Absolute) || path == String.Empty) 156Uri uri; 157if (!Uri.TryCreate(ns, UriKind.RelativeOrAbsolute, out uri)) 165Uri uri; 166if (!Uri.TryCreate(ns, UriKind.RelativeOrAbsolute, out uri))
System\ServiceModel\Dispatcher\BufferedReceiveBinder.cs (1)
37public Uri ListenUri
System\ServiceModel\Dispatcher\ClientRuntime.cs (2)
61private Uri _via; 171public Uri Via
System\ServiceModel\Dispatcher\DuplexChannelBinder.cs (4)
39internal DuplexChannelBinder(IDuplexChannel channel, IRequestReplyCorrelator correlator, Uri listenUri) 45internal DuplexChannelBinder(IDuplexSessionChannel channel, IRequestReplyCorrelator correlator, Uri listenUri) 108public Uri ListenUri { get; } 1087public Uri Via
System\ServiceModel\Dispatcher\EndpointDispatcher.cs (1)
12private Uri _listenUri;
System\ServiceModel\Dispatcher\IChannelBinder.cs (1)
14Uri ListenUri { get; }
System\ServiceModel\Dispatcher\InputChannelBinder.cs (2)
16internal InputChannelBinder(IInputChannel channel, Uri listenUri) 37public Uri ListenUri { get; }
System\ServiceModel\Dispatcher\OutputChannelBinder.cs (1)
36public Uri ListenUri
System\ServiceModel\Dispatcher\ReplyChannelBinder.cs (2)
16internal ReplyChannelBinder(IReplyChannel channel, Uri listenUri) 37public Uri ListenUri { get; }
System\ServiceModel\Dispatcher\RequestChannelBinder.cs (1)
35public Uri ListenUri
System\ServiceModel\DuplexChannelFactory.cs (4)
160public override TChannel CreateChannel(EndpointAddress address, Uri via) 165public virtual TChannel CreateChannel(InstanceContext callbackInstance, EndpointAddress address, Uri via) 227public static TChannel CreateChannel(object callbackObject, Binding binding, EndpointAddress endpointAddress, Uri via) 240public static TChannel CreateChannel(InstanceContext callbackInstance, Binding binding, EndpointAddress endpointAddress, Uri via)
System\ServiceModel\EndpointAddress.cs (29)
16private static Uri s_anonymousUri; 17private static Uri s_noneUri; 82private EndpointAddress(AddressingVersion version, Uri uri, EndpointIdentity identity, AddressHeaderCollection headers, XmlBuffer buffer, int metadataSection, int extensionSection, int pspSection) 94Uri u = new Uri(uri); 99public EndpointAddress(Uri uri, params AddressHeader[] addressHeaders) 104public EndpointAddress(Uri uri, EndpointIdentity identity, params AddressHeader[] addressHeaders) 114internal EndpointAddress(Uri newUri, EndpointAddress oldEndpointAddress) 119internal EndpointAddress(Uri uri, EndpointIdentity identity, AddressHeaderCollection headers, XmlDictionaryReader metadataReader, XmlDictionaryReader extensionReader, XmlDictionaryReader pspReader) 147private void Init(Uri uri, EndpointIdentity identity, AddressHeader[] headers) 159private void Init(Uri uri, EndpointIdentity identity, AddressHeaderCollection headers, XmlBuffer buffer, int metadataSection, int extensionSection, int pspSection) 164private void Init(AddressingVersion version, Uri uri, EndpointIdentity identity, AddressHeaderCollection headers, XmlBuffer buffer, int metadataSection, int extensionSection, int pspSection) 213public static Uri AnonymousUri 226public static Uri NoneUri 266public Uri Uri { get; private set; } 275Uri uri = Uri; 310internal static bool UriEquals(Uri u1, Uri u2, bool ignoreCase, bool includeHostInComparison) 315internal static bool UriEquals(Uri u1, Uri u2, bool ignoreCase, bool includeHostInComparison, bool includePortInComparison) 361internal static int UriGetHashCode(Uri uri, bool includeHostInComparison) 366internal static int UriGetHashCode(Uri uri, bool includeHostInComparison, bool includePortInComparison) 401Uri thisTo = Uri; 402Uri otherTo = endpointAddress.Uri; 582Uri uri; 673private static bool ReadContentsFrom200408(XmlDictionaryReader reader, out Uri uri, out AddressHeaderCollection headers, out EndpointIdentity identity, out XmlBuffer buffer, out int metadataSection, out int extensionSection, out int pspSection) 839if (!Uri.TryCreate(address, UriKind.Absolute, out uri)) 847private static bool ReadContentsFrom10(XmlDictionaryReader reader, out Uri uri, out AddressHeaderCollection headers, out EndpointIdentity identity, out XmlBuffer buffer, out int metadataSection, out int extensionSection) 911if (!Uri.TryCreate(address, UriKind.Absolute, out uri)) 1232public Uri Uri { get; set; }
System\ServiceModel\IClientChannel.cs (1)
13Uri Via { get; }
System\ServiceModel\IServiceChannel.cs (1)
10Uri ListenUri { get; }
System\ServiceModel\Security\AcceleratedTokenProvider.cs (2)
144protected override IAsyncRequestChannel CreateClientChannel(EndpointAddress target, Uri via) 155protected override Task<AcceleratedTokenProviderState> CreateNegotiationStateAsync(EndpointAddress target, Uri via, TimeSpan timeout)
System\ServiceModel\Security\ClientCredentialsSecurityTokenManager.cs (3)
214sessionTokenProvider.Via = initiatorRequirement.GetPropertyOrDefault<Uri>(InitiatorServiceModelSecurityTokenRequirement.ViaProperty, null); 215Uri privacyNoticeUri; 249acceleratedTokenProvider.Via = initiatorRequirement.GetPropertyOrDefault<Uri>(InitiatorServiceModelSecurityTokenRequirement.ViaProperty, null);
System\ServiceModel\Security\IdentityVerifier.cs (4)
33private static void AdjustAddress(ref EndpointAddress reference, Uri via) 42internal bool TryGetIdentity(EndpointAddress reference, Uri via, out EndpointIdentity identity) 48internal void EnsureOutgoingIdentity(EndpointAddress serviceReference, Uri via, AuthorizationContext authorizationContext) 181Uri toAddress = reference.Uri;
System\ServiceModel\Security\InitiatorSessionSymmetricTransportSecurityProtocol.cs (1)
21public InitiatorSessionSymmetricTransportSecurityProtocol(SessionSymmetricTransportSecurityProtocolFactory factory, EndpointAddress target, Uri via) : base(factory, target, via)
System\ServiceModel\Security\IssuanceTokenProviderBase.cs (6)
30private Uri _via = null; 188public Uri Via 399protected abstract Task<T> CreateNegotiationStateAsync(EndpointAddress target, Uri via, TimeSpan timeout); 405protected abstract IAsyncRequestChannel CreateClientChannel(EndpointAddress target, Uri via); 643Uri targetUri; 653Uri issuerUri;
System\ServiceModel\Security\NegotiationTokenProvider.cs (1)
156protected override IAsyncRequestChannel CreateClientChannel(EndpointAddress target, Uri via)
System\ServiceModel\Security\SecurityProtocol.cs (3)
34protected SecurityProtocol(SecurityProtocolFactory factory, EndpointAddress target, Uri via) 48public Uri Via { get; } 492internal async Task<IList<SupportingTokenSpecification>> TryGetSupportingTokensAsync(SecurityProtocolFactory factory, EndpointAddress target, Uri via, Message message, TimeSpan timeout)
System\ServiceModel\Security\SecurityProtocolFactory.cs (2)
421public SecurityProtocol CreateSecurityProtocol(EndpointAddress target, Uri via, object listenerSecurityState, bool isReturnLegSecurityRequired, TimeSpan timeout) 456protected abstract SecurityProtocol OnCreateSecurityProtocol(EndpointAddress target, Uri via, object listenerSecurityState, TimeSpan timeout);
System\ServiceModel\Security\SecuritySessionClientSettings.cs (6)
260internal TChannel OnCreateChannel(EndpointAddress remoteAddress, Uri via) 310protected ClientSecuritySessionChannel(SecuritySessionClientSettings<TChannel> settings, EndpointAddress to, Uri via) 329public Uri Via { get; } 1398protected ClientSecuritySimplexSessionChannel(SecuritySessionClientSettings<TChannel> settings, EndpointAddress to, Uri via) 1430public SecurityRequestSessionChannel(SecuritySessionClientSettings<TChannel> settings, EndpointAddress to, Uri via) 1536public ClientSecurityDuplexSessionChannel(SecuritySessionClientSettings<TChannel> settings, EndpointAddress to, Uri via)
System\ServiceModel\Security\SecuritySessionSecurityTokenProvider.cs (8)
36private Uri _via; 38private Uri _privacyNoticeUri; 99public Uri Via 178public Uri PrivacyNoticeUri 417private IAsyncRequestChannel CreateChannel(SecuritySessionOperation operation, EndpointAddress target, Uri via) 491private async Task<SecurityToken> DoOperationAsync(SecuritySessionOperation operation, EndpointAddress target, Uri via, SecurityToken currentToken, TimeSpan timeout) 734protected override IAsyncRequestChannel OnCreateChannel(EndpointAddress address, Uri via) 797IRequestChannel IChannelFactory<IRequestChannel>.CreateChannel(EndpointAddress to, Uri via)
System\ServiceModel\Security\SessionSymmetricTransportSecurityProtocolFactory.cs (1)
39protected override SecurityProtocol OnCreateSecurityProtocol(EndpointAddress target, Uri via, object listenerSecurityState, TimeSpan timeout)
System\ServiceModel\Security\Tokens\InitiatorServiceModelSecurityTokenRequirement.cs (2)
30public Uri Via 34return GetPropertyOrDefault<Uri>(ViaProperty, null);
System\ServiceModel\Security\Tokens\RecipientServiceModelSecurityTokenRequirement.cs (2)
16public Uri ListenUri 20return GetPropertyOrDefault<Uri>(ListenUriProperty, null);
System\ServiceModel\Security\TransportSecurityProtocol.cs (1)
18public TransportSecurityProtocol(TransportSecurityProtocolFactory factory, EndpointAddress target, Uri via)
System\ServiceModel\Security\TransportSecurityProtocolFactory.cs (1)
33protected override SecurityProtocol OnCreateSecurityProtocol(EndpointAddress target, Uri via, object listenerSecurityState, TimeSpan timeout)
System\ServiceModel\Security\X509CertificateRecipientClientCredential.cs (6)
25ScopedCertificates = new Dictionary<Uri, X509Certificate2>(); 37ScopedCertificates = new Dictionary<Uri, X509Certificate2>(); 38foreach (Uri uri in other.ScopedCertificates.Keys) 58public Dictionary<Uri, X509Certificate2> ScopedCertificates { get; } 94public void SetScopedCertificate(string subjectName, StoreLocation storeLocation, StoreName storeName, Uri targetService) 103public void SetScopedCertificate(StoreLocation storeLocation, StoreName storeName, X509FindType findType, object findValue, Uri targetService)
System\ServiceModel\UriSchemeKeyedCollection.cs (6)
10public class UriSchemeKeyedCollection : SynchronizedKeyedCollection<string, Uri> 17public UriSchemeKeyedCollection(params Uri[] addresses) 30protected override string GetKeyForItem(Uri item) 35protected override void InsertItem(int index, Uri item) 46protected override void SetItem(int index, Uri item) 59internal static void ValidateBaseAddress(Uri uri, string argumentName)
System.ServiceModel.Primitives.Tests (11)
Channels\CustomChannelTest.cs (5)
41mockChannelFactory.OnCreateChannelOverride = (EndpointAddress endpoint, Uri via) => 131mockChannelFactory.OnCreateChannelOverride = (EndpointAddress endpoint, Uri via) => 223mockChannelFactory.OnCreateChannelOverride = (EndpointAddress endpoint, Uri via) => 274mockChannelFactory.OnCreateChannelOverride = (EndpointAddress endpoint, Uri via) => 333mockChannelFactory.OnCreateChannelOverride = (EndpointAddress endpoint, Uri via) =>
ServiceModel\MessageContractTest.4.4.0.cs (2)
154mockChannelFactory.OnCreateChannelOverride = (EndpointAddress endpoint, Uri via) => 254mockChannelFactory.OnCreateChannelOverride = (EndpointAddress endpoint, Uri via) =>
ServiceModel\ThrowingOnCloseBindingElement.cs (4)
125protected override TChannel OnCreateChannel(EndpointAddress to, Uri via) 193public Uri Via => InnerChannel.Via; 210public Uri Via => InnerChannel.Via; 274public Uri Via => InnerChannel.Via;
System.ServiceModel.Syndication (83)
System\ServiceModel\Syndication\Atom10FeedFormatter.cs (8)
445internal static void WriteLink(XmlWriter writer, SyndicationLink link, Uri baseUri) 448Uri baseUriToWrite = FeedUtils.GetBaseUriToWrite(baseUri, link.BaseUri); 504protected virtual void WriteItem(XmlWriter writer, SyndicationItem item, Uri feedBaseUri) 511protected virtual void WriteItems(XmlWriter writer, IEnumerable<SyndicationItem> items, Uri feedBaseUri) 794private void ReadItemFrom(XmlReader reader, SyndicationItem result, Uri feedBaseUri) 873private void ReadLink(XmlReader reader, SyndicationLink link, Uri baseUri) 1134private void WriteItemContents(XmlWriter dictWriter, SyndicationItem item, Uri feedBaseUri) 1136Uri baseUriToWrite = FeedUtils.GetBaseUriToWrite(feedBaseUri, item.BaseUri);
System\ServiceModel\Syndication\AtomPub10ServiceDocumentFormatter.cs (13)
102internal static CategoriesDocument ReadCategories(XmlReader reader, Uri baseUri, CreateInlineCategoriesDelegate inlineCategoriesFactory, CreateReferencedCategoriesDelegate referencedCategoriesFactory, string version, int maxExtensionSize) 119internal static void WriteCategoriesInnerXml(XmlWriter writer, CategoriesDocument categories, Uri baseUri, string version) 121Uri baseUriToWrite = FeedUtils.GetBaseUriToWrite(baseUri, categories.BaseUri); 152private static void ReadInlineCategories(XmlReader reader, InlineCategoriesDocument inlineCategories, Uri baseUri, string version, int maxExtensionSize) 225private static void ReadReferencedCategories(XmlReader reader, ReferencedCategoriesDocument referencedCategories, Uri baseUri, Uri link, string version, int maxExtensionSize) 289private static void WriteCategories(XmlWriter writer, CategoriesDocument categories, Uri baseUri, string version) 325private static void WriteXmlBase(XmlWriter writer, Uri baseUri) 549private void WriteCollection(XmlWriter writer, ResourceCollectionInfo collection, Uri baseUri) 552Uri baseUriToWrite = FeedUtils.GetBaseUriToWrite(baseUri, collection.BaseUri); 584Uri baseUri = Document.BaseUri; 598private void WriteWorkspace(XmlWriter writer, Workspace workspace, Uri baseUri) 601Uri baseUriToWrite = FeedUtils.GetBaseUriToWrite(baseUri, workspace.BaseUri);
System\ServiceModel\Syndication\CategoriesDocument.cs (2)
22public Uri BaseUri { get; set; } 40public static ReferencedCategoriesDocument Create(Uri linkToCategoriesDocument)
System\ServiceModel\Syndication\FeedUtils.cs (8)
73internal static Uri CombineXmlBase(Uri rootBase, string newBase) 79Uri newBaseUri = new Uri(newBase, UriKind.RelativeOrAbsolute); 87internal static Uri GetBaseUriToWrite(Uri rootBase, Uri currentBase) 89Uri uriToWrite; 114internal static string GetUriString(Uri uri)
System\ServiceModel\Syndication\ReferencedCategoriesDocument.cs (2)
12public ReferencedCategoriesDocument(Uri link) : base() 19public Uri Link { get; set; }
System\ServiceModel\Syndication\ResourceCollectionInfo.cs (6)
21public ResourceCollectionInfo(string title, Uri link) : this((title == null) ? null : new TextSyndicationContent(title), link) 25public ResourceCollectionInfo(TextSyndicationContent title, Uri link) : this(title, link, null, null) 29public ResourceCollectionInfo(TextSyndicationContent title, Uri link, IEnumerable<CategoriesDocument> categories, bool allowsNewEntries) 34public ResourceCollectionInfo(TextSyndicationContent title, Uri link, IEnumerable<CategoriesDocument> categories, IEnumerable<string> accepts) 68public Uri BaseUri { get; set; } 77public Uri Link { get; set; }
System\ServiceModel\Syndication\Rss20FeedFormatter.cs (12)
156protected virtual void WriteItem(XmlWriter writer, SyndicationItem item, Uri feedBaseUri) 163protected virtual void WriteItems(XmlWriter writer, IEnumerable<SyndicationItem> items, Uri feedBaseUri) 191internal static SyndicationLink ReadAlternateLink(XmlReader reader, Uri baseUri, TryParseUriCallback uriParser, bool preserveAttributeExtensions) 217Uri uri = UriFromString(uriParser, uriString, UriKind.RelativeOrAbsolute, Rss20Constants.LinkTag, Rss20Constants.Rss20Namespace, reader); 277private void ReadItemFrom(XmlReader reader, SyndicationItem result, Uri feedBaseUri) 469private SyndicationLink ReadMediaEnclosure(XmlReader reader, Uri baseUri) 774private static void WriteAlternateLink(XmlWriter writer, SyndicationLink link, Uri baseUri) 777Uri baseUriToWrite = FeedUtils.GetBaseUriToWrite(baseUri, link.BaseUri); 966private void WriteItemContents(XmlWriter writer, SyndicationItem item, Uri feedBaseUri) 968Uri baseUriToWrite = FeedUtils.GetBaseUriToWrite(feedBaseUri, item.BaseUri); 1136private static void WriteMediaEnclosure(XmlWriter writer, SyndicationLink link, Uri baseUri) 1139Uri baseUriToWrite = FeedUtils.GetBaseUriToWrite(baseUri, link.BaseUri);
System\ServiceModel\Syndication\ServiceDocument.cs (1)
35public Uri BaseUri { get; set; }
System\ServiceModel\Syndication\SyndicationContent.cs (1)
39public static UrlSyndicationContent CreateUrlContent(Uri url, string mediaType)
System\ServiceModel\Syndication\SyndicationFeed.cs (6)
38public SyndicationFeed(string title, string description, Uri feedAlternateLink) 43public SyndicationFeed(string title, string description, Uri feedAlternateLink, IEnumerable<SyndicationItem> items) 48public SyndicationFeed(string title, string description, Uri feedAlternateLink, string id, DateTimeOffset lastUpdatedTime) 53public SyndicationFeed(string title, string description, Uri feedAlternateLink, string id, DateTimeOffset lastUpdatedTime, IEnumerable<SyndicationItem> items) 118public Uri BaseUri { get; set; } 140public Uri ImageUrl { get; set; }
System\ServiceModel\Syndication\SyndicationFeedFormatter.cs (6)
12public delegate bool TryParseUriCallback(XmlUriData data, out Uri uri); 318internal Uri UriFromString(string uriString, UriKind uriKind, string localName, string namespaceURI, XmlReader reader) 323internal static Uri UriFromString(TryParseUriCallback uriParser, string uriString, UriKind uriKind, string localName, string namespaceURI, XmlReader reader) 325Uri uri = null; 335uri = (Uri)args[args.Length - 1]; 374internal static bool DefaultUriParser(XmlUriData XmlUriData, out Uri uri)
System\ServiceModel\Syndication\SyndicationItem.cs (5)
27public SyndicationItem(string title, string content, Uri itemAlternateLink) 32public SyndicationItem(string title, string content, Uri itemAlternateLink, string id, DateTimeOffset lastUpdatedTime) 37public SyndicationItem(string title, SyndicationContent content, Uri itemAlternateLink, string id, DateTimeOffset lastUpdatedTime) 83public Uri BaseUri { get; set; } 177public void AddPermalink(Uri permalink)
System\ServiceModel\Syndication\SyndicationLink.cs (10)
15public SyndicationLink(Uri uri) : this(uri, null, null, null, 0) 19public SyndicationLink(Uri uri, string relationshipType, string title, string mediaType, long length) 53public Uri BaseUri { get; set; } 77public Uri Uri { get; set; } 79public static SyndicationLink CreateAlternateLink(Uri uri) 84public static SyndicationLink CreateAlternateLink(Uri uri, string mediaType) 89public static SyndicationLink CreateMediaEnclosureLink(Uri uri, string mediaType, long length) 94public static SyndicationLink CreateSelfLink(Uri uri) 99public static SyndicationLink CreateSelfLink(Uri uri, string mediaType) 106public Uri GetAbsoluteUri()
System\ServiceModel\Syndication\UrlSyndicationContent.cs (2)
14public UrlSyndicationContent(Uri url, string mediaType) : base() 31public Uri Url { get; }
System\ServiceModel\Syndication\Workspace.cs (1)
38public Uri BaseUri { get; set; }
System.ServiceModel.UnixDomainSocket (7)
System\ServiceModel\Channels\SocketConnection.cs (4)
772private async Task<IConnection> CreateConnectionAsync(Uri uriPath) 790public static Exception ConvertConnectException(SocketException socketException, Uri remoteUri, TimeSpan timeSpent, Exception innerException) 837private static TimeoutException CreateTimeoutException(Uri uri, TimeSpan timeout, SocketException innerException) 842public async ValueTask<IConnection> ConnectAsync(Uri uri, TimeSpan timeout)
System\ServiceModel\Channels\UnixDomainSocketChannelFactory.cs (2)
34protected override string GetConnectionPoolKey(EndpointAddress address, Uri via) 39protected override TChannel OnCreateChannel(EndpointAddress address, Uri via)
System\ServiceModel\Channels\UnixPosixIdentitySecurityUpgradeProvider.cs (1)
24public override StreamUpgradeInitiator CreateUpgradeInitiator(EndpointAddress remoteAddress, Uri via)
System.Speech (103)
Internal\GrammarBuilding\GrammarBuilderDictation.cs (1)
74Uri ruleUri;
Internal\GrammarBuilding\GrammarBuilderRuleRef.cs (2)
14internal GrammarBuilderRuleRef(Uri uri, string? rule) 51Uri ruleUri = new(_uri, UriKind.RelativeOrAbsolute);
Internal\ResourceLoader.cs (6)
16internal Stream LoadFile(Uri uri, out string? mimeType, out Uri? baseUri, out string? localPath) 66internal Stream LoadFile(Uri uri, out string? localPath, out Uri? redirectedUri) 79private static MemoryStream DownloadData(Uri uri, out Uri redirectedUri)
Internal\SapiInterop\SapiRecoInterop.cs (2)
1014string? GetLocalCopy(Uri resourcePath, out string? mimeType, out Uri? redirectUrl);
Internal\SrgsCompiler\BackEnd.cs (1)
713Uri uri = new(sBasePath, UriKind.RelativeOrAbsolute);
Internal\SrgsCompiler\GrammarElement.cs (1)
121Uri? IGrammar.XmlBase
Internal\SrgsCompiler\RuleRef.cs (1)
31internal RuleRef(ParseElementCollection parent, Backend backend, Uri uri, List<Rule> undefRules, string? semanticKey, string? initParameters)
Internal\SrgsCompiler\SRGSCompiler.cs (2)
28internal static void CompileStream(XmlReader[] xmlReaders, string? filename, Stream? stream, bool fOutputCfg, Uri? originalUri, string[]? referencedAssemblies, string? keyFile) 41Uri? uri = originalUri;
Internal\SrgsCompiler\SrgsElementCompilerFactory.cs (2)
60IRuleRef IElementFactory.CreateRuleRef(IElement parent, Uri srgsUri) 65IRuleRef IElementFactory.CreateRuleRef(IElement parent, Uri srgsUri, string? semanticKey, string? parameters)
Internal\SrgsParser\IElementFactory.cs (2)
19IRuleRef CreateRuleRef(IElement parent, Uri srgsUri); 20IRuleRef CreateRuleRef(IElement parent, Uri srgsUri, string? semanticKey, string? parameters);
Internal\SrgsParser\IGrammar.cs (1)
21Uri? XmlBase { set; }
Internal\SrgsParser\XmlParser.cs (1)
21internal XmlParser(XmlReader reader, Uri? uri)
Internal\Synthesis\EngineSite.cs (2)
163public Stream? LoadResource(Uri uri, string? mediaType) 169Uri? baseUriUnused;
Internal\Synthesis\ISSmlParser.cs (3)
31void ProcessLexicon(Uri uri, string? type); 65internal Uri _uri; 68internal LexiconEntry(Uri uri, string? mediaType)
Internal\Synthesis\SpeakInfo.cs (3)
117internal AudioData(Uri uri, ResourceLoader resourceLoader) 121Uri? baseAudio; 139internal Uri _uri;
Internal\Synthesis\SSmlParser.cs (1)
1263Uri uri = new(sUri, UriKind.RelativeOrAbsolute);
Internal\Synthesis\TextFragmentEngine.cs (2)
67Uri uri = new(sUri, UriKind.RelativeOrAbsolute); 179public void ProcessLexicon(Uri uri, string? type)
Internal\Synthesis\TextWriterEngine.cs (1)
243public void ProcessLexicon(Uri uri, string? type)
Internal\Synthesis\TTSEngineProxy.cs (6)
18internal abstract void AddLexicon(Uri lexicon, string? mediaType); 19internal abstract void RemoveLexicon(Uri lexicon); 49internal override void AddLexicon(Uri lexicon, string? mediaType) 54internal override void RemoveLexicon(Uri lexicon) 136internal override void AddLexicon(Uri lexicon, string? mediaType) 141internal override void RemoveLexicon(Uri lexicon)
Internal\Synthesis\VoiceSynthesis.cs (5)
494internal void AddLexicon(Uri uri, string mediaType) 510internal void RemoveLexicon(Uri uri) 1669private void SpeakStream(Uri? audio, Prompt prompt) 1728internal ParametersSpeak(string? textToSpeak, Prompt prompt, bool isXml, Uri? audioFile) 1739internal Uri? _audioFile;
Recognition\DictationGrammar.cs (1)
53private static readonly Uri s_defaultDictationUri = new("grammar:dictation");
Recognition\Grammar.cs (15)
28internal Grammar(Uri uri, string? ruleName, object[]? parameters) 69public Grammar(SrgsDocument? srgsDocument, string? ruleName, Uri? baseUri) 74public Grammar(SrgsDocument? srgsDocument, string? ruleName, Uri? baseUri, object[]? parameters) 96public Grammar(Stream stream, string? ruleName, Uri? baseUri) 101public Grammar(Stream stream, string? ruleName, Uri? baseUri, object[]? parameters) 272internal Uri? Uri 356internal Uri? BaseUri 406internal static Grammar? Create(string grammarName, string ruleName, string? onInitParameter, out Uri? redirectUri) 414bool hasUri = Uri.TryCreate(grammarName, UriKind.Absolute, out Uri? uriGrammar); 475internal static bool IsDictationGrammar([NotNullWhen(true)] Uri? uri) 489internal bool IsDictation([NotNullWhen(true)] Uri? uri) 641Uri? uriGrammar = Uri; 1116private Uri? _uri; 1117private Uri? _baseUri;
Recognition\GrammarBuilder.cs (2)
205Uri uri; 226Uri uri;
Recognition\RecognizerBase.cs (10)
1408Uri? baseUri = grammar.BaseUri; 1435private void LoadSapiDictationGrammar(SapiGrammar sapiGrammar, Uri? uri, string? ruleName, bool enabled, float weight, int priority) 1506Grammar? grammar = Grammar.Create(bstrResourceUri, ruleName, onInitParameters, out Uri? redirectedUri); 1555string? ISpGrammarResourceLoader.GetLocalCopy(Uri resourcePath, out string? mimeType, out Uri? redirectUrl) 1573private void LoadSapiGrammarFromCfg(SapiGrammar sapiGrammar, Grammar grammar, Uri? baseUri, bool enabled, float weight, int priority) 1653private void SetSapiGrammarProperties(SapiGrammar sapiGrammar, Uri? uri, string? ruleName, bool enabled, float weight, int priority) 1956private void ActivateRule(SapiGrammar sapiGrammar, Uri? uri, string? ruleName) 3079string? ISpGrammarResourceLoader.GetLocalCopy(Uri resourcePath, out string? mimeType, out Uri? redirectUrl)
Recognition\SrgsGrammar\SrgsDocument.cs (3)
95public Uri? XmlBase 382internal Uri? BaseUri 406private Uri? _baseUri;
Recognition\SrgsGrammar\SrgsElementFactory.cs (2)
104IRuleRef IElementFactory.CreateRuleRef(IElement parent, Uri srgsUri) 109IRuleRef IElementFactory.CreateRuleRef(IElement? parent, Uri srgsUri, string? semanticKey, string? parameters)
Recognition\SrgsGrammar\SrgsGrammar.cs (2)
281public Uri? XmlBase 644private Uri? _xmlBase;
Recognition\SrgsGrammar\SrgsGrammarCompiler.cs (1)
133Uri? originalUri)
Recognition\SrgsGrammar\SrgsRuleRef.cs (8)
19public SrgsRuleRef(Uri uri) 23public SrgsRuleRef(Uri uri, string rule) 29public SrgsRuleRef(Uri uri, string rule, string semanticKey) 35public SrgsRuleRef(Uri uri, string rule, string semanticKey, string parameters) 71internal SrgsRuleRef(string? semanticKey, string? parameters, Uri uri) 82public Uri? Uri 243private void UriInit(Uri uri, string? rule, string? semanticKey, string? initParameters) 285private Uri? _uri;
Synthesis\FilePrompt.cs (1)
16public FilePrompt(Uri promptFile, SynthesisMediaType media)
Synthesis\Prompt.cs (3)
42internal Prompt(Uri promptFile, SynthesisMediaType media) 52Uri? baseUri; 125internal Uri? _audio;
Synthesis\PromptBuilder.cs (5)
660Uri uri; 676public void AppendAudio(Uri audioFile) 689public void AppendAudio(Uri audioFile, string alternateText) 734public void AppendSsml(Uri ssmlFile) 739Uri? redirectUri;
Synthesis\SpeechSynthesizer.cs (2)
258public void AddLexicon(Uri uri, string mediaType) 264public void RemoveLexicon(Uri uri)
Synthesis\TTSEngine\TTSEngineTypes.cs (3)
39public abstract void AddLexicon(Uri uri, string? mediaType, ITtsEngineSite site); 46public abstract void RemoveLexicon(Uri uri, ITtsEngineSite site); 123Stream? LoadResource(Uri uri, string mediaType);
System.Text.Json (13)
System\Text\Json\Nodes\JsonValueOfT.cs (1)
96type == typeof(Guid) || type == typeof(Uri) || type == typeof(Version))
System\Text\Json\Schema\JsonSchemaExporter.cs (1)
593sb.Append(Uri.EscapeDataString(escapedToken));
System\Text\Json\Serialization\Converters\Value\UriConverter.cs (8)
10internal sealed class UriConverter : JsonPrimitiveConverter<Uri?> 12public override Uri? Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) 17public override void Write(Utf8JsonWriter writer, Uri? value, JsonSerializerOptions options) 28internal override Uri ReadAsPropertyNameCore(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) 34private static Uri ReadCore(ref Utf8JsonReader reader) 38if (!Uri.TryCreate(uriString, UriKind.RelativeOrAbsolute, out Uri? value)) 46internal override void WriteAsPropertyNameCore(Utf8JsonWriter writer, Uri value, JsonSerializerOptions options, bool isWritingExtensionDataProperty)
System\Text\Json\Serialization\Metadata\JsonMetadataServices.Converters.cs (3)
258/// Returns a <see cref="JsonConverter{T}"/> instance that converts <see cref="Uri"/> values. 261public static JsonConverter<Uri?> UriConverter => s_uriConverter ??= new UriConverter(); 262private static JsonConverter<Uri?>? s_uriConverter;
System.Text.Json.SourceGeneration (1)
Helpers\KnownTypeSymbols.cs (1)
175public INamedTypeSymbol? UriType => GetOrResolveType(typeof(Uri), ref _UriType);
System.Web.HttpUtility (2)
System\Web\Util\UriUtil.cs (2)
33if (Uri.TryCreate(inputWithoutQueryFragment, UriKind.Absolute, out Uri? uri))
System.Windows.Extensions (3)
System\Media\SoundPlayer.cs (3)
22private Uri? _uri; 347private static Uri? ResolveUri(string partialUri) 349Uri? result = null;
System.Windows.Forms (31)
System\Windows\Forms\Controls\PictureBox\PictureBox.cs (3)
152private static Uri CalculateUri(string path) 471Uri uri = CalculateUri(_imageLocation); 556var uri = CalculateUri(_imageLocation);
System\Windows\Forms\Controls\WebBrowser\HtmlDocument.cs (1)
139public Uri? Url
System\Windows\Forms\Controls\WebBrowser\HtmlElementErrorEventArgs.cs (2)
12private Uri? _url; 40public Uri Url => _url ??= new Uri(_urlString);
System\Windows\Forms\Controls\WebBrowser\HtmlHistory.cs (1)
72public void Go(Uri url) => Go(url.ToString());
System\Windows\Forms\Controls\WebBrowser\HtmlWindow.cs (4)
222public Uri? Url 307public void Navigate(Uri url) 340public HtmlWindow? Open(Uri url, string target, string windowOptions, bool replaceEntry) => 358public HtmlWindow? OpenNew(Uri url, string windowOptions) =>
System\Windows\Forms\Controls\WebBrowser\WebBrowser.cs (7)
237Uri url = new(hrefString); 563public Uri? Url 687public void Navigate(Uri? url) 716public void Navigate(Uri? url, string? targetFrameName) 746public void Navigate(Uri? url, bool newWindow) 776public void Navigate(Uri? url, string? targetFrameName, byte[]? postData, string? additionalHeaders) 1276private string ReadyNavigateToUrl(Uri? url)
System\Windows\Forms\Controls\WebBrowser\WebBrowserDocumentCompletedEventArgs.cs (2)
14public WebBrowserDocumentCompletedEventArgs(Uri? url) 22public Uri? Url { get; }
System\Windows\Forms\Controls\WebBrowser\WebBrowserNavigatedEventArgs.cs (2)
14public WebBrowserNavigatedEventArgs(Uri? url) 22public Uri? Url { get; }
System\Windows\Forms\Controls\WebBrowser\WebBrowserNavigatingEventArgs.cs (2)
16public WebBrowserNavigatingEventArgs(Uri? url, string? targetFrameName) 25public Uri? Url { get; }
System\Windows\Forms\Controls\WebBrowser\WebBrowserUriTypeConverter.cs (2)
14Uri? uri = base.ConvertFrom(context, culture, value) as Uri;
System\Windows\Forms\Help\Help.cs (5)
108Uri? file = null; 199Uri? file = Resolve(url) ?? throw new ArgumentException(string.Format(SR.HelpInvalidURL, url), nameof(url)); 239private static Uri? Resolve(string? partialUri) 241Uri? file = null; 300Uri? file = Resolve(url);
UnitTests.Common (6)
MockChannelFactory.cs (3)
46public Func<EndpointAddress, Uri, IChannel> OnCreateChannelOverride { get; set; } 71protected override TChannel OnCreateChannel(EndpointAddress address, Uri via) 76public IChannel DefaultOnCreateChannel(EndpointAddress address, Uri via)
MockRequestChannel.cs (3)
11private readonly Uri _via; 13public Uri Via 22public MockRequestChannel(ChannelManagerBase manager, MessageEncoderFactory encoderFactory, EndpointAddress address, Uri via)
vstest.console (2)
Processors\Utilities\LoggerUtilities.cs (1)
39var loggerUri = new Uri(loggerIdentifier);
TestPlatformHelpers\TestRequestManager.cs (1)
1423private object? CreateKnownExtensionInstance(Uri extensionUri)
vstest.console.arm64 (2)
src\vstest\src\vstest.console\Processors\Utilities\LoggerUtilities.cs (1)
39var loggerUri = new Uri(loggerIdentifier);
src\vstest\src\vstest.console\TestPlatformHelpers\TestRequestManager.cs (1)
1423private object? CreateKnownExtensionInstance(Uri extensionUri)