C# Class PSHostsFile.HostsFile

Mostra file Open project: fschwiet/PSHostsFile

Public Methods

Method Description
Get ( string filepath = null ) : IEnumerable
GetHostLine ( string hostName, string address ) : string
GetHostsPath ( ) : string
GetSetHostTransform ( IEnumerable contents, string hostName, string address ) : IEnumerable
Remove ( Regex pattern ) : void
Remove ( string hostName ) : void
Set ( IEnumerable entries, string filepath = null ) : void
Set ( string hostname, string address, string filepath = null ) : void

Method Details

Get() public static method

public static Get ( string filepath = null ) : IEnumerable
filepath string
return IEnumerable

GetHostLine() public static method

public static GetHostLine ( string hostName, string address ) : string
hostName string
address string
return string

GetHostsPath() public static method

public static GetHostsPath ( ) : string
return string

GetSetHostTransform() public static method

public static GetSetHostTransform ( IEnumerable contents, string hostName, string address ) : IEnumerable
contents IEnumerable
hostName string
address string
return IEnumerable

Remove() public static method

public static Remove ( Regex pattern ) : void
pattern System.Text.RegularExpressions.Regex
return void

Remove() public static method

public static Remove ( string hostName ) : void
hostName string
return void

Set() public static method

public static Set ( IEnumerable entries, string filepath = null ) : void
entries IEnumerable
filepath string
return void

Set() public static method

public static Set ( string hostname, string address, string filepath = null ) : void
hostname string
address string
filepath string
return void