C# Class FubarDev.FtpServer.Address

Abstraction for an IP address
Exibir arquivo Open project: FubarDevelopment/FtpServer Class Usage Examples

Private Properties

Property Type Description
IsEnhancedAddress bool
ParseEnhanced Address
ParseLegacy Address

Public Methods

Method Description
Address ( AddressFamily addressFamily, string address, int port ) : System

Initializes a new instance of the Address class.

Address ( int port ) : System

Initializes a new instance of the Address class.

This constructor omits the address part.

Address ( string address, int port ) : System

Initializes a new instance of the Address class.

Parse ( string address ) : Address

Parses an IP address

ToString ( ) : string

Converts the IP address to a string as required by the PASV command

ToString ( bool logFormat ) : string

Converts the IP address into a string

ToUri ( ) : Uri

Converts this address to an URI

Private Methods

Method Description
IsEnhancedAddress ( string address ) : bool
ParseEnhanced ( string address ) : Address
ParseLegacy ( string address ) : Address

Method Details

Address() public method

Initializes a new instance of the Address class.
public Address ( AddressFamily addressFamily, string address, int port ) : System
addressFamily AddressFamily The IP address family
address string The IP address
port int The port
return System

Address() public method

Initializes a new instance of the Address class.
This constructor omits the address part.
public Address ( int port ) : System
port int The port
return System

Address() public method

Initializes a new instance of the Address class.
public Address ( string address, int port ) : System
address string IPv4 address
port int The port
return System

Parse() public static method

Parses an IP address
public static Parse ( string address ) : Address
address string The IP address to parse
return Address

ToString() public method

Converts the IP address to a string as required by the PASV command
public ToString ( ) : string
return string

ToString() public method

Converts the IP address into a string
public ToString ( bool logFormat ) : string
logFormat bool true when it should be converted to a loggable format, otherwise the FTP format is used
return string

ToUri() public method

Converts this address to an URI
public ToUri ( ) : Uri
return System.Uri