C# 클래스 BF2Statistics.HostsFile

파일 보기 프로젝트 열기: BF2Statistics/ControlCenter 1 사용 예제들

공개 프로퍼티들

프로퍼티 타입 설명
OrigContents List

보호된 프로퍼티들

프로퍼티 타입 설명
Entries IPAddress>.Dictionary
HostFile System.IO.FileInfo
Security System.Security.AccessControl.FileSecurity
WorldSid System.Security.Principal.SecurityIdentifier

공개 메소드들

메소드 설명
Get ( string Domain ) : IPAddress

Returns the IP address for the provided domain name

GetLines ( ) : IPAddress>.Dictionary

Returns a list of all current hosts file lines

HasAnyEntry ( IEnumerable Domains ) : bool

Returns whether the hostsfile contains any of the domain names provided

HasEntry ( string Domain ) : bool

Returns whether the hostsfile contains the specified domain name

HostsFile ( ) : System
Remove ( string Domain ) : bool

Removes a domain name from the hosts file

RemoveAll ( IEnumerable Domains ) : bool

Removes all of the specified domain names from the hosts file

Save ( ) : void

Saves all currently set domains and IPs to the hosts file

Set ( string Domain, IPAddress Ip ) : void

Sets a domain name with an IP in the hosts file

보호된 메소드들

메소드 설명
ParseEntries ( ) : void

메소드 상세

Get() 공개 메소드

Returns the IP address for the provided domain name
public Get ( string Domain ) : IPAddress
Domain string The domain name
리턴 System.Net.IPAddress

GetLines() 공개 메소드

Returns a list of all current hosts file lines
public GetLines ( ) : IPAddress>.Dictionary
리턴 IPAddress>.Dictionary

HasAnyEntry() 공개 메소드

Returns whether the hostsfile contains any of the domain names provided
public HasAnyEntry ( IEnumerable Domains ) : bool
Domains IEnumerable An array of domain names to check for
리턴 bool

HasEntry() 공개 메소드

Returns whether the hostsfile contains the specified domain name
public HasEntry ( string Domain ) : bool
Domain string The domain name
리턴 bool

HostsFile() 공개 메소드

public HostsFile ( ) : System
리턴 System

ParseEntries() 보호된 메소드

protected ParseEntries ( ) : void
리턴 void

Remove() 공개 메소드

Removes a domain name from the hosts file
public Remove ( string Domain ) : bool
Domain string The domain name
리턴 bool

RemoveAll() 공개 메소드

Removes all of the specified domain names from the hosts file
public RemoveAll ( IEnumerable Domains ) : bool
Domains IEnumerable
리턴 bool

Save() 공개 메소드

Saves all currently set domains and IPs to the hosts file
public Save ( ) : void
리턴 void

Set() 공개 메소드

Sets a domain name with an IP in the hosts file
public Set ( string Domain, IPAddress Ip ) : void
Domain string The domain name
Ip System.Net.IPAddress The IP address
리턴 void

프로퍼티 상세

Entries 보호되어 있는 프로퍼티

A list of "hostname" => "IPAddress" in the hosts file.
protected Dictionary Entries
리턴 IPAddress>.Dictionary

HostFile 보호되어 있는 프로퍼티

The fileinfo object for the HostsFile
protected FileInfo,System.IO HostFile
리턴 System.IO.FileInfo

OrigContents 공개적으로 프로퍼티

Each line of the hosts file stored in a list. ALl redirects are removed from this list before being stored here.
public List OrigContents
리턴 List

Security 보호되어 있는 프로퍼티

Hosts file security object
protected FileSecurity,System.Security.AccessControl Security
리턴 System.Security.AccessControl.FileSecurity

WorldSid 보호되어 있는 정적으로 프로퍼티

The windows permission that represents everyone
protected static SecurityIdentifier,System.Security.Principal WorldSid
리턴 System.Security.Principal.SecurityIdentifier