C# Class HostsEditor.Models.HostEntry

Afficher le fichier Open project: ViewModelSoftware/HostsEditor Class Usage Examples

Méthodes publiques

Méthode 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

Méthode Description
HostEntry ( ) : System
HostEntry ( string hostEntryLine ) : System

Method Details

GetRecord() public méthode

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

NewHostEntry() public static méthode

public static NewHostEntry ( string hostname, string ipAddress ) : HostEntry
hostname string
ipAddress string
Résultat HostEntry

Parse() public static méthode

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.
Résultat HostEntry