Skip to content
Docs Try Aspire

EndpointHostHelpers Methods

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