Base:
method
ToString
System.Object.ToString()
360 references to ToString
Aspire.Hosting (3)
Dashboard\DashboardLifecycleHook.cs (1)
250var dashboardUrl = codespaceUrlRewriter.RewriteUrl(firstDashboardUrl.ToString());
Devcontainers\Codespaces\CodespacesUrlRewriter.cs (1)
26return uri.ToString();
ResourceBuilderExtensions.cs (1)
407return builder.WithEnvironment($"services__{name}__default__0", uri.ToString());
Aspire.Hosting.Tests (2)
DistributedApplicationTests.cs (2)
762Assert.Contains(httpEndPoint.ToString().Trim('/'), urls); 766Assert.DoesNotContain(httpsEndpoint.ToString().Trim('/'), urls);
Aspire.Microsoft.Azure.Cosmos.Tests (3)
ConformanceTests.cs (3)
100Assert.Equal("https://example1.documents.azure.com/", client1.Endpoint.ToString()); 101Assert.Equal("https://example2.documents.azure.com/", client2.Endpoint.ToString()); 102Assert.Equal("https://example3.documents.azure.com/", client3.Endpoint.ToString());
AuthSamples.FunctionalTests (7)
ClaimsTransformTests.cs (1)
41Assert.Equal("http://localhost/account/login?ReturnUrl=%2FHome%2FMyClaims", response.Headers.Location.ToString());
CookiesTests.cs (1)
40Assert.Equal("http://localhost/account/login?ReturnUrl=%2FHome%2FMyClaims", response.RequestMessage.RequestUri.ToString());
CustomPolicyProviderTests.cs (2)
44Assert.Equal("http://localhost/account/signin?ReturnUrl=%2FHome%2FMinimumAge10", response.RequestMessage.RequestUri.ToString()); 118Assert.Equal("http://localhost/account/signin?ReturnUrl=%2FHome%2FMinimumAge50", response.RequestMessage.RequestUri.ToString());
IdentityExternalClaimsTests.cs (1)
41Assert.Equal("http://localhost/Account/Login?ReturnUrl=%2FMyClaims", response.Headers.Location.ToString());
PathSchemeSelectionTests.cs (1)
53Assert.Equal("http://localhost/account/login?ReturnUrl=%2FHome%2FMyClaims", response.RequestMessage.RequestUri.ToString());
StaticFilesAuthTests.cs (1)
39Assert.Equal("http://localhost/Account/Login?ReturnUrl=%2F" + scenario, response.Headers.Location.ToString());
BuildActionTelemetryTable (1)
Program.cs (1)
474return relativePath.ToString();
BuildBoss (1)
Extensions.cs (1)
21var relativeName = part.Uri.ToString().Replace('/', '\\');
dotnet-svcutil-lib (52)
FrameworkFork\Microsoft.Xml\Xml\Core\XmlReaderSettings.cs (1)
471baseUriString = baseUri.ToString();
FrameworkFork\Microsoft.Xml\Xml\Core\XmlTextReaderImpl.cs (7)
596_ps.baseUriStr = _ps.baseUri.ToString(); 609string baseUriStr = baseUri.ToString(); 2888InitStreamInput(baseUri, baseUri.ToString(), stream, null, 0, encoding); 2900Debug.Assert(baseUri == null || (baseUri.ToString().Equals(baseUriStr))); 3145_ps.baseUriStr = _ps.baseUri.ToString(); 8073Throw(new XmlException(entityName == null ? ResXml.Xml_ErrorOpeningExternalDtd : ResXml.Xml_ErrorOpeningExternalEntity, new string[] { uri.ToString(), innerMessage }, e, 0, 0)); 8105InitTextReaderInput(uri.ToString(), uri, textReader);
FrameworkFork\Microsoft.Xml\Xml\Resolvers\XmlPreloadedResolver.cs (1)
238throw new XmlException(string.Format(ResXml.Xml_CannotResolveUrl, absoluteUri.ToString()));
FrameworkFork\Microsoft.Xml\Xml\Resolvers\XmlPreloadedResolverAsync.cs (1)
35throw new XmlException(string.Format(ResXml.Xml_CannotResolveUrl, absoluteUri.ToString()));
FrameworkFork\Microsoft.Xml\Xml\Resolvers\XmlSystemPathResolver.cs (2)
37throw new XmlException(ResXml.Xml_SystemPathResolverCannotOpenUri, uri.ToString()); 48throw new XmlException(ResXml.Xml_SystemPathResolverCannotOpenUri, uri.ToString(), e, null);
FrameworkFork\Microsoft.Xml\Xml\schema\DtdParser.cs (7)
271_documentBaseUri = baseUri.ToString(); 330_documentBaseUri = baseUriOb.ToString(); 521_externalDtdBaseUri = baseUri.ToString(); 3520return (tmp != null) ? tmp.ToString() : string.Empty; 3539_readerAdapter.Throw(new XmlException(res, arg, (int)LineNo, (int)LinePos, baseUri == null ? null : baseUri.ToString())); 3545_readerAdapter.Throw(new XmlException(res, args, (int)LineNo, (int)LinePos, baseUri == null ? null : baseUri.ToString())); 3551_readerAdapter.Throw(new XmlException(res, arg, (int)lineNo, (int)linePos, baseUri == null ? null : baseUri.ToString()));
FrameworkFork\Microsoft.Xml\Xml\schema\Preprocessor.cs (2)
385reader = XmlReader.Create((Stream)obj, _readerSettings, ruri.ToString()); 395reader = XmlReader.Create((TextReader)obj, _readerSettings, ruri.ToString());
FrameworkFork\Microsoft.Xml\Xml\schema\SchemaCollectionPreprocessor.cs (1)
233XmlTextReader reader = new XmlTextReader(ruri.ToString(), stream, NameTable);
FrameworkFork\Microsoft.Xml\Xml\schema\XdrBuilder.cs (1)
532reader = new XmlTextReader(ruri.ToString(), stm, _NameTable);
FrameworkFork\Microsoft.Xml\Xml\schema\xdrvalidator.cs (1)
344reader = new XmlTextReader(ruri.ToString(), stm, NameTable);
FrameworkFork\Microsoft.Xml\Xml\schema\XmlSchemaValidator.cs (3)
294_sourceUriString = _sourceUri.ToString(); 359SendValidationEvent(ResXml.Sch_CannotLoadSchema, new string[] { schema.BaseUri.ToString(), e.Message }, e); 1872Reader = XmlReader.Create(stm, readerSettings, ruri.ToString());
FrameworkFork\Microsoft.Xml\Xml\schema\xsdvalidator.cs (1)
590reader = new XmlTextReader(ruri.ToString(), stm, NameTable);
FrameworkFork\Microsoft.Xml\Xml\XmlXapResolver.cs (1)
29throw new XmlException(ResXml.Xml_XapResolverCannotOpenUri, absoluteUri.ToString(), default(Exception), null);
FrameworkFork\System.Runtime.Serialization\System\Runtime\Serialization\DataContract.cs (1)
1804if (uri.ToString() == Globals.SerializationNamespace)
FrameworkFork\System.ServiceModel\System\ServiceModel\Channels\FramingChannels.cs (2)
467FaultStringDecoder.GetFaultException(decoder.Fault, via.ToString(), contentType)); 507FaultStringDecoder.GetFaultException(decoder.Fault, via.ToString(), contentType));
FrameworkFork\System.ServiceModel\System\ServiceModel\Channels\PrivacyNoticeBindingElement.cs (1)
94assertion.InnerText = settings.Url.ToString();
FrameworkFork\System.ServiceModel\System\ServiceModel\Channels\SessionConnectionReader.cs (1)
364throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(FaultStringDecoder.GetFaultException(_decoder.Fault, _channel.RemoteAddress.Uri.ToString(), _messageEncoder.ContentType));
FrameworkFork\System.ServiceModel\System\ServiceModel\Description\MetadataExchangeClient.cs (7)
434address.ToString(), MetadataExchangeClientMode.HttpGet.ToString()); 728throw DiagnosticUtility.ExceptionUtility.ThrowHelperArgument("location", string.Format(SRServiceModel.SFxCannotGetMetadataFromLocation, location.ToString())); 840get { return _responseLocation.ToString(); } 903_section = MetadataRetriever.CreateMetadataSection(reader, request.RequestUri.ToString()); 943get { return _address.Uri.ToString(); } 1137((IClientChannel)metadataClient).RemoteAddress.Uri.ToString()))); 1143_section = MetadataRetriever.CreateMetadataSection(reader, ((IClientChannel)metadataClient).RemoteAddress.Uri.ToString());
FrameworkFork\System.ServiceModel\System\ServiceModel\Description\ServiceMetadataExtension.cs (2)
198_newBaseAddress = UpdateUri(listenUri).ToString(); 243text = newUri.ToString();
FrameworkFork\System.ServiceModel\System\ServiceModel\Description\WsdlExporter.cs (1)
1212endpointIdentifier = endpoint.Address.Uri.ToString();
FrameworkFork\System.ServiceModel\System\ServiceModel\Dispatcher\ChannelDispatcher.cs (1)
578(this.Listener != null) ? this.Listener.Uri.ToString() : string.Empty, Guid.Empty);
FrameworkFork\System.ServiceModel\System\ServiceModel\EndpointAddress.cs (1)
1001return _uri.ToString();
Metadata\MetadataDocumentLoader.cs (1)
723var orderedFileNames = this.metadataSourceFiles.Select(u => u.ToString().ToUpperInvariant()).OrderBy(u => u);
Metadata\MetadataFileNameManager.cs (2)
212Uri.TryCreate(filePath1, UriKind.Relative, out uri1) && Uri.TryCreate(filePath2, UriKind.Relative, out uri2) && StringComparer.OrdinalIgnoreCase.Compare(uri1.ToString(), uri2.ToString()) == 0;
Shared\Utilities\PathHelper.cs (1)
77return fileUri.IsAbsoluteUri && fileUri.IsFile || IsFile(fileUri.ToString(), basePath, out fileUri);
Tool.cs (2)
205new ServiceDescriptor(options.Inputs[0].ToString(), credsProvider, credsProvider, credsProvider) : 206new ServiceDescriptor(options.Inputs.Select(i => i.ToString()).ToList(), credsProvider, credsProvider, credsProvider);
IIS.FunctionalTests (24)
Http2TrailersResetTests.cs (12)
49var response = await SendRequestAsync(Fixture.Client.BaseAddress.ToString() + "ResponseTrailers_HTTP2_TrailersAvailable"); 60var response = await SendRequestAsync(Fixture.Client.BaseAddress.ToString() + "ResponseTrailers_ProhibitedTrailers_Blocked"); 71var response = await SendRequestAsync(Fixture.Client.BaseAddress.ToString() + "ResponseTrailers_NoBody_TrailersSent"); 83var response = await SendRequestAsync(Fixture.Client.BaseAddress.ToString() + "ResponseTrailers_WithBody_TrailersSent"); 98var response = await SendRequestAsync(Fixture.Client.BaseAddress.ToString() + "ResponseTrailers_WithContentLengthBody_TrailersSent"); 113var response = await SendRequestAsync(Fixture.Client.BaseAddress.ToString() + "ResponseTrailers_WithTrailersBeforeContentLengthBody_TrailersSent"); 131var response = await SendRequestAsync(Fixture.Client.BaseAddress.ToString() + "ResponseTrailers_WithContentLengthBodyAndDeclared_TrailersSent"); 148var response = await SendRequestAsync(Fixture.Client.BaseAddress.ToString() + "ResponseTrailers_MultipleValues_SentAsSeparateHeaders"); 163var response = await SendRequestAsync(Fixture.Client.BaseAddress.ToString() + "ResponseTrailers_CompleteAsyncNoBody_TrailersSent"); 169var response2 = await SendRequestAsync(Fixture.Client.BaseAddress.ToString() + "ResponseTrailers_CompleteAsyncNoBody_TrailersSent_Completed"); 179var response = await SendRequestAsync(Fixture.Client.BaseAddress.ToString() + "ResponseTrailers_CompleteAsyncWithBody_TrailersSent"); 186var response2 = await SendRequestAsync(Fixture.Client.BaseAddress.ToString() + "ResponseTrailers_CompleteAsyncWithBody_TrailersSent_Completed");
Http3Tests.cs (10)
50var response = await client.GetAsync(Fixture.Client.BaseAddress.ToString() + "Http3_Direct"); 60var address = Fixture.Client.BaseAddress.ToString() + "Http3_AltSvcHeader_UpgradeFromHttp1"; 84var address = Fixture.Client.BaseAddress.ToString() + "Http3_AltSvcHeader_UpgradeFromHttp2"; 105var address = Fixture.Client.BaseAddress.ToString() + "Http3_ResponseTrailers"; 119var address = Fixture.Client.BaseAddress.ToString() + "Http3_ResetBeforeHeaders"; 132var address = Fixture.Client.BaseAddress.ToString() + "Http3_ResetAfterHeaders"; 137await client.GetAsync(Fixture.Client.BaseAddress.ToString() + "Http3_ResetAfterHeaders_SetResult"); 148var address = Fixture.Client.BaseAddress.ToString() + "Http3_AppExceptionAfterHeaders_InternalError"; 154await client.GetAsync(Fixture.Client.BaseAddress.ToString() + "Http3_AppExceptionAfterHeaders_InternalError_SetResult"); 165var address = Fixture.Client.BaseAddress.ToString() + "Http3_Abort_Cancel";
src\Servers\IIS\IIS\test\Common.FunctionalTests\Http2Tests.cs (1)
320var response = await SendRequestAsync(Fixture.Client.BaseAddress.ToString() + "ResponseTrailers_HTTP1_TrailersNotAvailable", http2: false);
src\Servers\IIS\IIS\test\Common.FunctionalTests\RequestResponseTests.cs (1)
666Assert.Equal(_fixture.Client.BaseAddress.ToString(), await _fixture.Client.GetStringAsync("/ServerAddresses"));
IISExpress.FunctionalTests (2)
src\Servers\IIS\IIS\test\Common.FunctionalTests\Http2Tests.cs (1)
320var response = await SendRequestAsync(Fixture.Client.BaseAddress.ToString() + "ResponseTrailers_HTTP1_TrailersNotAvailable", http2: false);
src\Servers\IIS\IIS\test\Common.FunctionalTests\RequestResponseTests.cs (1)
666Assert.Equal(_fixture.Client.BaseAddress.ToString(), await _fixture.Client.GetStringAsync("/ServerAddresses"));
Microsoft.Arcade.Common (2)
ArcadeHttpMessageHandler.cs (2)
21if(request.RequestUri.ToString().StartsWith(requestResponse.RequestMessage.RequestUri.ToString()) &&
Microsoft.AspNetCore.Authentication.Test (11)
CookieTests.cs (4)
102Assert.Equal("http://example.com/Account/Login?ReturnUrl=%2FCustomRedirect", location.ToString()); 1516Assert.Equal(redirectUrl, transaction.Response.Headers.Location.ToString()); 1561Assert.Equal("/ret_path_2", transaction.Response.Headers.Location.ToString()); 1607Assert.Equal("/redirect_test", transaction.Response.Headers.Location.ToString());
FacebookTests.cs (1)
343finalUserInfoEndpoint = req.RequestUri.ToString();
OAuthTests.cs (1)
314Assert.Equal("https://www.example.com/access-denied?ReturnUrl=http%3A%2F%2Ftesthost%2Fredirect", transaction.Response.Headers.Location.ToString());
OpenIdConnect\OpenIdConnectChallengeTests.cs (1)
997throw new NotImplementedException(request.RequestUri.ToString());
OpenIdConnect\OpenIdConnectEventTests.cs (1)
1406throw new NotImplementedException(request.RequestUri.ToString());
OpenIdConnect\OpenIdConnectEventTests_Handler.cs (1)
1401throw new NotImplementedException(request.RequestUri.ToString());
TwitterTests.cs (2)
224Assert.Equal("http://localhost/access-denied?ReturnUrl=%2Fchallenge", response.Headers.Location.ToString()); 482finalVerifyCredentialsEndpoint = req.RequestUri.ToString();
Microsoft.AspNetCore.Components.WebView (1)
StaticContentProvider.cs (1)
28var relativePath = _appBaseUri.MakeRelativeUri(fileUri).ToString();
Microsoft.AspNetCore.Components.WebView.Maui (1)
iOS\IOSWebViewManager.cs (1)
65 using var nsUrl = new NSUrl(absoluteUri.ToString());
Microsoft.AspNetCore.Components.WebView.WindowsForms (1)
src\BlazorWebView\src\SharedSource\WebView2WebViewManager.cs (1)
384 launchBrowser.StartInfo.FileName = uri.ToString();
Microsoft.AspNetCore.Components.WebView.Wpf (1)
src\BlazorWebView\src\SharedSource\WebView2WebViewManager.cs (1)
384 launchBrowser.StartInfo.FileName = uri.ToString();
Microsoft.AspNetCore.Connections.Abstractions (1)
UriEndPoint.cs (1)
29public override string ToString() => Uri.ToString();
Microsoft.AspNetCore.Http.Extensions.Tests (3)
RequestDelegateGenerator\RequestDelegateCreationTests.AsParameters.cs (2)
347Assert.Equal(uriValue, value.Uri?.ToString()); 348Assert.Equal(uriValue, anotherValue.Uri?.ToString());
RequestDelegateGenerator\RequestDelegateCreationTests.BindAsync.cs (1)
251Assert.Equal("https://example.org/", arg!.Uri.ToString());
Microsoft.AspNetCore.Http.Results.Tests (7)
ResultsTests.cs (3)
638Assert.Equal(uri.ToString(), result.Location); 654Assert.Equal(uri.ToString(), result.Location); 669Assert.Equal(uri.ToString(), result.Location);
TypedResultsTests.cs (4)
78Assert.Equal(uri.ToString(), result.Location); 93Assert.Equal(uri.ToString(), result.Location); 619Assert.Equal(uri.ToString(), result.Location); 634Assert.Equal(uri.ToString(), result.Location);
Microsoft.AspNetCore.HttpsPolicy.Tests (7)
HttpsPolicyTests.cs (2)
70Assert.Equal(expectedUrl, response.Headers.Location.ToString()); 73client.BaseAddress = new Uri(response.Headers.Location.ToString());
HttpsRedirectionMiddlewareTests.cs (5)
111Assert.Equal(expected, response.Headers.Location.ToString()); 167Assert.Equal(expectedUrl, response.Headers.Location.ToString()); 228Assert.Equal(expectedUrl, response.Headers.Location.ToString()); 268Assert.Equal("https://localhost:5050/", response.Headers.Location.ToString()); 356Assert.Equal("https://localhost:5050/", response.Headers.Location.ToString());
Microsoft.AspNetCore.Identity.FunctionalTests (9)
MapIdentityApiTests.cs (1)
1366Assert.StartsWith(BaseAddress.ToString(), url);
Pages\Account\ExternalLogin.cs (1)
46Assert.Equal(RegisterConfirmation.Path + "?email=" + email, redirect.ToString(), StringComparer.OrdinalIgnoreCase);
Pages\Account\Login.cs (3)
67Assert.Equal(Index.Path, loggedInLocation.ToString()); 90Assert.Equal("/Identity/Account/Lockout", lockedOut.ToString()); 111Assert.StartsWith(LoginWith2fa.Path, loggedInLocation.ToString());
Pages\Account\LoginWith2fa.cs (1)
34Assert.Equal(Index.Path, goToIndex.ToString());
Pages\Account\Manage\DeleteUser.cs (1)
24Assert.Equal(Index.Path, deleteLocation.ToString());
Pages\Account\Register.cs (2)
47Assert.Equal(Index.Path, registeredLocation.ToString()); 64Assert.Equal(RegisterConfirmation.Path + "?email=" + userName + "&returnUrl=%2F", registeredLocation.ToString());
Microsoft.AspNetCore.JsonPatch.Tests (1)
Internal\DictionaryAdapterTest.cs (1)
287var removeStatus = dictionaryAdapter.TryRemove(dictionary, uriKey.ToString(), resolver, out var message);
Microsoft.AspNetCore.Mvc.FunctionalTests (27)
ApplicationModelTest.cs (1)
175Assert.Equal("/Home/CannotBeRouted", response.Headers.Location.ToString());
BasicTests.cs (2)
195Assert.Equal("https://localhost/Home/HttpsOnlyAction", response.Headers.Location.ToString()); 409Assert.Equal("/Home/Product", response.Headers.Location.ToString());
ComponentRenderingFunctionalTests.cs (1)
76Assert.Equal("http://localhost/navigation-redirect", response.Headers.Location.ToString());
GlobalAuthorizationFilterTestBase.cs (1)
45response.Headers.Location.ToString());
RazorPagesTest.cs (12)
961Assert.Equal(expected, response.Headers.Location.ToString()); 975Assert.Equal(expected, response.Headers.Location.ToString()); 997Assert.Equal(expected, response.Headers.Location.ToString()); 1011Assert.Equal(expected, response.Headers.Location.ToString()); 1025Assert.Equal(expected, response.Headers.Location.ToString()); 1039Assert.Equal(expected, response.Headers.Location.ToString()); 1053Assert.Equal(expected, response.Headers.Location.ToString()); 1065Assert.Equal(expected, response.Headers.Location.ToString()); 1077Assert.Equal(expected, response.Headers.Location.ToString()); 1089Assert.Equal(expected, response.Headers.Location.ToString()); 1103Assert.Equal(expected, response.Headers.Location.ToString()); 1115Assert.Equal(expected, response.Headers.Location.ToString());
RazorPagesWithBasePathTest.cs (3)
260Assert.Equal(expected, response.Headers.Location.ToString()); 274Assert.Equal(expected, response.Headers.Location.ToString()); 478Assert.Equal("/", response.Headers.Location.ToString());
SimpleWithWebApplicationBuilderTests.cs (2)
93Assert.Equal("/ok-object", response.Headers.Location.ToString()); 120Assert.Equal("/json", response.Headers.Location.ToString());
TempDataInCookiesTest.cs (1)
145response = await Client.SendAsync(GetRequest(redirectResponse.Headers.Location.ToString(), response));
TempDataPropertyTest.cs (2)
51var response = await Client.SendAsync(GetRequest(redirectResponse.Headers.Location.ToString(), redirectResponse)); 79var response = await Client.SendAsync(GetRequest(redirectResponse.Headers.Location.ToString(), redirectResponse));
TempDataTestBase.cs (2)
108response = await Client.SendAsync(GetRequest(redirectResponse.Headers.Location.ToString(), response)); 173var response = await Client.SendAsync(GetRequest(redirectResponse.Headers.Location.ToString(), redirectResponse));
Microsoft.AspNetCore.Server.IntegrationTesting (4)
Common\TestUrlHelper.cs (1)
11return TestUriHelper.BuildTestUri(serverType).ToString();
Deployers\NginxDeployer.cs (2)
72SetupNginx(appUri.ToString(), uri); 95applicationBaseUri: uri.ToString(),
Deployers\SelfHostDeployer.cs (1)
72applicationBaseUri: actualUrl.ToString(),
Microsoft.AspNetCore.Server.IntegrationTesting.IIS (2)
IISDeployer.cs (1)
120applicationBaseUri: uri.ToString(),
IISExpressDeployer.cs (1)
105applicationBaseUri: actualUri.ToString(),
Microsoft.AspNetCore.Server.Kestrel.Core.Tests (1)
ListenOptionsTests.cs (1)
73Assert.Equal("http://127.0.0.1:5555/", ((UriEndPoint)listenOptions.EndPoint).Uri.ToString());
Microsoft.AspNetCore.SignalR.Client.Tests (18)
HttpConnectionTests.cs (1)
79negotiateUrlTcs.TrySetResult(request.RequestUri.ToString());
HttpConnectionTests.Negotiate.cs (17)
75negotiateUrlTcs.TrySetResult(request.RequestUri.ToString()); 203Assert.Equal("http://fakeuri.org/negotiate?negotiateVersion=1", testHttpHandler.ReceivedRequests[0].RequestUri.ToString()); 204Assert.Equal("http://fakeuri.org/?id=different-id", testHttpHandler.ReceivedRequests[1].RequestUri.ToString()); 243Assert.Equal("http://fakeuri.org/negotiate?negotiateVersion=1", testHttpHandler.ReceivedRequests[0].RequestUri.ToString()); 244Assert.Equal("http://fakeuri.org/?id=0rge0d00-0040-0030-0r00-000q00r00e00", testHttpHandler.ReceivedRequests[1].RequestUri.ToString()); 300Assert.Equal("http://fakeuri.org/negotiate?negotiateVersion=1", testHttpHandler.ReceivedRequests[0].RequestUri.ToString()); 301Assert.Equal("https://another.domain.url/chat/negotiate?negotiateVersion=1", testHttpHandler.ReceivedRequests[1].RequestUri.ToString()); 302Assert.Equal("https://another.domain.url/chat?id=0rge0d00-0040-0030-0r00-000q00r00e00", testHttpHandler.ReceivedRequests[2].RequestUri.ToString()); 303Assert.Equal("https://another.domain.url/chat?id=0rge0d00-0040-0030-0r00-000q00r00e00", testHttpHandler.ReceivedRequests[3].RequestUri.ToString()); 406Assert.Equal("http://fakeuri.org/negotiate?negotiateVersion=1", testHttpHandler.ReceivedRequests[0].RequestUri.ToString()); 407Assert.Equal("https://another.domain.url/chat/negotiate?negotiateVersion=1", testHttpHandler.ReceivedRequests[1].RequestUri.ToString()); 408Assert.Equal("https://another.domain.url/chat?id=0rge0d00-0040-0030-0r00-000q00r00e00", testHttpHandler.ReceivedRequests[2].RequestUri.ToString()); 409Assert.Equal("https://another.domain.url/chat?id=0rge0d00-0040-0030-0r00-000q00r00e00", testHttpHandler.ReceivedRequests[3].RequestUri.ToString()); 471Assert.Equal("http://fakeuri.org/negotiate?negotiateVersion=1", testHttpHandler.ReceivedRequests[0].RequestUri.ToString()); 472Assert.Equal("https://another.domain.url/chat/negotiate?negotiateVersion=1", testHttpHandler.ReceivedRequests[1].RequestUri.ToString()); 473Assert.Equal("https://another.domain.url/chat?negotiateVersion=1&id=0rge0d00-0040-0030-0r00-000q00r00e00", testHttpHandler.ReceivedRequests[2].RequestUri.ToString()); 474Assert.Equal("https://another.domain.url/chat?negotiateVersion=1&id=0rge0d00-0040-0030-0r00-000q00r00e00", testHttpHandler.ReceivedRequests[3].RequestUri.ToString());
Microsoft.AspNetCore.SpaServices.Extensions (3)
Proxying\SpaProxy.cs (3)
71var baseUriAsString = baseUri.ToString(); 121$"Failed to proxy the request to {targetUri.ToString()}, because the request to " + 123$"accepting requests to {baseUri.ToString()}.\n\n" +
Microsoft.AspNetCore.SpaServices.Extensions.Tests (1)
SpaProxyTests.cs (1)
59Assert.Equal(expected, forwardedRequestMessage.RequestUri.ToString());
Microsoft.Build.Tasks.Core (2)
ManifestUtil\SecurityUtil.cs (2)
737manifest.Sign(signer, timestampUrl.ToString(), disallowMansignTimestampFallback); 845timestampUrl.ToString());
Microsoft.CodeAnalysis (1)
CommandLine\SarifErrorLogger.cs (1)
161return s_fileRoot.MakeRelativeUri(new Uri(s_fileRoot, uri)).ToString();
Microsoft.CodeAnalysis.CSharp (1)
Syntax\SyntaxFactory.cs (1)
719return element.WithStartTag(element.StartTag.AddAttributes(XmlTextAttribute(DocumentationCommentXmlNames.HrefAttributeName, linkAddress.ToString())));
Microsoft.CodeAnalysis.Test.Utilities (1)
Diagnostics\CommonDiagnosticAnalyzers.cs (1)
507: WebUtility.UrlEncode(uri.ToString());
Microsoft.DotNet.Build.Tasks.Feed (2)
src\common\AzureStorageUtils.cs (2)
145return Container.Uri.ToString(); 156return Container.GenerateSasUri(builder).ToString();
Microsoft.DotNet.Helix.JobSender (5)
JobDefinition.cs (2)
199string jobListUriForLogging = jobListUri.ToString().Replace(jobListUri.Query, ""); 221var creationRequest = new JobCreationRequest(Type, jobListUri.ToString(), queueId)
StorageHelpers\ApiBlobHelper.cs (1)
43public override string Uri => _container.Uri.ToString();
StorageHelpers\ConnectionStringBlobHelper.cs (2)
40public override string Uri => _container.Uri.ToString(); 48string sas = _container.GenerateSasUri(permissions, expiration).ToString();
Microsoft.Extensions.Http (1)
Logging\LogHelper.cs (1)
180return uri.IsAbsoluteUri ? uri.AbsoluteUri : uri.ToString();
Microsoft.Extensions.Http.Resilience.Tests (2)
Hedging\HedgingTests.cs (1)
350Requests.Add(request.RequestUri!.ToString());
Routing\RoutingStrategyTest.cs (1)
162yield return route.ToString();
Microsoft.Extensions.ServiceDiscovery.Yarp (2)
ServiceDiscoveryDestinationResolver.cs (2)
82var resolvedAddress = uriBuilder.Uri.ToString(); 88healthAddress = healthUriBuilder.Uri.ToString();
Microsoft.Gen.Logging.Generated.Tests (1)
LogPropertiesTests.cs (1)
130Assert.Equal(props.P5.ToString(), state!.GetValue("p.P5"));
Microsoft.Maui (2)
Handlers\HybridWebView\HybridWebViewHandler.iOS.cs (2)
87 using var nsUrl = new NSUrl(new Uri(AppOriginUri, "/").ToString()); 178 var relativePath = AppOriginUri.MakeRelativeUri(uri).ToString().Replace('\\', '/');
Microsoft.Maui.Controls (4)
AppLinkEntry.cs (1)
85 return AppLinkUri.ToString();
ImageSourceConverter.cs (1)
39 return uis.Uri.ToString();
ResourceDictionary.cs (1)
460 return uri.ToString();
UriTypeConverter.cs (1)
30 return uri.ToString();
Microsoft.Maui.Controls.Compatibility (8)
iOS\iOSAppLinks.cs (8)
14 if (string.IsNullOrWhiteSpace(appLink.AppLinkUri?.ToString())) 16 await RemoveLinkAsync(appLink.AppLinkUri?.ToString()); 21 if (string.IsNullOrWhiteSpace(uri?.ToString())) 23 await RemoveLinkAsync(uri.ToString()); 28 if (string.IsNullOrWhiteSpace(appLink.AppLinkUri?.ToString())) 50 var id = deepLinkUri.AppLinkUri.ToString(); 109 Url = new NSUrl(deepLinkUri.AppLinkUri.ToString()) 131 info.Add(new NSString("link"), new NSString(deepLinkUri.AppLinkUri.ToString()));
Microsoft.ML.Parquet (1)
PartitionedPathUtils.cs (1)
42relativePath = Uri.UnescapeDataString(baseUri.MakeRelativeUri(uri).ToString());
MSBuild (1)
TerminalLogger\TerminalLogger.cs (1)
650urlString = uri.ToString();
PresentationCore (8)
MS\Internal\AppModel\SiteOfOriginPart.cs (1)
125string original = Uri.ToString();
MS\Internal\WpfWebRequestHelper.cs (3)
84throw new WebException(requestUri.ToString(), WebExceptionStatus.RequestCanceled); 202throw new IOException(SR.Format(SR.GetResponseFailed, requestUri.ToString())); 218throw new IOException(SR.Format(SR.GetResponseFailed, requestUri.ToString()));
System\Windows\Media\FontEmbeddingManager.cs (2)
109return String.Equals(x.ToString(), y.ToString(), StringComparison.OrdinalIgnoreCase);
System\Windows\Media\MediaTimeline.cs (1)
249return Source.ToString();
System\Windows\Navigation\BaseUriHelper.cs (1)
239string original = uri.ToString(); // only relative Uri here (enforced by Package)
PresentationFramework (38)
MS\Internal\AppModel\AppSecurityManager.cs (1)
143sei.lpFile = uri.ToString(); // It's safe to use Uri.ToString since there's an inheritance demand on it that prevents spoofing by subclasses.
MS\Internal\AppModel\ContentFilePart.cs (2)
76throw new IOException(SR.Format(SR.UnableToLocateResource, Uri.ToString())); 84return MS.Internal.MimeTypeMapper.GetMimeTypeFromUri(new Uri(Uri.ToString(), UriKind.RelativeOrAbsolute)).ToString();
System\Windows\Annotations\Storage\XmlStreamStore.cs (4)
824supportedNamespaces.Add(name.ToString()); 833supportedNamespaces.Add(knownNamespace.ToString()); 852reader.DeclareNamespaceCompatibility(item.Key.ToString(), name.ToString());
System\Windows\Controls\Frame.cs (1)
710return Source.ToString();
System\Windows\Data\XmlDataProvider.cs (1)
569TraceData.Identify(request.RequestUri.ToString())));
System\Windows\Documents\DocumentReference.cs (3)
148DocumentsTrace.FixedDocumentSequence.IDF.Trace($"====Replace old doc {(oldSource == null ? "null" : oldSource.ToString())} with new {(newSource == null ? "null" : newSource.ToString())}"); 202Source {(this.Source == null ? "null" : this.Source.ToString())}
System\Windows\Documents\FixedPage.cs (4)
638String inputUriString = inputUri.ToString(); 659absoluteUri = new Uri(absoluteUri.ToString() + fragment, UriKind.RelativeOrAbsolute); 1089String startPartUriString = startPartUri.ToString(); 1101fixedPage.StartPartUriString = startPartUri.ToString();
System\Windows\Documents\FixedTextBuilder.cs (4)
1471|| navUri != _currentNavUri || (navUri != null && navUri.ToString() != _currentNavUri.ToString()); 1723if (navUri != _currentNavUri || (navUri != null && navUri.ToString() != _currentNavUri.ToString()))
System\Windows\Markup\Baml2006\Baml2006Reader.cs (2)
1193if (_settings.BaseUri != null && !String.IsNullOrEmpty(_settings.BaseUri.ToString())) 1196_xamlNodesWriter.WriteValue(_settings.BaseUri.ToString());
System\Windows\Markup\XamlReader.cs (5)
328String.IsNullOrEmpty(parserContext.BaseUri.ToString())) 472if (parserContext.BaseUri != null && !String.IsNullOrEmpty(parserContext.BaseUri.ToString())) 869String.IsNullOrEmpty(parserContext.BaseUri.ToString())) 942if (parserContext.BaseUri != null && !String.IsNullOrEmpty(parserContext.BaseUri.ToString())) 1052if (readerSettings.BaseUri == null || String.IsNullOrEmpty(readerSettings.BaseUri.ToString()))
System\Windows\Navigation\JournalEntry.cs (3)
330return uri.ToString(); 339displayName = (new Uri(siteOfOrigin, relative)).ToString(); 358displayName = uri.ToString();
System\Windows\Navigation\NavigationService.cs (3)
2679throw new Exception(SR.Format(SR.GetResponseFailed, requestUri.ToString())); 2912throw new Exception(SR.Format(SR.GetStreamFailed, requestUri.ToString())); 3017destinationUri.ToString());
System\Windows\ResourceDictionary.cs (2)
137throw new ArgumentException(SR.Format(SR.ResourceDictionaryLoadFromFailure, value == null ? "''" : value.ToString())); 224throw new InvalidOperationException(SR.Format(SR.ResourceDictionaryLoadFromFailure, _source.ToString()));
System\Windows\ThemeManager.cs (3)
365string sourceString = source.ToString(); 413if (rd.MergedDictionaries[i].Source.ToString().StartsWith(FluentThemeResourceDictionaryUri, 433if (rd.MergedDictionaries[i].Source.ToString().StartsWith(FluentThemeResourceDictionaryUri,
PresentationUI (5)
MS\Internal\Documents\Application\CriticalFileToken.cs (2)
68result = a._location.ToString().Equals( 69b._location.ToString(),
MS\Internal\Documents\Application\DocumentStream.cs (1)
677(_xpsFileToken != null) ? _xpsFileToken.Location.ToString() : string.Empty,
MS\Internal\Documents\RMPermissions.cs (1)
62requestFromLabel.Text = referralUri.ToString();
TenFeetInstallationProgress.xaml.cs (1)
77DownloadFrom.Text = (value as Uri).ToString();
ReachFramework (4)
Serialization\Manager\XpsOMPackagingPolicy.cs (1)
793IOpcPartUri partUri = _xpsOMFactory.CreatePartUri(uri.ToString());
src\Microsoft.DotNet.Wpf\src\Shared\MS\Internal\UriComparer.cs (3)
66return String.Equals(a.ToString(), b.ToString(), StringComparison.Ordinal); 85string uriAsString = uri.ToString();
Sockets.BindTests (8)
src\Servers\Kestrel\test\BindTests\AddressRegistrationTests.cs (8)
217Assert.Equal(uri.ToString(), response); 337Assert.Equal(new Uri(testUrlWithPort).ToString(), response); 392Assert.Equal(new Uri(testUrl).ToString(), response); 439Assert.Equal(new Uri(testUrl).ToString(), response); 526Assert.Equal(new Uri(address).ToString(), await HttpClientSlim.GetStringAsync(address, validateCertificate: false)); 641Assert.Equal(new Uri(useUrlsAddressWithPort).ToString(), await HttpClientSlim.GetStringAsync(useUrlsAddressWithPort)); 686Assert.Equal(new Uri(endPointAddress).ToString(), await HttpClientSlim.GetStringAsync(endPointAddress, validateCertificate: false)); 722Assert.Equal(new Uri(endPointAddress).ToString(), await HttpClientSlim.GetStringAsync(endPointAddress, validateCertificate: false));
System.Configuration.ConfigurationManager (1)
src\libraries\Common\src\System\Security\IdentityHelper.cs (1)
25return GetStrongHashSuitableForObjectName(uri.ToString());
System.IO.IsolatedStorage (1)
src\libraries\Common\src\System\Security\IdentityHelper.cs (1)
25return GetStrongHashSuitableForObjectName(uri.ToString());
System.Net.Http (4)
System\Net\Http\NetEventSource.Http.cs (3)
25Log.UriBaseAddress(baseAddress?.ToString(), IdOf(obj)); 59Log.AuthenticationInfo(uri?.ToString(), message); 70Log.AuthenticationError(uri?.ToString(), message);
System\Net\Http\SocketsHttpHandler\HttpEnvironmentProxy.cs (1)
237ReadOnlySpan<char> uriSpan = uri.ToString();
System.Net.Primitives (1)
System\Net\Cookie.cs (1)
792result += SeparatorLiteral + CookieFields.CommentUrlAttributeName + EqualsLiteral + QuotesLiteral + m_commentUri.ToString() + QuotesLiteral;
System.Net.WebClient (1)
System\Net\WebClient.cs (1)
155get { return _baseAddress != null ? _baseAddress.ToString() : string.Empty; }
System.Private.Uri (2)
System\Uri.cs (2)
1646ToString(); 4981return toUri.ToString();
System.Private.Xml (41)
System\Xml\Core\XmlReaderSettings.cs (1)
347baseUriString ??= baseUri?.ToString() ?? string.Empty;
System\Xml\Core\XmlTextReaderImpl.cs (7)
576_ps.baseUriStr = _ps.baseUri.ToString(); 589string baseUriStr = baseUri.ToString(); 2832InitStreamInput(baseUri, baseUri.ToString(), stream, null, 0, encoding); 2844Debug.Assert(baseUri == null || (baseUri.ToString().Equals(baseUriStr))); 3063_ps.baseUriStr = _ps.baseUri.ToString(); 7930Throw(new XmlException(entityName == null ? SR.Xml_ErrorOpeningExternalDtd : SR.Xml_ErrorOpeningExternalEntity, new string[] { uri.ToString(), innerMessage }, e, 0, 0)); 7962InitTextReaderInput(uri.ToString(), uri, textReader);
System\Xml\Core\XmlTextReaderImpl.Unix.cs (2)
21url = uri.ToString(); 26url = new Uri(url).ToString();
System\Xml\Core\XmlTextReaderImplAsync.cs (4)
863return InitStreamInputAsync(baseUri, baseUri.ToString(), stream, null, 0, encoding); 870Debug.Assert(baseUri == null || (baseUri.ToString().Equals(baseUriStr))); 5139Throw(new XmlException(entityName == null ? SR.Xml_ErrorOpeningExternalDtd : SR.Xml_ErrorOpeningExternalEntity, new string[] { uri.ToString(), innerMessage }, e, 0, 0)); 5173await InitTextReaderInputAsync(uri.ToString(), uri, textReader).ConfigureAwait(false);
System\Xml\Schema\DtdParser.cs (7)
262_documentBaseUri = baseUri.ToString(); 318_documentBaseUri = baseUriOb.ToString(); 509_externalDtdBaseUri = baseUri.ToString(); 3441return (tmp != null) ? tmp.ToString() : string.Empty; 3461_readerAdapter.Throw(new XmlException(res, arg, (int)LineNo, (int)LinePos, baseUri?.ToString())); 3469_readerAdapter.Throw(new XmlException(res, args, (int)LineNo, (int)LinePos, baseUri?.ToString())); 3476_readerAdapter.Throw(new XmlException(res, arg, (int)lineNo, (int)linePos, baseUri?.ToString()));
System\Xml\Schema\DtdParserAsync.cs (1)
153_externalDtdBaseUri = baseUri.ToString();
System\Xml\Schema\Preprocessor.cs (2)
364reader = XmlReader.Create((Stream)obj, _readerSettings, ruri.ToString()); 374reader = XmlReader.Create((TextReader)obj, _readerSettings, ruri.ToString());
System\Xml\Schema\SchemaCollectionpreProcessor.cs (1)
228XmlTextReader reader = new XmlTextReader(ruri.ToString(), stream, NameTable);
System\Xml\Schema\XdrBuilder.cs (1)
525reader = new XmlTextReader(ruri.ToString(), stm, _NameTable);
System\Xml\Schema\XdrValidator.cs (1)
346reader = new XmlTextReader(ruri.ToString(), stm, NameTable);
System\Xml\Schema\XmlSchemaValidator.cs (3)
290_sourceUriString = _sourceUri.ToString(); 347SendValidationEvent(SR.Sch_CannotLoadSchema, new string[] { schema.BaseUri!.ToString(), e.Message }, e); 1851Reader = XmlReader.Create(stm, readerSettings, ruri.ToString());
System\Xml\Schema\XsdValidator.cs (1)
579reader = new XmlTextReader(ruri.ToString(), stm, NameTable);
System\Xml\Xsl\Runtime\XmlQueryContext.cs (1)
172XmlReader reader = _readerSettings.CreateReader(stream, uriResolved?.ToString());
System\Xml\Xsl\Xslt\XsltLoader.cs (4)
207return _readerSettings.CreateReader(stream, uri.ToString()); 222throw new XslLoadException(SR.Xslt_CannotLoadStylesheet, uri.ToString(), input == null ? "null" : input.GetType().ToString()); 490if (_documentUriInUse.Contains(uri.ToString())) 518if (_documentUriInUse.Contains(uri.ToString()))
System\Xml\Xsl\XsltOld\Compiler.cs (1)
582string resolved = absoluteUri.ToString();
System\Xml\Xsl\XsltOld\ContainerAction.cs (2)
241string resolved = uri.ToString(); 521string resolved = uri.ToString();
System\Xml\Xsl\XsltOld\Processor.cs (2)
180XmlTextReaderImpl tr = new XmlTextReaderImpl(ruri.ToString(), (Stream)input); 193throw XsltException.Create(SR.Xslt_CantResolve, ruri.ToString());
System.Security.Cryptography (2)
System\Security\Cryptography\X509Certificates\OpenSslX509ChainEventSource.cs (2)
319DownloadRedirected(redirectUri.ToString()); 349DownloadRedirectNotFollowed(redirectUri.ToString());
System.ServiceModel.NetFramingBase (1)
System\ServiceModel\Channels\FramingChannels.cs (1)
396FaultStringDecoder.GetFaultException(decoder.Fault, via.ToString(), contentType));
System.ServiceModel.NetNamedPipe (1)
System\ServiceModel\Channels\PipeConnectionInitiator.cs (1)
151new StringTraceRecord("Uri", remoteUri.ToString()), this, null);
System.ServiceModel.Syndication (4)
System\ServiceModel\Syndication\Atom10FeedFormatter.cs (1)
1145WriteElement(writer, Atom10Constants.LogoTag, feed.ImageUrl.ToString());
System\ServiceModel\Syndication\FeedUtils.cs (1)
126return uri.ToString();
System\ServiceModel\Syndication\Rss20FeedFormatter.cs (2)
930writer.WriteElementString(Rss20Constants.DocumentationTag, Feed.InternalDocumentation.Uri.ToString()); 968writer.WriteElementString(Rss20Constants.LinkTag, Feed.InternalTextInput.Link.GetAbsoluteUri().ToString());
System.Windows.Forms (6)
System\Windows\Forms\Controls\WebBrowser\HtmlHistory.cs (1)
72public void Go(Uri url) => Go(url.ToString());
System\Windows\Forms\Controls\WebBrowser\HtmlWindow.cs (3)
310using BSTR bstrUrl = new(url.ToString()); 341Open(url.ToString(), target, windowOptions, replaceEntry); 359OpenNew(url.ToString(), windowOptions);
System\Windows\Forms\Controls\WebBrowser\WebBrowser.cs (1)
591if (value is not null && value.ToString().Length == 0)
System\Windows\Forms\Help\Help.cs (1)
215string fileName = file.ToString();
System.Windows.Forms.Tests (1)
System\Windows\Forms\WebBrowserTests.cs (1)
4767navigated = browser.Url.ToString();
System.Xaml (1)
System\Xaml\Parser\NodeStreamSorter.cs (1)
235EnqueueOneXmlDirectiveProperty(XamlLanguage.Base, _settings.BaseUri.ToString());