79 references to Parse
ClientSample (1)
Tcp\TcpHubConnectionBuilderExtensions.cs (1)
32endPoint = new IPEndPoint(IPAddress.Parse(uri.Host), uri.Port);
dotnet-svcutil-lib (1)
FrameworkFork\System.ServiceModel\System\ServiceModel\Channels\SocketConnection.cs (1)
487IPAddress ipAddress = IPAddress.Parse(uri.DnsSafeHost);
InMemory.FunctionalTests (1)
TestTransport\InMemoryHttpClientSlim.cs (1)
54var address = IPAddress.Parse(requestUri.Host);
Interop.FunctionalTests (5)
Http3\Http3RequestTests.cs (4)
898o.Listen(IPAddress.Parse("127.0.0.1"), port, listenOptions => 1219o.Listen(IPAddress.Parse("127.0.0.1"), 0, listenOptions => 1691kestrel.Listen(IPAddress.Parse("127.0.0.1"), 0, listenOptions => 1860kestrel.Listen(IPAddress.Parse("127.0.0.1"), 0, listenOptions =>
HttpHelpers.cs (1)
76o.Listen(IPAddress.Parse("127.0.0.1"), 0, listenOptions =>
Microsoft.AspNetCore.Grpc.JsonTranscoding.Tests (2)
Infrastructure\TestHelpers.cs (1)
30httpContext.Connection.RemoteIpAddress = IPAddress.Parse("127.0.0.1");
JsonTranscodingServerCallContextTests.cs (1)
67httpContext.Connection.RemoteIpAddress = IPAddress.Parse("127.0.0.1");
Microsoft.AspNetCore.HeaderParsing.Tests (8)
ParserTests.cs (8)
372Assert.Equal(new List<IPAddress> { IPAddress.Parse("1.1.1.1"), IPAddress.Parse("192.168.1.100"), IPAddress.Parse("3.3.3.3") }, result); 382Assert.Equal(new List<IPAddress> { IPAddress.Parse("1.1.1.1"), IPAddress.Parse("192.168.1.100"), IPAddress.Parse("3.3.3.3") }, result); 394Assert.Equal(new List<IPAddress> { IPAddress.Parse("1.1.1.1") }, result); 406Assert.Equal(new List<IPAddress> { IPAddress.Parse("1::ffff") }, result);
Microsoft.AspNetCore.HttpOverrides.Tests (15)
ForwardedHeadersMiddlewareTest.cs (9)
77c.Connection.RemoteIpAddress = IPAddress.Parse("10.0.0.1"); 135c.Connection.RemoteIpAddress = IPAddress.Parse("10.0.0.1"); 173c.Connection.RemoteIpAddress = IPAddress.Parse(originalIp); 182Assert.Equal(new IPEndPoint(IPAddress.Parse(originalIp), 99).ToString(), 231foreach (var ip in knownIPs.Split(',').Select(text => IPAddress.Parse(text))) 246c.Connection.RemoteIpAddress = IPAddress.Parse("10.0.0.1"); 879c.Connection.RemoteIpAddress = IPAddress.Parse(remoteIp); 1014var proxy = IPAddress.Parse(knownProxy); 1020var networkIp = IPAddress.Parse(knownNetworkParts[0]);
IPNetworkTest.cs (6)
25var network = new IPNetwork(IPAddress.Parse(prefixText), length); 26Assert.True(network.Contains(IPAddress.Parse(addressText))); 39var network = new IPNetwork(IPAddress.Parse(prefixText), length); 40Assert.False(network.Contains(IPAddress.Parse(addressText))); 51var address = IPAddress.Parse(prefixText); 69var address = IPAddress.Parse(prefixText);
Microsoft.AspNetCore.InternalTesting (1)
HttpClientSlim.cs (1)
53var address = IPAddress.Parse(requestUri.Host);
Microsoft.AspNetCore.Owin (4)
OwinEnvironment.cs (2)
86(feature, value) => feature.LocalIpAddress = IPAddress.Parse(Convert.ToString(value, CultureInfo.InvariantCulture))) }, 88(feature, value) => feature.RemoteIpAddress = IPAddress.Parse(Convert.ToString(value, CultureInfo.InvariantCulture))) },
OwinFeatureCollection.cs (2)
201get { return IPAddress.Parse(Prop<string>(OwinConstants.CommonKeys.RemoteIpAddress)); } 207get { return IPAddress.Parse(Prop<string>(OwinConstants.CommonKeys.LocalIpAddress)); }
Microsoft.AspNetCore.Rewrite.Tests (4)
PatternSegments\IsIPV6SegmentTests.cs (2)
33context.HttpContext.Connection.RemoteIpAddress = IPAddress.Parse("2001:0db8:85a3:0000:0000:8a2e:0370:7334"); 48context.HttpContext.Connection.RemoteIpAddress = IPAddress.Parse("20.30.40.50");
PatternSegments\LocalAddressSegmentTests.cs (1)
18context.HttpContext.Connection.LocalIpAddress = IPAddress.Parse("20.30.40.50");
PatternSegments\RemoteAddressSegmentTests.cs (1)
18context.HttpContext.Connection.RemoteIpAddress = IPAddress.Parse("20.30.40.50");
Microsoft.AspNetCore.Server.Kestrel.Core.Tests (2)
AddressBinderTests.cs (2)
31Assert.Equal(IPAddress.Parse(expectedAddress), endpoint.Address); 150Assert.Equal(IPAddress.Parse(ip), listenOptions.IPEndPoint.Address);
Microsoft.AspNetCore.Server.Kestrel.Transport.Quic.Tests (7)
QuicTestHelpers.cs (1)
59var endpoint = new IPEndPoint(IPAddress.Parse("127.0.0.1"), port);
WebHostTests.cs (6)
109o.Listen(IPAddress.Parse("127.0.0.1"), http3Port, listenOptions => 114o.Listen(IPAddress.Parse("127.0.0.1"), http1Port, listenOptions => 149o.Listen(IPAddress.Parse("127.0.0.1"), 0, listenOptions => 186o.Listen(IPAddress.Parse("127.0.0.1"), port, listenOptions => 224o.Listen(IPAddress.Parse("127.0.0.1"), port, listenOptions => 295o.Listen(IPAddress.Parse("127.0.0.1"), port, listenOptions =>
Microsoft.AspNetCore.TestHost.Tests (2)
ClientHandlerTests.cs (2)
267Assert.Equal(IPAddress.Parse("1.1.1.1"), features.Get<IHttpConnectionFeature>().RemoteIpAddress); 270context.Connection.RemoteIpAddress = IPAddress.Parse("1.1.1.1");
Microsoft.Extensions.Diagnostics.ResourceMonitoring (2)
Windows\Network\WindowsTcpStateInfo.cs (2)
34.Select(s => (uint)IPAddress.Parse(s).Address) 39.Select(s => IPAddress.Parse(s).GetAddressBytes())
Microsoft.Extensions.ServiceDiscovery.Dns.Tests (4)
DnsSrvServiceEndpointResolverTests.cs (4)
92new ARecord(new ResourceRecordInfo("srv-a", ResourceRecordType.A, queryClass, 64, 0), IPAddress.Parse("10.10.10.10")), 120Assert.Equal(new IPEndPoint(IPAddress.Parse("10.10.10.10"), 8888), eps[0].EndPoint); 154new ARecord(new ResourceRecordInfo("srv-a", ResourceRecordType.A, queryClass, 64, 0), IPAddress.Parse("10.10.10.10")), 212Assert.Equal(new IPEndPoint(IPAddress.Parse("10.10.10.10"), 8888), eps[0].EndPoint);
Microsoft.Extensions.ServiceDiscovery.Tests (13)
ServiceEndpointResolverTests.cs (13)
91collection.Endpoints.Add(ServiceEndpoint.Create(new IPEndPoint(IPAddress.Parse("127.1.1.1"), 8080))); 96collection.Endpoints.Add(ServiceEndpoint.Create(new IPEndPoint(IPAddress.Parse("127.1.1.2"), 8888))); 116Assert.Equal(IPAddress.Parse("127.1.1.1"), ip.Address); 130Assert.Equal(new IPEndPoint(IPAddress.Parse("127.1.1.1"), 8080), endpoints[0]); 131Assert.Equal(new IPEndPoint(IPAddress.Parse("127.1.1.2"), 8888), endpoints[1]); 143collection.Endpoints.Add(ServiceEndpoint.Create(new IPEndPoint(IPAddress.Parse("127.1.1.1"), 8080))); 148collection.Endpoints.Add(ServiceEndpoint.Create(new IPEndPoint(IPAddress.Parse("127.1.1.2"), 8888))); 165Assert.Equal(IPAddress.Parse("127.1.1.1"), ip.Address); 179collection.Endpoints.Add(ServiceEndpoint.Create(new IPEndPoint(IPAddress.Parse("127.1.1.1"), 8080))); 184collection.Endpoints.Add(ServiceEndpoint.Create(new IPEndPoint(IPAddress.Parse("127.1.1.2"), 8888))); 202Assert.Equal(IPAddress.Parse("127.1.1.1"), ip.Address); 231collection.Endpoints.Add(ServiceEndpoint.Create(new IPEndPoint(IPAddress.Parse("127.1.1.1"), 8080))); 286Assert.Equal(IPAddress.Parse("127.1.1.1"), ip.Address);
Microsoft.Extensions.ServiceDiscovery.Yarp.Tests (1)
YarpServiceDiscoveryTests.cs (1)
282new ARecord(new ResourceRecordInfo("srv-a", ResourceRecordType.A, queryClass, 64, 0), IPAddress.Parse("10.10.10.10")),
Microsoft.Gen.Logging.Generated.Tests (3)
LogPropertiesTests.cs (3)
96P6 = IPAddress.Parse("192.168.10.1"), 97P7 = new IPEndPoint(IPAddress.Parse("192.168.10.1"), 42), 98P8 = new IPEndPoint(IPAddress.Parse("192.168.10.1"), 42),
Sockets.BindTests (1)
src\Servers\Kestrel\test\BindTests\AddressRegistrationTests.cs (1)
213var ip = IPAddress.Parse(builder.Host);
System.Net.NameResolution (1)
System\Net\Dns.cs (1)
297IPHostEntry ipHostEntry = GetHostEntryCore(IPAddress.Parse(address), AddressFamily.Unspecified);
System.Net.Primitives (1)
System\Net\IPAddress.cs (1)
313Parse(s);