C# Class MvcThrottle.IpAddressParser

Inheritance: IIpAddressParser
Mostra file Open project: stefanprodan/MvcThrottle Class Usage Examples

Public Methods

Method Description
ContainsIp ( List ipRules, string clientIp ) : bool
ContainsIp ( List ipRules, string clientIp, string &rule ) : bool
GetClientIp ( System.Web.HttpRequestBase request ) : string
IsPrivateIpAddress ( string ipAddress ) : bool
ParseIp ( string ipAddress ) : IPAddress

Parse IP by stripping port value if any (fix for Azure LB)

Method Details

ContainsIp() public method

public ContainsIp ( List ipRules, string clientIp ) : bool
ipRules List
clientIp string
return bool

ContainsIp() public method

public ContainsIp ( List ipRules, string clientIp, string &rule ) : bool
ipRules List
clientIp string
rule string
return bool

GetClientIp() public method

public GetClientIp ( System.Web.HttpRequestBase request ) : string
request System.Web.HttpRequestBase
return string

IsPrivateIpAddress() public method

public IsPrivateIpAddress ( string ipAddress ) : bool
ipAddress string
return bool

ParseIp() public method

Parse IP by stripping port value if any (fix for Azure LB)
public ParseIp ( string ipAddress ) : IPAddress
ipAddress string
return System.Net.IPAddress