34 references to TryParse
Aspire.Hosting (1)
Dcp\DcpExecutor.cs (1)
1688var s when IPAddress.TryParse(s, out var ipAddress) => ipAddress switch // The host is an IP address
http2cat (1)
src\Shared\Http2cat\Http2CatHostedService.cs (1)
61if (!IPAddress.TryParse(address.Host, out var ip))
IIS.FunctionalTests (1)
src\Shared\Http2cat\Http2CatHostedService.cs (1)
61if (!IPAddress.TryParse(address.Host, out var ip))
IIS.LongTests (1)
src\Shared\Http2cat\Http2CatHostedService.cs (1)
61if (!IPAddress.TryParse(address.Host, out var ip))
IIS.NewHandler.FunctionalTests (1)
src\Shared\Http2cat\Http2CatHostedService.cs (1)
61if (!IPAddress.TryParse(address.Host, out var ip))
IIS.NewShim.FunctionalTests (1)
src\Shared\Http2cat\Http2CatHostedService.cs (1)
61if (!IPAddress.TryParse(address.Host, out var ip))
IISExpress.FunctionalTests (1)
src\Shared\Http2cat\Http2CatHostedService.cs (1)
61if (!IPAddress.TryParse(address.Host, out var ip))
Microsoft.AspNetCore.Server.HttpSys.FunctionalTests (1)
src\Shared\Http2cat\Http2CatHostedService.cs (1)
61if (!IPAddress.TryParse(address.Host, out var ip))
Microsoft.AspNetCore.Server.Kestrel.Core (1)
Internal\AddressBinder.cs (1)
76if (!IPAddress.TryParse(address.Host, out var ip))
Microsoft.Extensions.Diagnostics.ResourceMonitoring (3)
ResourceMonitoringOptionsCustomValidator.cs (1)
25if (!IPAddress.TryParse(s, out var ipAddress)
Windows\Network\WindowsTcpStateInfo.cs (2)
32.Where(ip => IPAddress.TryParse(ip, out var ipAddress) && ipAddress.AddressFamily == AddressFamily.InterNetwork) 38.Where(ip => IPAddress.TryParse(ip, out var ipAddress) && ipAddress.AddressFamily == AddressFamily.InterNetworkV6)
Microsoft.Extensions.ServiceDiscovery (2)
Configuration\ConfigurationServiceEndpointProvider.cs (1)
207if (IPAddress.TryParse(uri.Host, out var ip))
PassThrough\PassThroughServiceEndpointProviderFactory.cs (1)
51if (IPAddress.TryParse(host, out var ip))
Microsoft.Extensions.ServiceDiscovery.Dns (1)
Resolver\ResolvConf.cs (1)
28if (tokens.Length >= 2 && IPAddress.TryParse(tokens[1], out IPAddress? address))
System.Net.Http (2)
System\Net\Http\SocketsHttpHandler\SocksHelper.cs (2)
156if (IPAddress.TryParse(host, out IPAddress? hostIP)) 230if (IPAddress.TryParse(host, out IPAddress? hostIP))
System.Net.NameResolution (5)
System\Net\Dns.cs (5)
75if (NameResolutionPal.SupportsGetNameInfo && IPAddress.TryParse(hostNameOrAddress, out IPAddress? address)) 205if (IPAddress.TryParse(hostNameOrAddress, out IPAddress? address)) 269if (IPAddress.TryParse(hostName, out IPAddress? address)) 324if (NameResolutionPal.SupportsGetNameInfo && IPAddress.TryParse(hostName, out IPAddress? address) && 572if (NameResolutionPal.SupportsGetNameInfo && IPAddress.TryParse(hostName, out IPAddress? ipAddress))
System.Net.NetworkInformation (1)
System\Net\NetworkInformation\StringParsingHelpers.Dns.cs (1)
30if (IPAddress.TryParse(addressString, out IPAddress? parsedAddress))
System.Net.Ping (2)
System\Net\NetworkInformation\Ping.cs (2)
358if (IPAddress.TryParse(hostNameOrAddress, out IPAddress? address)) 638if (IPAddress.TryParse(hostNameOrAddress, out IPAddress? address))
System.Net.Primitives (1)
System\Net\IPAddress.cs (1)
277TryParse(s, out result);
System.Net.Quic (2)
src\libraries\Common\src\System\Net\Security\CertificateValidation.Unix.cs (1)
40if (IPAddress.TryParse(hostName, out hostnameAsIp))
System\Net\Quic\Internal\MsQuicHelpers.cs (1)
19host = IPAddress.TryParse(dnsEndPoint.Host, out address) ? null : dnsEndPoint.Host;
System.Net.Security (1)
src\libraries\Common\src\System\Net\Security\CertificateValidation.Unix.cs (1)
40if (IPAddress.TryParse(hostName, out hostnameAsIp))
System.Net.Sockets (2)
System\Net\Sockets\Socket.cs (1)
919if (IPAddress.TryParse(host, out parsedAddress))
System\Net\Sockets\Socket.Tasks.cs (1)
216EndPoint ep = IPAddress.TryParse(host, out IPAddress? parsedAddress) ? (EndPoint)
System.Net.WebProxy (1)
System\Net\WebProxy.NonWasm.cs (1)
25if (IPAddress.TryParse(hostString, out IPAddress? hostAddress))
System.Security.Cryptography (2)
System\Security\Cryptography\X509Certificates\X509Certificate2.cs (2)
1734/// <seealso cref="IPAddress.TryParse(string, out IPAddress)"/> 1741if (!IPAddress.TryParse(hostname, out ipAddress))