Unosquare
    Show / Hide Table of Contents

    Class IPParser

    Provides standard methods to parse IP address strings.

    Inheritance
    Object
    IPParser
    Inherited Members
    Object.ToString()
    Object.Equals(Object)
    Object.Equals(Object, Object)
    Object.ReferenceEquals(Object, Object)
    Object.GetHashCode()
    Object.GetType()
    Object.MemberwiseClone()
    Namespace: EmbedIO.Utilities
    Syntax
    public static class IPParser

    Methods

    IsCidrNotation(String)

    Determines whether the IP-range string is in CIDR notation.

    Declaration
    public static bool IsCidrNotation(string range)
    Parameters
    Type Name Description
    String range

    The IP-range string.

    Returns
    Type Description
    Boolean

    true if the IP-range string is CIDR notation; otherwise, false.

    IsSimpleIPRange(String)

    Determines whether the IP-range string is in simple IP range notation.

    Declaration
    public static bool IsSimpleIPRange(string range)
    Parameters
    Type Name Description
    String range

    The IP-range string.

    Returns
    Type Description
    Boolean

    true if the IP-range string is in simple IP range notation; otherwise, false.

    ParseAsync(String)

    Parses the specified IP address.

    Declaration
    public static Task<IEnumerable<IPAddress>> ParseAsync(string address)
    Parameters
    Type Name Description
    String address

    The IP address.

    Returns
    Type Description
    Task<IEnumerable<IPAddress>>

    A collection of parsed correctly from address.

    ParseCidrNotation(String)

    Parse IP-range string in CIDR notation. For example "12.15.0.0/16".

    Declaration
    public static IEnumerable<IPAddress> ParseCidrNotation(string range)
    Parameters
    Type Name Description
    String range

    The IP-range string.

    Returns
    Type Description
    IEnumerable<IPAddress>

    A collection of parsed correctly from range.

    TryParseSimpleIPRange(String)

    Tries to parse IP-range string "12.15-16.1-30.10-255"

    Declaration
    public static IEnumerable<IPAddress> TryParseSimpleIPRange(string range)
    Parameters
    Type Name Description
    String range

    The IP-range string.

    Returns
    Type Description
    IEnumerable<IPAddress>

    A collection of parsed correctly from range.

    Comments

    Back to top Copyright © 2017-2019 Unosquare