Class NpgsqlNetworkDbFunctionsExtensions
Provides extension methods supporting operator translation for PostgreSQL network types.
Namespace: Microsoft.EntityFrameworkCore
Assembly: Npgsql.EntityFrameworkCore.PostgreSQL.dll
Syntax
public static class NpgsqlNetworkDbFunctionsExtensions
Remarks
Methods
| Improve this Doc View SourceAbbreviate(DbFunctions, IPAddress)
Returns the abbreviated display format as text.
Declaration
public static string Abbreviate(this DbFunctions _, IPAddress inet)
Parameters
Type | Name | Description |
---|---|---|
DbFunctions | _ | The |
IPAddress | inet | The inet to abbreviate. |
Returns
Type | Description |
---|---|
string | The abbreviated display format as text. |
Remarks
| Improve this Doc View SourceAbbreviate(DbFunctions, (IPAddress Address, int Subnet))
Returns the abbreviated display format as text.
Declaration
public static string Abbreviate(this DbFunctions _, (IPAddress Address, int Subnet) cidr)
Parameters
Type | Name | Description |
---|---|---|
DbFunctions | _ | The |
(IPAddress Address, int Subnet) | cidr | The cidr to abbreviate. |
Returns
Type | Description |
---|---|
string | The abbreviated display format as text. |
Remarks
| Improve this Doc View SourceAdd(DbFunctions, IPAddress, int)
Adds the value
to the
Declaration
public static IPAddress Add(this DbFunctions _, IPAddress inet, int value)
Parameters
Type | Name | Description |
---|---|---|
DbFunctions | _ | The |
IPAddress | inet | The inet. |
int | value | The value to add. |
Returns
Type | Description |
---|---|
IPAddress | The |
Remarks
| Improve this Doc View SourceAdd(DbFunctions, (IPAddress Address, int Subnet), int)
Adds the value
to the (IPAddress Address, int Subnet).
Declaration
public static (IPAddress Address, int Subnet) Add(this DbFunctions _, (IPAddress Address, int Subnet) cidr, int value)
Parameters
Type | Name | Description |
---|---|---|
DbFunctions | _ | The |
(IPAddress Address, int Subnet) | cidr | The cidr. |
int | value | The value to add. |
Returns
Type | Description |
---|---|
(IPAddress Address, int Subnet) | The (IPAddress Address, int Subnet) augmented by the |
Remarks
| Improve this Doc View SourceBitwiseAnd(DbFunctions, IPAddress, IPAddress)
Computes the bitwise AND of two
Declaration
public static IPAddress BitwiseAnd(this DbFunctions _, IPAddress inet, IPAddress other)
Parameters
Type | Name | Description |
---|---|---|
DbFunctions | _ | The |
IPAddress | inet | The left-hand inet. |
IPAddress | other | The right-hand inet. |
Returns
Type | Description |
---|---|
IPAddress | The result of the bitwise AND operation. |
Remarks
| Improve this Doc View SourceBitwiseAnd(DbFunctions, PhysicalAddress, PhysicalAddress)
Computes the bitwise AND of two
Declaration
public static PhysicalAddress BitwiseAnd(this DbFunctions _, PhysicalAddress macaddr, PhysicalAddress other)
Parameters
Type | Name | Description |
---|---|---|
DbFunctions | _ | The |
PhysicalAddress | macaddr | The left-hand macaddr. |
PhysicalAddress | other | The right-hand macaddr. |
Returns
Type | Description |
---|---|
PhysicalAddress | The result of the bitwise AND operation. |
Remarks
| Improve this Doc View SourceBitwiseAnd(DbFunctions, (IPAddress Address, int Subnet), (IPAddress Address, int Subnet))
Computes the bitwise AND of two (IPAddress Address, int Subnet) instances.
Declaration
public static (IPAddress Address, int Subnet) BitwiseAnd(this DbFunctions _, (IPAddress Address, int Subnet) cidr, (IPAddress Address, int Subnet) other)
Parameters
Type | Name | Description |
---|---|---|
DbFunctions | _ | The |
(IPAddress Address, int Subnet) | cidr | The left-hand cidr. |
(IPAddress Address, int Subnet) | other | The right-hand cidr. |
Returns
Type | Description |
---|---|
(IPAddress Address, int Subnet) | The result of the bitwise AND operation. |
Remarks
| Improve this Doc View SourceBitwiseNot(DbFunctions, IPAddress)
Computes the bitwise NOT operation on an
Declaration
public static IPAddress BitwiseNot(this DbFunctions _, IPAddress inet)
Parameters
Type | Name | Description |
---|---|---|
DbFunctions | _ | The |
IPAddress | inet | The inet to negate. |
Returns
Type | Description |
---|---|
IPAddress | The result of the bitwise NOT operation. |
Remarks
| Improve this Doc View SourceBitwiseNot(DbFunctions, PhysicalAddress)
Computes the bitwise NOT operation on an
Declaration
public static PhysicalAddress BitwiseNot(this DbFunctions _, PhysicalAddress macaddr)
Parameters
Type | Name | Description |
---|---|---|
DbFunctions | _ | The |
PhysicalAddress | macaddr | The macaddr to negate. |
Returns
Type | Description |
---|---|
PhysicalAddress | The result of the bitwise NOT operation. |
Remarks
| Improve this Doc View SourceBitwiseNot(DbFunctions, (IPAddress Address, int Subnet))
Computes the bitwise NOT operation on an (IPAddress Address, int Subnet).
Declaration
public static (IPAddress Address, int Subnet) BitwiseNot(this DbFunctions _, (IPAddress Address, int Subnet) cidr)
Parameters
Type | Name | Description |
---|---|---|
DbFunctions | _ | The |
(IPAddress Address, int Subnet) | cidr | The cidr to negate. |
Returns
Type | Description |
---|---|
(IPAddress Address, int Subnet) | The result of the bitwise NOT operation. |
Remarks
| Improve this Doc View SourceBitwiseOr(DbFunctions, IPAddress, IPAddress)
Computes the bitwise OR of two
Declaration
public static IPAddress BitwiseOr(this DbFunctions _, IPAddress inet, IPAddress other)
Parameters
Type | Name | Description |
---|---|---|
DbFunctions | _ | The |
IPAddress | inet | The left-hand inet. |
IPAddress | other | The right-hand inet. |
Returns
Type | Description |
---|---|
IPAddress | The result of the bitwise OR operation. |
Remarks
| Improve this Doc View SourceBitwiseOr(DbFunctions, PhysicalAddress, PhysicalAddress)
Computes the bitwise OR of two
Declaration
public static PhysicalAddress BitwiseOr(this DbFunctions _, PhysicalAddress macaddr, PhysicalAddress other)
Parameters
Type | Name | Description |
---|---|---|
DbFunctions | _ | The |
PhysicalAddress | macaddr | The left-hand macaddr. |
PhysicalAddress | other | The right-hand macaddr. |
Returns
Type | Description |
---|---|
PhysicalAddress | The result of the bitwise OR operation. |
Remarks
| Improve this Doc View SourceBitwiseOr(DbFunctions, (IPAddress Address, int Subnet), (IPAddress Address, int Subnet))
Computes the bitwise OR of two (IPAddress Address, int Subnet) instances.
Declaration
public static (IPAddress Address, int Subnet) BitwiseOr(this DbFunctions _, (IPAddress Address, int Subnet) cidr, (IPAddress Address, int Subnet) other)
Parameters
Type | Name | Description |
---|---|---|
DbFunctions | _ | The |
(IPAddress Address, int Subnet) | cidr | The left-hand cidr. |
(IPAddress Address, int Subnet) | other | The right-hand cidr. |
Returns
Type | Description |
---|---|
(IPAddress Address, int Subnet) | The result of the bitwise OR operation. |
Remarks
| Improve this Doc View SourceBroadcast(DbFunctions, IPAddress)
Returns the broadcast address for a network.
Declaration
public static IPAddress Broadcast(this DbFunctions _, IPAddress inet)
Parameters
Type | Name | Description |
---|---|---|
DbFunctions | _ | The |
IPAddress | inet | The inet used to derive the broadcast address. |
Returns
Type | Description |
---|---|
IPAddress | The broadcast address for a network. |
Remarks
| Improve this Doc View SourceBroadcast(DbFunctions, (IPAddress Address, int Subnet))
Returns the broadcast address for a network.
Declaration
public static IPAddress Broadcast(this DbFunctions _, (IPAddress Address, int Subnet) cidr)
Parameters
Type | Name | Description |
---|---|---|
DbFunctions | _ | The |
(IPAddress Address, int Subnet) | cidr | The cidr used to derive the broadcast address. |
Returns
Type | Description |
---|---|
IPAddress | The broadcast address for a network. |
Remarks
| Improve this Doc View SourceContainedBy(DbFunctions, IPAddress, IPAddress)
Determines whether an
Declaration
public static bool ContainedBy(this DbFunctions _, IPAddress inet, IPAddress other)
Parameters
Type | Name | Description |
---|---|---|
DbFunctions | _ | The |
IPAddress | inet | The inet to locate. |
IPAddress | other | The inet to search. |
Returns
Type | Description |
---|---|
bool | True if the |
Remarks
| Improve this Doc View SourceContainedBy(DbFunctions, IPAddress, (IPAddress Address, int Subnet))
Determines whether an
Declaration
public static bool ContainedBy(this DbFunctions _, IPAddress inet, (IPAddress Address, int Subnet) other)
Parameters
Type | Name | Description |
---|---|---|
DbFunctions | _ | The |
IPAddress | inet | The inet to locate. |
(IPAddress Address, int Subnet) | other | The cidr to search. |
Returns
Type | Description |
---|---|
bool | True if the |
Remarks
| Improve this Doc View SourceContainedBy(DbFunctions, (IPAddress Address, int Subnet), (IPAddress Address, int Subnet))
Determines whether an (IPAddress Address, int Subnet) is contained within another (IPAddress Address, int Subnet).
Declaration
public static bool ContainedBy(this DbFunctions _, (IPAddress Address, int Subnet) cidr, (IPAddress Address, int Subnet) other)
Parameters
Type | Name | Description |
---|---|---|
DbFunctions | _ | The |
(IPAddress Address, int Subnet) | cidr | The cidr to locate. |
(IPAddress Address, int Subnet) | other | The cidr to search. |
Returns
Type | Description |
---|---|
bool | True if the (IPAddress Address, int Subnet) is contained within the other (IPAddress Address, int Subnet); otherwise, false. |
Remarks
| Improve this Doc View SourceContainedByOrEqual(DbFunctions, IPAddress, IPAddress)
Determines whether an
Declaration
public static bool ContainedByOrEqual(this DbFunctions _, IPAddress inet, IPAddress other)
Parameters
Type | Name | Description |
---|---|---|
DbFunctions | _ | The |
IPAddress | inet | The inet to locate. |
IPAddress | other | The inet to search. |
Returns
Type | Description |
---|---|
bool | True if the |
Remarks
| Improve this Doc View SourceContainedByOrEqual(DbFunctions, IPAddress, (IPAddress Address, int Subnet))
Determines whether an
Declaration
public static bool ContainedByOrEqual(this DbFunctions _, IPAddress inet, (IPAddress Address, int Subnet) other)
Parameters
Type | Name | Description |
---|---|---|
DbFunctions | _ | The |
IPAddress | inet | The inet to locate. |
(IPAddress Address, int Subnet) | other | The cidr to search. |
Returns
Type | Description |
---|---|
bool | True if the |
Remarks
| Improve this Doc View SourceContainedByOrEqual(DbFunctions, (IPAddress Address, int Subnet), (IPAddress Address, int Subnet))
Determines whether an (IPAddress Address, int Subnet) is contained within or equal to another (IPAddress Address, int Subnet).
Declaration
public static bool ContainedByOrEqual(this DbFunctions _, (IPAddress Address, int Subnet) cidr, (IPAddress Address, int Subnet) other)
Parameters
Type | Name | Description |
---|---|---|
DbFunctions | _ | The |
(IPAddress Address, int Subnet) | cidr | The cidr to locate. |
(IPAddress Address, int Subnet) | other | The cidr to search. |
Returns
Type | Description |
---|---|
bool | True if the (IPAddress Address, int Subnet) is contained within or equal to the other (IPAddress Address, int Subnet); otherwise, false. |
Remarks
| Improve this Doc View SourceContains(DbFunctions, IPAddress, IPAddress)
Determines whether an
Declaration
public static bool Contains(this DbFunctions _, IPAddress inet, IPAddress other)
Parameters
Type | Name | Description |
---|---|---|
DbFunctions | _ | The |
IPAddress | inet | The IP address to search. |
IPAddress | other | The IP address to locate. |
Returns
Type | Description |
---|---|
bool | True if the |
Remarks
| Improve this Doc View SourceContains(DbFunctions, (IPAddress Address, int Subnet), IPAddress)
Determines whether a network contains another
Declaration
public static bool Contains(this DbFunctions _, (IPAddress Address, int Subnet) cidr, IPAddress other)
Parameters
Type | Name | Description |
---|---|---|
DbFunctions | _ | The |
(IPAddress Address, int Subnet) | cidr | The network to search. |
IPAddress | other | The IP address to locate. |
Returns
Type | Description |
---|---|
bool | True if the network contains the other |
Remarks
| Improve this Doc View SourceContains(DbFunctions, (IPAddress Address, int Subnet), (IPAddress Address, int Subnet))
Determines whether an (IPAddress Address, int Subnet) contains another (IPAddress Address, int Subnet).
Declaration
public static bool Contains(this DbFunctions _, (IPAddress Address, int Subnet) cidr, (IPAddress Address, int Subnet) other)
Parameters
Type | Name | Description |
---|---|---|
DbFunctions | _ | The |
(IPAddress Address, int Subnet) | cidr | The cidr to search. |
(IPAddress Address, int Subnet) | other | The cidr to locate. |
Returns
Type | Description |
---|---|
bool | True if the (IPAddress Address, int Subnet) contains the other (IPAddress Address, int Subnet); otherwise, false. |
Remarks
| Improve this Doc View SourceContainsOrContainedBy(DbFunctions, IPAddress, IPAddress)
Determines whether an
Declaration
public static bool ContainsOrContainedBy(this DbFunctions _, IPAddress inet, IPAddress other)
Parameters
Type | Name | Description |
---|---|---|
DbFunctions | _ | The |
IPAddress | inet | The IP address to search. |
IPAddress | other | The IP address to locate. |
Returns
Type | Description |
---|---|
bool | True if the |
Remarks
| Improve this Doc View SourceContainsOrContainedBy(DbFunctions, IPAddress, (IPAddress Address, int Subnet))
Determines whether an
Declaration
public static bool ContainsOrContainedBy(this DbFunctions _, IPAddress inet, (IPAddress Address, int Subnet) other)
Parameters
Type | Name | Description |
---|---|---|
DbFunctions | _ | The |
IPAddress | inet | The IP address to search. |
(IPAddress Address, int Subnet) | other | The network to locate. |
Returns
Type | Description |
---|---|
bool | True if the |
Remarks
| Improve this Doc View SourceContainsOrContainedBy(DbFunctions, (IPAddress Address, int Subnet), IPAddress)
Determines whether a network contains or is contained by an
Declaration
public static bool ContainsOrContainedBy(this DbFunctions _, (IPAddress Address, int Subnet) cidr, IPAddress other)
Parameters
Type | Name | Description |
---|---|---|
DbFunctions | _ | The |
(IPAddress Address, int Subnet) | cidr | The network to search. |
IPAddress | other | The IP address to locate. |
Returns
Type | Description |
---|---|
bool | True if the network contains or is contained by the |
Remarks
| Improve this Doc View SourceContainsOrContainedBy(DbFunctions, (IPAddress Address, int Subnet), (IPAddress Address, int Subnet))
Determines whether an (IPAddress Address, int Subnet) contains or is contained by another (IPAddress Address, int Subnet).
Declaration
public static bool ContainsOrContainedBy(this DbFunctions _, (IPAddress Address, int Subnet) cidr, (IPAddress Address, int Subnet) other)
Parameters
Type | Name | Description |
---|---|---|
DbFunctions | _ | The |
(IPAddress Address, int Subnet) | cidr | The cidr to search. |
(IPAddress Address, int Subnet) | other | The cidr to locate. |
Returns
Type | Description |
---|---|
bool | True if the (IPAddress Address, int Subnet) contains or is contained by the other (IPAddress Address, int Subnet); otherwise, false. |
Remarks
| Improve this Doc View SourceContainsOrEqual(DbFunctions, IPAddress, IPAddress)
Determines whether an
Declaration
public static bool ContainsOrEqual(this DbFunctions _, IPAddress inet, IPAddress other)
Parameters
Type | Name | Description |
---|---|---|
DbFunctions | _ | The |
IPAddress | inet | The IP address to search. |
IPAddress | other | The IP address to locate. |
Returns
Type | Description |
---|---|
bool | True if the |
Remarks
| Improve this Doc View SourceContainsOrEqual(DbFunctions, (IPAddress Address, int Subnet), IPAddress)
Determines whether a network contains or is equal to another
Declaration
public static bool ContainsOrEqual(this DbFunctions _, (IPAddress Address, int Subnet) cidr, IPAddress other)
Parameters
Type | Name | Description |
---|---|---|
DbFunctions | _ | The |
(IPAddress Address, int Subnet) | cidr | The network to search. |
IPAddress | other | The IP address to locate. |
Returns
Type | Description |
---|---|
bool | True if the network contains or is equal to the other |
Remarks
| Improve this Doc View SourceContainsOrEqual(DbFunctions, (IPAddress Address, int Subnet), (IPAddress Address, int Subnet))
Determines whether an (IPAddress Address, int Subnet) contains or is equal to another (IPAddress Address, int Subnet).
Declaration
public static bool ContainsOrEqual(this DbFunctions _, (IPAddress Address, int Subnet) cidr, (IPAddress Address, int Subnet) other)
Parameters
Type | Name | Description |
---|---|---|
DbFunctions | _ | The |
(IPAddress Address, int Subnet) | cidr | The cidr to search. |
(IPAddress Address, int Subnet) | other | The cidr to locate. |
Returns
Type | Description |
---|---|
bool | True if the (IPAddress Address, int Subnet) contains or is equal to the other (IPAddress Address, int Subnet); otherwise, false. |
Remarks
| Improve this Doc View SourceFamily(DbFunctions, IPAddress)
Extracts the family of an address; 4 for IPv4, 6 for IPv6.
Declaration
public static int Family(this DbFunctions _, IPAddress inet)
Parameters
Type | Name | Description |
---|---|---|
DbFunctions | _ | The |
IPAddress | inet | The inet used to derive the family. |
Returns
Type | Description |
---|---|
int | The family of an address; 4 for IPv4, 6 for IPv6. |
Remarks
| Improve this Doc View SourceFamily(DbFunctions, (IPAddress Address, int Subnet))
Extracts the family of an address; 4 for IPv4, 6 for IPv6.
Declaration
public static int Family(this DbFunctions _, (IPAddress Address, int Subnet) cidr)
Parameters
Type | Name | Description |
---|---|---|
DbFunctions | _ | The |
(IPAddress Address, int Subnet) | cidr | The cidr used to derive the family. |
Returns
Type | Description |
---|---|
int | The family of an address; 4 for IPv4, 6 for IPv6. |
Remarks
| Improve this Doc View SourceGreaterThan(DbFunctions, IPAddress, IPAddress)
Determines whether an
Declaration
public static bool GreaterThan(this DbFunctions _, IPAddress inet, IPAddress other)
Parameters
Type | Name | Description |
---|---|---|
DbFunctions | _ | The |
IPAddress | inet | The left-hand inet. |
IPAddress | other | The right-hand inet. |
Returns
Type | Description |
---|---|
bool | True if the |
Remarks
| Improve this Doc View SourceGreaterThan(DbFunctions, PhysicalAddress, PhysicalAddress)
Determines whether an
Declaration
public static bool GreaterThan(this DbFunctions _, PhysicalAddress macaddr, PhysicalAddress other)
Parameters
Type | Name | Description |
---|---|---|
DbFunctions | _ | The |
PhysicalAddress | macaddr | The left-hand macaddr. |
PhysicalAddress | other | The right-hand macaddr. |
Returns
Type | Description |
---|---|
bool | True if the |
Remarks
| Improve this Doc View SourceGreaterThan(DbFunctions, (IPAddress Address, int Subnet), (IPAddress Address, int Subnet))
Determines whether an (IPAddress Address, int Subnet) is greater than another (IPAddress Address, int Subnet).
Declaration
public static bool GreaterThan(this DbFunctions _, (IPAddress Address, int Subnet) cidr, (IPAddress Address, int Subnet) other)
Parameters
Type | Name | Description |
---|---|---|
DbFunctions | _ | The |
(IPAddress Address, int Subnet) | cidr | The left-hand cidr. |
(IPAddress Address, int Subnet) | other | The right-hand cidr. |
Returns
Type | Description |
---|---|
bool | True if the (IPAddress Address, int Subnet) is greater than the other (IPAddress Address, int Subnet); otherwise, false. |
Remarks
| Improve this Doc View SourceGreaterThanOrEqual(DbFunctions, IPAddress, IPAddress)
Determines whether an
Declaration
public static bool GreaterThanOrEqual(this DbFunctions _, IPAddress inet, IPAddress other)
Parameters
Type | Name | Description |
---|---|---|
DbFunctions | _ | The |
IPAddress | inet | The left-hand inet. |
IPAddress | other | The right-hand inet. |
Returns
Type | Description |
---|---|
bool | True if the |
Remarks
| Improve this Doc View SourceGreaterThanOrEqual(DbFunctions, PhysicalAddress, PhysicalAddress)
Determines whether an
Declaration
public static bool GreaterThanOrEqual(this DbFunctions _, PhysicalAddress macaddr, PhysicalAddress other)
Parameters
Type | Name | Description |
---|---|---|
DbFunctions | _ | The |
PhysicalAddress | macaddr | The left-hand macaddr. |
PhysicalAddress | other | The right-hand macaddr. |
Returns
Type | Description |
---|---|
bool | True if the |
Remarks
| Improve this Doc View SourceGreaterThanOrEqual(DbFunctions, (IPAddress Address, int Subnet), (IPAddress Address, int Subnet))
Determines whether an (IPAddress Address, int Subnet) is greater than or equal to another (IPAddress Address, int Subnet).
Declaration
public static bool GreaterThanOrEqual(this DbFunctions _, (IPAddress Address, int Subnet) cidr, (IPAddress Address, int Subnet) other)
Parameters
Type | Name | Description |
---|---|---|
DbFunctions | _ | The |
(IPAddress Address, int Subnet) | cidr | The left-hand cidr. |
(IPAddress Address, int Subnet) | other | The right-hand cidr. |
Returns
Type | Description |
---|---|
bool | True if the (IPAddress Address, int Subnet) is greater than or equal to the other (IPAddress Address, int Subnet); otherwise, false. |
Remarks
| Improve this Doc View SourceHost(DbFunctions, IPAddress)
Extracts the host (i.e. the IP address) as text.
Declaration
public static string Host(this DbFunctions _, IPAddress inet)
Parameters
Type | Name | Description |
---|---|---|
DbFunctions | _ | The |
IPAddress | inet | The inet from which to extract the host. |
Returns
Type | Description |
---|---|
string | The host (i.e. the IP address) as text. |
Remarks
| Improve this Doc View SourceHost(DbFunctions, (IPAddress Address, int Subnet))
Extracts the host (i.e. the IP address) as text.
Declaration
public static string Host(this DbFunctions _, (IPAddress Address, int Subnet) cidr)
Parameters
Type | Name | Description |
---|---|---|
DbFunctions | _ | The |
(IPAddress Address, int Subnet) | cidr | The cidr from which to extract the host. |
Returns
Type | Description |
---|---|
string | The host (i.e. the IP address) as text. |
Remarks
| Improve this Doc View SourceHostMask(DbFunctions, IPAddress)
Constructs the host mask for the network.
Declaration
public static IPAddress HostMask(this DbFunctions _, IPAddress inet)
Parameters
Type | Name | Description |
---|---|---|
DbFunctions | _ | The |
IPAddress | inet | The inet used to construct the host mask. |
Returns
Type | Description |
---|---|
IPAddress | The constructed host mask. |
Remarks
| Improve this Doc View SourceHostMask(DbFunctions, (IPAddress Address, int Subnet))
Constructs the host mask for the network.
Declaration
public static IPAddress HostMask(this DbFunctions _, (IPAddress Address, int Subnet) cidr)
Parameters
Type | Name | Description |
---|---|---|
DbFunctions | _ | The |
(IPAddress Address, int Subnet) | cidr | The cidr used to construct the host mask. |
Returns
Type | Description |
---|---|
IPAddress | The constructed host mask. |
Remarks
| Improve this Doc View SourceLessThan(DbFunctions, IPAddress, IPAddress)
Determines whether an
Declaration
public static bool LessThan(this DbFunctions _, IPAddress inet, IPAddress other)
Parameters
Type | Name | Description |
---|---|---|
DbFunctions | _ | The |
IPAddress | inet | The left-hand inet. |
IPAddress | other | The right-hand inet. |
Returns
Type | Description |
---|---|
bool | True if the |
Remarks
| Improve this Doc View SourceLessThan(DbFunctions, PhysicalAddress, PhysicalAddress)
Determines whether an
Declaration
public static bool LessThan(this DbFunctions _, PhysicalAddress macaddr, PhysicalAddress other)
Parameters
Type | Name | Description |
---|---|---|
DbFunctions | _ | The |
PhysicalAddress | macaddr | The left-hand macaddr. |
PhysicalAddress | other | The right-hand macaddr. |
Returns
Type | Description |
---|---|
bool | True if the |
Remarks
| Improve this Doc View SourceLessThan(DbFunctions, (IPAddress Address, int Subnet), (IPAddress Address, int Subnet))
Determines whether an (IPAddress Address, int Subnet) is less than another (IPAddress Address, int Subnet).
Declaration
public static bool LessThan(this DbFunctions _, (IPAddress Address, int Subnet) cidr, (IPAddress Address, int Subnet) other)
Parameters
Type | Name | Description |
---|---|---|
DbFunctions | _ | The |
(IPAddress Address, int Subnet) | cidr | The left-hand cidr. |
(IPAddress Address, int Subnet) | other | The right-hand cidr. |
Returns
Type | Description |
---|---|
bool | True if the (IPAddress Address, int Subnet) is less than the other (IPAddress Address, int Subnet); otherwise, false. |
Remarks
| Improve this Doc View SourceLessThanOrEqual(DbFunctions, IPAddress, IPAddress)
Determines whether an
Declaration
public static bool LessThanOrEqual(this DbFunctions _, IPAddress inet, IPAddress other)
Parameters
Type | Name | Description |
---|---|---|
DbFunctions | _ | The |
IPAddress | inet | The left-hand inet. |
IPAddress | other | The right-hand inet. |
Returns
Type | Description |
---|---|
bool | True if the |
Remarks
| Improve this Doc View SourceLessThanOrEqual(DbFunctions, PhysicalAddress, PhysicalAddress)
Determines whether an
Declaration
public static bool LessThanOrEqual(this DbFunctions _, PhysicalAddress macaddr, PhysicalAddress other)
Parameters
Type | Name | Description |
---|---|---|
DbFunctions | _ | The |
PhysicalAddress | macaddr | The left-hand macaddr. |
PhysicalAddress | other | The right-hand macaddr. |
Returns
Type | Description |
---|---|
bool | True if the |
Remarks
| Improve this Doc View SourceLessThanOrEqual(DbFunctions, (IPAddress Address, int Subnet), (IPAddress Address, int Subnet))
Determines whether an (IPAddress Address, int Subnet) is less than or equal to another (IPAddress Address, int Subnet).
Declaration
public static bool LessThanOrEqual(this DbFunctions _, (IPAddress Address, int Subnet) cidr, (IPAddress Address, int Subnet) other)
Parameters
Type | Name | Description |
---|---|---|
DbFunctions | _ | The |
(IPAddress Address, int Subnet) | cidr | The left-hand cidr. |
(IPAddress Address, int Subnet) | other | The right-hand cidr. |
Returns
Type | Description |
---|---|
bool | True if the (IPAddress Address, int Subnet) is less than or equal to the other (IPAddress Address, int Subnet); otherwise, false. |
Remarks
| Improve this Doc View SourceMaskLength(DbFunctions, IPAddress)
Extracts the length of the subnet mask.
Declaration
public static int MaskLength(this DbFunctions _, IPAddress inet)
Parameters
Type | Name | Description |
---|---|---|
DbFunctions | _ | The |
IPAddress | inet | The inet used to extract the subnet length. |
Returns
Type | Description |
---|---|
int | The length of the subnet mask. |
Remarks
| Improve this Doc View SourceMaskLength(DbFunctions, (IPAddress Address, int Subnet))
Extracts the length of the subnet mask.
Declaration
public static int MaskLength(this DbFunctions _, (IPAddress Address, int Subnet) cidr)
Parameters
Type | Name | Description |
---|---|---|
DbFunctions | _ | The |
(IPAddress Address, int Subnet) | cidr | The cidr used to extract the subnet length. |
Returns
Type | Description |
---|---|
int | The length of the subnet mask. |
Remarks
| Improve this Doc View SourceMerge(DbFunctions, IPAddress, IPAddress)
Constructs the smallest network which includes both of the given networks.
Declaration
public static (IPAddress Address, int Subnet) Merge(this DbFunctions _, IPAddress inet, IPAddress other)
Parameters
Type | Name | Description |
---|---|---|
DbFunctions | _ | The |
IPAddress | inet | The first inet. |
IPAddress | other | The second inet. |
Returns
Type | Description |
---|---|
(IPAddress Address, int Subnet) | The smallest network which includes both of the given networks. |
Remarks
| Improve this Doc View SourceMerge(DbFunctions, (IPAddress Address, int Subnet), (IPAddress Address, int Subnet))
Constructs the smallest network which includes both of the given networks.
Declaration
public static (IPAddress Address, int Subnet) Merge(this DbFunctions _, (IPAddress Address, int Subnet) cidr, (IPAddress Address, int Subnet) other)
Parameters
Type | Name | Description |
---|---|---|
DbFunctions | _ | The |
(IPAddress Address, int Subnet) | cidr | The first cidr. |
(IPAddress Address, int Subnet) | other | The second cidr. |
Returns
Type | Description |
---|---|
(IPAddress Address, int Subnet) | The smallest network which includes both of the given networks. |
Remarks
| Improve this Doc View SourceNetmask(DbFunctions, IPAddress)
Constructs the subnet mask for the network.
Declaration
public static IPAddress Netmask(this DbFunctions _, IPAddress inet)
Parameters
Type | Name | Description |
---|---|---|
DbFunctions | _ | The |
IPAddress | inet | The inet used to construct the subnet mask. |
Returns
Type | Description |
---|---|
IPAddress | The subnet mask for the network. |
Remarks
| Improve this Doc View SourceNetmask(DbFunctions, (IPAddress Address, int Subnet))
Constructs the subnet mask for the network.
Declaration
public static IPAddress Netmask(this DbFunctions _, (IPAddress Address, int Subnet) cidr)
Parameters
Type | Name | Description |
---|---|---|
DbFunctions | _ | The |
(IPAddress Address, int Subnet) | cidr | The cidr used to construct the subnet mask. |
Returns
Type | Description |
---|---|
IPAddress | The subnet mask for the network. |
Remarks
| Improve this Doc View SourceNetwork(DbFunctions, IPAddress)
Extracts the network part of the address.
Declaration
public static (IPAddress Address, int Subnet) Network(this DbFunctions _, IPAddress inet)
Parameters
Type | Name | Description |
---|---|---|
DbFunctions | _ | The |
IPAddress | inet | The inet used to extract the network. |
Returns
Type | Description |
---|---|
(IPAddress Address, int Subnet) | The network part of the address. |
Remarks
| Improve this Doc View SourceNetwork(DbFunctions, (IPAddress Address, int Subnet))
Extracts the network part of the address.
Declaration
public static (IPAddress Address, int Subnet) Network(this DbFunctions _, (IPAddress Address, int Subnet) cidr)
Parameters
Type | Name | Description |
---|---|---|
DbFunctions | _ | The |
(IPAddress Address, int Subnet) | cidr | The cidr used to extract the network. |
Returns
Type | Description |
---|---|
(IPAddress Address, int Subnet) | The network part of the address. |
Remarks
| Improve this Doc View SourceSameFamily(DbFunctions, IPAddress, IPAddress)
Tests if the addresses are in the same family.
Declaration
public static bool SameFamily(this DbFunctions _, IPAddress inet, IPAddress other)
Parameters
Type | Name | Description |
---|---|---|
DbFunctions | _ | The |
IPAddress | inet | The primary inet. |
IPAddress | other | The other inet. |
Returns
Type | Description |
---|---|
bool | True if the addresses are in the same family; otherwise, false. |
Remarks
| Improve this Doc View SourceSameFamily(DbFunctions, (IPAddress Address, int Subnet), (IPAddress Address, int Subnet))
Tests if the addresses are in the same family.
Declaration
public static bool SameFamily(this DbFunctions _, (IPAddress Address, int Subnet) cidr, (IPAddress Address, int Subnet) other)
Parameters
Type | Name | Description |
---|---|---|
DbFunctions | _ | The |
(IPAddress Address, int Subnet) | cidr | The primary cidr. |
(IPAddress Address, int Subnet) | other | The other cidr. |
Returns
Type | Description |
---|---|
bool | True if the addresses are in the same family; otherwise, false. |
Remarks
| Improve this Doc View SourceSet7BitMac8(DbFunctions, PhysicalAddress)
Sets the 7th bit to one, also known as modified EUI-64, for inclusion in an IPv6 address.
Declaration
public static PhysicalAddress Set7BitMac8(this DbFunctions _, PhysicalAddress macAddress)
Parameters
Type | Name | Description |
---|---|---|
DbFunctions | _ | The |
PhysicalAddress | macAddress | The MAC address to modify. |
Returns
Type | Description |
---|---|
PhysicalAddress | The MAC address with the 7th bit set to one. |
Remarks
| Improve this Doc View SourceSetMaskLength(DbFunctions, IPAddress, int)
Sets the length of the subnet mask.
Declaration
public static IPAddress SetMaskLength(this DbFunctions _, IPAddress inet, int length)
Parameters
Type | Name | Description |
---|---|---|
DbFunctions | _ | The |
IPAddress | inet | The inet to modify. |
int | length | The subnet mask length to set. |
Returns
Type | Description |
---|---|
IPAddress | The network with a subnet mask of the specified length. |
Remarks
| Improve this Doc View SourceSetMaskLength(DbFunctions, (IPAddress Address, int Subnet), int)
Sets the length of the subnet mask.
Declaration
public static (IPAddress Address, int Subnet) SetMaskLength(this DbFunctions _, (IPAddress Address, int Subnet) cidr, int length)
Parameters
Type | Name | Description |
---|---|---|
DbFunctions | _ | The |
(IPAddress Address, int Subnet) | cidr | The cidr to modify. |
int | length | The subnet mask length to set. |
Returns
Type | Description |
---|---|
(IPAddress Address, int Subnet) | The network with a subnet mask of the specified length. |
Remarks
| Improve this Doc View SourceSubtract(DbFunctions, IPAddress, IPAddress)
Subtracts one
Declaration
public static int Subtract(this DbFunctions _, IPAddress inet, IPAddress other)
Parameters
Type | Name | Description |
---|---|---|
DbFunctions | _ | The |
IPAddress | inet | The inet from which to subtract. |
IPAddress | other | The inet to subtract. |
Returns
Type | Description |
---|---|
int | The numeric difference between the two given addresses. |
Remarks
| Improve this Doc View SourceSubtract(DbFunctions, IPAddress, int)
Subtracts the value
from the
Declaration
public static IPAddress Subtract(this DbFunctions _, IPAddress inet, int value)
Parameters
Type | Name | Description |
---|---|---|
DbFunctions | _ | The |
IPAddress | inet | The inet. |
int | value | The value to subtract. |
Returns
Type | Description |
---|---|
IPAddress | The |
Remarks
| Improve this Doc View SourceSubtract(DbFunctions, (IPAddress Address, int Subnet), int)
Subtracts the value
from the (IPAddress Address, int Subnet).
Declaration
public static (IPAddress Address, int Subnet) Subtract(this DbFunctions _, (IPAddress Address, int Subnet) cidr, int value)
Parameters
Type | Name | Description |
---|---|---|
DbFunctions | _ | The |
(IPAddress Address, int Subnet) | cidr | The inet. |
int | value | The value to subtract. |
Returns
Type | Description |
---|---|
(IPAddress Address, int Subnet) | The (IPAddress Address, int Subnet) augmented by the |
Remarks
| Improve this Doc View SourceSubtract(DbFunctions, (IPAddress Address, int Subnet), (IPAddress Address, int Subnet))
Subtracts one (IPAddress Address, int Subnet) from another (IPAddress Address, int Subnet).
Declaration
public static int Subtract(this DbFunctions _, (IPAddress Address, int Subnet) cidr, (IPAddress Address, int Subnet) other)
Parameters
Type | Name | Description |
---|---|---|
DbFunctions | _ | The |
(IPAddress Address, int Subnet) | cidr | The cidr from which to subtract. |
(IPAddress Address, int Subnet) | other | The cidr to subtract. |
Returns
Type | Description |
---|---|
int | The difference between the two addresses. |
Remarks
| Improve this Doc View SourceText(DbFunctions, IPAddress)
Extracts the IP address and subnet mask as text.
Declaration
public static string Text(this DbFunctions _, IPAddress inet)
Parameters
Type | Name | Description |
---|---|---|
DbFunctions | _ | The |
IPAddress | inet | The inet to extract as text. |
Returns
Type | Description |
---|---|
string | The IP address and subnet mask as text. |
Remarks
| Improve this Doc View SourceText(DbFunctions, (IPAddress Address, int Subnet))
Extracts the IP address and subnet mask as text.
Declaration
public static string Text(this DbFunctions _, (IPAddress Address, int Subnet) cidr)
Parameters
Type | Name | Description |
---|---|---|
DbFunctions | _ | The |
(IPAddress Address, int Subnet) | cidr | The cidr to extract as text. |
Returns
Type | Description |
---|---|
string | The IP address and subnet mask as text. |
Remarks
| Improve this Doc View SourceTruncate(DbFunctions, PhysicalAddress)
Sets the last 3 bytes of the MAC address to zero. For macaddr8, the last 5 bytes are set to zero.
Declaration
public static PhysicalAddress Truncate(this DbFunctions _, PhysicalAddress macAddress)
Parameters
Type | Name | Description |
---|---|---|
DbFunctions | _ | The |
PhysicalAddress | macAddress | The MAC address to truncate. |
Returns
Type | Description |
---|---|
PhysicalAddress | The MAC address with the last 3 bytes set to zero. For macaddr8, the last 5 bytes are set to zero. |