Esempio n. 1
0
 /// <summary>Converts an integer value from network byte order to host byte order.</summary>
 /// <returns>An integer value, expressed in host byte order.</returns>
 /// <param name="network">The number to convert, expressed in network byte order. </param>
 public int NetworkToHostOrder(int network)
 {
     return(IPAddressAdapter.NetworkToHostOrder(network));
 }
Esempio n. 2
0
 /// <summary>Converts a long value from network byte order to host byte order.</summary>
 /// <returns>A long value, expressed in host byte order.</returns>
 /// <param name="network">The number to convert, expressed in network byte order. </param>
 public long NetworkToHostOrder(long network)
 {
     return(IPAddressAdapter.NetworkToHostOrder(network));
 }
Esempio n. 3
0
 /// <summary>Indicates whether the specified IP address is the loopback address.</summary>
 /// <returns>true if <paramref name="address" /> is the loopback address; otherwise, false.</returns>
 /// <param name="address">An IP address. </param>
 public bool IsLoopback(IPAddress address)
 {
     return(IPAddressAdapter.IsLoopback(address));
 }
Esempio n. 4
0
 /// <summary>Converts a short value from network byte order to host byte order.</summary>
 /// <returns>A short value, expressed in host byte order.</returns>
 /// <param name="network">The number to convert, expressed in network byte order. </param>
 public short NetworkToHostOrder(short network)
 {
     return(IPAddressAdapter.NetworkToHostOrder(network));
 }
Esempio n. 5
0
 /// <summary>Converts an integer value from host byte order to network byte order.</summary>
 /// <returns>An integer value, expressed in network byte order.</returns>
 /// <param name="host">The number to convert, expressed in host byte order. </param>
 public int HostToNetworkOrder(int host)
 {
     return(IPAddressAdapter.HostToNetworkOrder(host));
 }
Esempio n. 6
0
 /// <summary>Converts a long value from host byte order to network byte order.</summary>
 /// <returns>A long value, expressed in network byte order.</returns>
 /// <param name="host">The number to convert, expressed in host byte order. </param>
 public long HostToNetworkOrder(long host)
 {
     return(IPAddressAdapter.HostToNetworkOrder(host));
 }
Esempio n. 7
0
 /// <summary>Converts a short value from host byte order to network byte order.</summary>
 /// <returns>A short value, expressed in network byte order.</returns>
 /// <param name="host">The number to convert, expressed in host byte order. </param>
 public short HostToNetworkOrder(short host)
 {
     return(IPAddressAdapter.HostToNetworkOrder(host));
 }
Esempio n. 8
0
 /// <summary>Determines whether a string is a valid IP address.</summary>
 /// <returns>true if <paramref name="ipString" /> is a valid IP address; otherwise, false.</returns>
 /// <param name="ipString">The string to validate.</param>
 /// <param name="address">The <see cref="T:System.Net.IPAddress" /> version of the string.</param>
 public bool TryParse(string?ipString, [NotNullWhen(true)] out IIPAddress?address)
 {
     return(IPAddressAdapter.TryParse(ipString, out address));
 }
Esempio n. 9
0
 /// <summary>Converts an IP address span to an <see cref="T:System.Net.IPAddress" /> instance.</summary>
 /// <returns>An <see cref="T:System.Net.IPAddress" /> instance.</returns>
 /// <param name="ipString">A span that contains an IP address in dotted-quad notation for IPv4 and in colon-hexadecimal notation for IPv6. </param>
 /// <exception cref="T:System.ArgumentNullException">
 /// <paramref name="ipString" /> is null. </exception>
 /// <exception cref="T:System.FormatException">
 /// <paramref name="ipString" /> is not a valid IP address. </exception>
 public IIPAddress Parse(ReadOnlySpan <char> ipString)
 {
     return(IPAddressAdapter.Parse(ipString));
 }
Esempio n. 10
0
 /// <summary>Converts an IP address string to an <see cref="T:System.Net.IPAddress" /> instance.</summary>
 /// <returns>An <see cref="T:System.Net.IPAddress" /> instance.</returns>
 /// <param name="ipString">A string that contains an IP address in dotted-quad notation for IPv4 and in colon-hexadecimal notation for IPv6. </param>
 /// <exception cref="T:System.ArgumentNullException">
 /// <paramref name="ipString" /> is null. </exception>
 /// <exception cref="T:System.FormatException">
 /// <paramref name="ipString" /> is not a valid IP address. </exception>
 public IIPAddress Parse(string ipString)
 {
     return(IPAddressAdapter.Parse(ipString));
 }
Esempio n. 11
0
 /// <summary>Determines whether a string is a valid IP address.</summary>
 /// <returns>true if <paramref name="ipString" /> is a valid IP address; otherwise, false.</returns>
 /// <param name="ipString">The string to validate.</param>
 /// <param name="address">The <see cref="T:System.Net.IPAddress" /> version of the string.</param>
 public bool TryParse(string ipString, out IIPAddress address)
 {
     return(IPAddressAdapter.TryParse(ipString, out address));
 }