C# Class EIP.Common.Core.Utils.IpBrowserUtil

Show file Open project: woshisunzewei/EIP

Public Methods

Method Description
GetAddressByApi ( ) : string

根据提供的api获取物理地址

GetBrowser ( ) : string

获取浏览器版本号

GetClientHost ( ) : string

GetClientIp ( ) : string

获取客户端Ip

GetGateway ( ) : string

得到网关地址

GetIp ( ) : string

获取客户端IP地址

GetLocalIPs ( ) : HashSet
GetLocalIp ( ) : string

得到本机IP

GetNetIp ( ) : string

获取公网IP

GetOsVersion ( ) : string

获取操作系统版本号

GetServerHost ( ) : string

获取本地计算机主机名

GetServerHostIp ( ) : string

IsIpAddress ( string str1 ) : bool

判断是否是IP地址格式 0.0.0.0

IsPingIp ( string strIp ) : bool

尝试Ping指定IP是否能够Ping通

IsRightIp ( string strIPadd ) : bool

判断是否为正确的IP地址

Method Details

GetAddressByApi() public static method

根据提供的api获取物理地址
public static GetAddressByApi ( ) : string
return string

GetBrowser() public static method

获取浏览器版本号
public static GetBrowser ( ) : string
return string

GetClientHost() public static method

public static GetClientHost ( ) : string
return string

GetClientIp() public static method

获取客户端Ip
public static GetClientIp ( ) : string
return string

GetGateway() public static method

得到网关地址
public static GetGateway ( ) : string
return string

GetIp() public static method

获取客户端IP地址
public static GetIp ( ) : string
return string

GetLocalIPs() public static method

public static GetLocalIPs ( ) : HashSet
return HashSet

GetLocalIp() public static method

得到本机IP
public static GetLocalIp ( ) : string
return string

GetNetIp() public static method

获取公网IP
public static GetNetIp ( ) : string
return string

GetOsVersion() public static method

获取操作系统版本号
public static GetOsVersion ( ) : string
return string

GetServerHost() public static method

获取本地计算机主机名
public static GetServerHost ( ) : string
return string

GetServerHostIp() public static method

public static GetServerHostIp ( ) : string
return string

IsIpAddress() public static method

判断是否是IP地址格式 0.0.0.0
public static IsIpAddress ( string str1 ) : bool
str1 string 待判断的IP地址
return bool

IsPingIp() public static method

尝试Ping指定IP是否能够Ping通
public static IsPingIp ( string strIp ) : bool
strIp string 指定IP
return bool

IsRightIp() public static method

判断是否为正确的IP地址
public static IsRightIp ( string strIPadd ) : bool
strIPadd string 需要判断的字符串
return bool