Base:
51 references to ToString
Aspire.Dashboard (2)
DashboardWebApplication.cs (2)
867return host == "*" || host == "+" || host == IPAddress.Any.ToString() || host == IPAddress.IPv6Any.ToString();
Aspire.StackExchange.Redis (1)
src\Vendoring\OpenTelemetry.Instrumentation.StackExchangeRedis\Implementation\RedisProfilerEntryToActivityConverter.cs (1)
143activity.SetTag(SemanticConventions.AttributeNetPeerIp, ipEndPoint.Address.ToString());
dotnet-svcutil-lib (1)
FrameworkFork\System.ServiceModel\System\ServiceModel\Channels\SocketConnection.cs (1)
527addressStringBuilder.Append(addresses[i].ToString());
Kestrel.SampleApp (2)
Startup.cs (2)
54logger.LogDebug($"Peer: {connectionFeature.RemoteIpAddress?.ToString()}:{connectionFeature.RemotePort}" 56+ $"Sock: {connectionFeature.LocalIpAddress?.ToString()}:{connectionFeature.LocalPort}"
Microsoft.AspNetCore.HttpLogging (2)
W3CLoggingMiddleware.cs (2)
104shouldLog |= AddToList(elements, _clientIpIndex, connectionInfo.RemoteIpAddress is null ? "" : connectionInfo.RemoteIpAddress.ToString()); 109shouldLog |= AddToList(elements, _serverIpIndex, connectionInfo.LocalIpAddress is null ? "" : connectionInfo.LocalIpAddress.ToString());
Microsoft.AspNetCore.HttpOverrides.Tests (12)
ForwardedHeadersMiddlewareTest.cs (9)
43Assert.Equal("11.111.111.11", context.Connection.RemoteIpAddress.ToString()); 81Assert.Equal(expectedIp, context.Connection.RemoteIpAddress.ToString()); 139Assert.Equal(expectedIp, context.Connection.RemoteIpAddress.ToString()); 179Assert.Equal("10.0.0.1", context.Connection.RemoteIpAddress.ToString()); 187Assert.Equal(originalIp, context.Connection.RemoteIpAddress.ToString()); 250Assert.Equal(expectedIp, context.Connection.RemoteIpAddress.ToString()); 924Assert.Equal("11.111.111.11", context.Connection.RemoteIpAddress.ToString()); 992Assert.Equal("11.111.111.11", context.Connection.RemoteIpAddress.ToString()); 1045Assert.Equal(expectedRemoteIp, context.Connection.RemoteIpAddress.ToString());
IPNetworkTest.cs (3)
57Assert.Equal(prefixText, network.Prefix.ToString()); 86Assert.Equal(expectedPrefix, network.Prefix.ToString()); 119Assert.Equal(expectedPrefix, network.Prefix.ToString());
Microsoft.AspNetCore.Owin (4)
OwinEnvironment.cs (2)
85{ OwinConstants.CommonKeys.LocalIpAddress, new FeatureMap<IHttpConnectionFeature>(feature => feature.LocalIpAddress.ToString(), 87{ OwinConstants.CommonKeys.RemoteIpAddress, new FeatureMap<IHttpConnectionFeature>(feature => feature.RemoteIpAddress.ToString(),
OwinFeatureCollection.cs (2)
202set { Prop(OwinConstants.CommonKeys.RemoteIpAddress, value.ToString()); } 208set { Prop(OwinConstants.CommonKeys.LocalIpAddress, value.ToString()); }
Microsoft.AspNetCore.Rewrite (2)
PatternSegments\LocalAddressSegment.cs (1)
10return context.HttpContext.Connection.LocalIpAddress?.ToString();
PatternSegments\RemoteAddressSegment.cs (1)
10return context.HttpContext.Connection.RemoteIpAddress?.ToString();
Microsoft.AspNetCore.Server.HttpSys.FunctionalTests (2)
RequestTests.cs (2)
43Assert.Equal("::1", connectionInfo.RemoteIpAddress.ToString()); 45Assert.Equal("::1", connectionInfo.LocalIpAddress.ToString());
Microsoft.AspNetCore.Server.Kestrel.Core (1)
Internal\Infrastructure\KestrelMetrics.cs (1)
327tags.Add("server.address", localIPEndPoint.Address.ToString());
Microsoft.AspNetCore.SignalR.Client.FunctionalTests (2)
Hubs.cs (2)
89feature.LocalIpAddress.ToString(), 90feature.RemoteIpAddress.ToString()
Microsoft.Extensions.ServiceDiscovery (1)
Http\ResolvingHttpDelegatingHandler.cs (1)
90host = ip.Address.ToString();
Microsoft.Gen.Logging.Generated.Tests (1)
LogPropertiesTests.cs (1)
131Assert.Equal(props.P6.ToString(), state!.GetValue("p.P6"));
Sockets.BindTests (1)
src\Servers\Kestrel\test\BindTests\AddressRegistrationTests.cs (1)
214builder.Host = new IPAddress(ip.GetAddressBytes()).ToString(); // Without the scope id.
Sockets.FunctionalTests (2)
src\Servers\Kestrel\test\FunctionalTests\RequestTests.cs (2)
1108RemoteIPAddress = connection.RemoteIpAddress?.ToString(), 1110LocalIPAddress = connection.LocalIpAddress?.ToString(),
System.Net.Http (3)
System\Net\Http\HttpTelemetry.cs (1)
105string? remoteAddress = remoteEndPoint?.Address?.ToString();
System\Net\Http\SocketsHttpHandler\ConnectionPool\ConnectionSetupDistributedTracing.cs (1)
51activity.SetTag("network.peer.address", remoteEndPoint.Address.ToString());
System\Net\Http\SocketsHttpHandler\HttpConnectionBase.cs (1)
76remoteEndPoint?.Address?.ToString());
System.Net.NameResolution (4)
System\Net\Dns.cs (1)
640HostName = address.ToString(),
System\Net\NameResolutionTelemetry.cs (3)
134IPAddress a => a.ToString(), 135KeyValuePair<IPAddress, AddressFamily> t => t.Key.ToString(), 236result[i] = addresses[i].ToString();
System.Net.Ping (1)
System\Net\NetworkInformation\Ping.PingUtility.cs (1)
41string processArgs = UnixCommandLinePing.ConstructCommandLine(buffer.Length, timeout, address.ToString(), isIpv4, options?.Ttl ?? 0, fragmentOption);
System.Net.Primitives (2)
System\Net\IPAddress.cs (2)
50/// A lazily initialized cache of the result of calling <see cref="ToString"/>. 474ToString();
System.Net.Quic (1)
System\Net\Quic\QuicConnection.cs (1)
417options.ClientAuthenticationOptions.TargetHost ?? host ?? address.ToString(),
System.Net.Requests (1)
System\Net\FtpControlStream.cs (1)
837address.ToString() +
System.Net.Sockets (1)
System\Net\Sockets\SocketsTelemetry.cs (1)
113activity.SetTag("network.peer.address", ipEndPoint.Address.ToString());
SystemdTestApp (2)
Startup.cs (2)
28logger.LogDebug($"Peer: {connectionFeature.RemoteIpAddress?.ToString()}:{connectionFeature.RemotePort}" 30+ $"Sock: {connectionFeature.LocalIpAddress?.ToString()}:{connectionFeature.LocalPort}");