Skip to content
DocsTry Aspire
DocsTry

EndpointHostHelpers Methods

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