C# Class Sage.Configuration.IpAddress

Provides a structure for storing and comparing IP addresses and ranges.
Inheritance: IXmlConvertible
Mostra file Open project: igorfrance/sage Class Usage Examples

Public Methods

Method Description
Equals ( IpAddress other ) : bool

Compares this ip address with another ip address.

Equals ( object obj ) : bool
FromNumber ( uint address ) : string

Gets the string representation of the specified address.

FromString ( string address ) : uint

Converts the specified address from string to a 32bit integer.

GetHashCode ( ) : int
IpAddress ( XmlElement configElement ) : System

Initializes a new instance of the IpAddress class.

IpAddress ( string address ) : System

Initializes a new instance of the IpAddress class, using the specified address string to initialize it's Address property.

IpAddress ( string address, string to ) : System

Initializes a new instance of the IpAddress class, using the specified address and to strings to initialize it's Address and To properties.

Matches ( string address ) : bool

Matches this IpAddress with the specified address.

Parse ( XmlElement element ) : void
ToString ( ) : string
ToXml ( XmlDocument document ) : XmlElement
operator ( ) : bool

Implements the operator !=.

Method Details

Equals() public method

Compares this ip address with another ip address.
public Equals ( IpAddress other ) : bool
other IpAddress The ip address to compare this ip address with.
return bool

Equals() public method

public Equals ( object obj ) : bool
obj object
return bool

FromNumber() public static method

Gets the string representation of the specified address.
public static FromNumber ( uint address ) : string
address uint The address to convert.
return string

FromString() public static method

Converts the specified address from string to a 32bit integer.
public static FromString ( string address ) : uint
address string The IP address string to convert.
return uint

GetHashCode() public method

public GetHashCode ( ) : int
return int

IpAddress() public method

Initializes a new instance of the IpAddress class.
public IpAddress ( XmlElement configElement ) : System
configElement System.Xml.XmlElement The configuration element that defines this IP address.
return System

IpAddress() public method

Initializes a new instance of the IpAddress class, using the specified address string to initialize it's Address property.
public IpAddress ( string address ) : System
address string The IP address as a string (e.g. '204.27.198.20').
return System

IpAddress() public method

Initializes a new instance of the IpAddress class, using the specified address and to strings to initialize it's Address and To properties.
public IpAddress ( string address, string to ) : System
address string The begin IP address of a range, represented with a string (e.g. '204.27.198.20').
to string The end IP address of a range, represented with a string (e.g. '204.27.198.60').
return System

Matches() public method

Matches this IpAddress with the specified address.
public Matches ( string address ) : bool
address string The IP address to test.
return bool

Parse() public method

public Parse ( XmlElement element ) : void
element System.Xml.XmlElement
return void

ToString() public method

public ToString ( ) : string
return string

ToXml() public method

public ToXml ( XmlDocument document ) : XmlElement
document System.Xml.XmlDocument
return System.Xml.XmlElement

operator() public static method

Implements the operator !=.
public static operator ( ) : bool
return bool