C# Class HostsEditor.Models.HostEntry

显示文件 Open project: ViewModelSoftware/HostsEditor Class Usage Examples

Public Methods

Method Description
GetRecord ( ) : string

Returns a valid formatted host entry for writing to the hosts file.

NewHostEntry ( string hostname, string ipAddress ) : HostEntry
Parse ( string hostEntryLine ) : HostEntry

Parses a line from the host file into an HostEntry object.

Private Methods

Method Description
HostEntry ( ) : System
HostEntry ( string hostEntryLine ) : System

Method Details

GetRecord() public method

Returns a valid formatted host entry for writing to the hosts file.
public GetRecord ( ) : string
return string

NewHostEntry() public static method

public static NewHostEntry ( string hostname, string ipAddress ) : HostEntry
hostname string
ipAddress string
return HostEntry

Parse() public static method

Parses a line from the host file into an HostEntry object.
public static Parse ( string hostEntryLine ) : HostEntry
hostEntryLine string The line from the hosts file to parse.
return HostEntry