Class SubnetUtils
This class supposed to be the partial replacement of the Apache SubnetUtils class for one use case: check if the host is in IP range.
Inheritance
System.Object
SubnetUtils
Inherited Members
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Namespace: FixAntenna.Common.Utils
Assembly: FixAntenna.Common.dll
Syntax
public class SubnetUtils
Constructors
SubnetUtils(String, Boolean)
Declaration
public SubnetUtils(string subnet, bool inclusive = false)
Parameters
Type | Name | Description |
---|---|---|
System.String | subnet | |
System.Boolean | inclusive |
Methods
IsInRange(String)
Declaration
public bool IsInRange(string host)
Parameters
Type | Name | Description |
---|---|---|
System.String | host |
Returns
Type | Description |
---|---|
System.Boolean |
ParseIpMasks(String)
Declaration
public static SubnetUtils[] ParseIpMasks(string ipStr)
Parameters
Type | Name | Description |
---|---|---|
System.String | ipStr |
Returns
Type | Description |
---|---|
SubnetUtils[] |