EndpointHostHelpers Methods
Class Methods 8 members
Provides helper methods for validating localhost addresses.
Determines whether the specified host ends with ".dev.localhost".
public static class EndpointHostHelpers{ public static bool IsDevLocalhostTld( string? host) { // ... }}Parameters
host string? The host to check. Returns
bool true if the host ends with ".dev.localhost" (case-insensitive); otherwise, false. Determines whether the specified URI uses a host that ends with ".dev.localhost".
public static class EndpointHostHelpers{ public static bool IsDevLocalhostTld( Uri? uri) { // ... }}Parameters
uri Uri? The URI to check. Returns
bool true if the host ends with ".dev.localhost" (case-insensitive); otherwise, false. Determines whether the specified host is "localhost".
public static class EndpointHostHelpers{ public static bool IsLocalhost( string? host) { // ... }}Parameters
host string? The host to check. Returns
bool true if the host is "localhost" (case-insensitive); otherwise, false. Determines whether the specified URI uses a host that is "localhost".
public static class EndpointHostHelpers{ public static bool IsLocalhost( Uri? uri) { // ... }}Parameters
uri Uri? The URI to check. Returns
bool true if the host is "localhost" (case-insensitive); otherwise, false. Determines whether the specified host is "localhost" or uses the ".localhost" top-level domain.
public static class EndpointHostHelpers{ public static bool IsLocalhostOrLocalhostTld( string? host) { // ... }}Parameters
host string? The host to check. Returns
bool true if the host is "localhost" (case-insensitive) or ends with ".localhost" (case-insensitive); otherwise, false. Determines whether the specified URI uses a host that is "localhost" or ends with ".localhost".
public static class EndpointHostHelpers{ public static bool IsLocalhostOrLocalhostTld( Uri? uri) { // ... }}Parameters
uri Uri? Returns
bool true if the host is "localhost" (case-insensitive) or ends with ".localhost" (case-insensitive); otherwise, false. Determines whether the specified host ends with ".localhost".
public static class EndpointHostHelpers{ public static bool IsLocalhostTld( string? host) { // ... }}Parameters
host string? The host to check. Returns
bool true if the host ends with ".localhost" (case-insensitive); otherwise, false. Determines whether the specified URI uses a host that is "localhost".
public static class EndpointHostHelpers{ public static bool IsLocalhostTld( Uri? uri) { // ... }}Parameters
uri Uri? The URI to check. Returns
bool true if the host ends with ".localhost" (case-insensitive); otherwise, false.