Share via


EndpointHostHelpers.IsLocalhostOrLocalhostTld Method

Definition

Overloads

IsLocalhostOrLocalhostTld(String)

Determines whether the specified host is "localhost" or uses the ".localhost" top-level domain.

IsLocalhostOrLocalhostTld(Uri)

Determines whether the specified URI uses a host that is "localhost" or ends with ".localhost".

IsLocalhostOrLocalhostTld(String)

Source:
EndpointHostHelpers.cs

Determines whether the specified host is "localhost" or uses the ".localhost" top-level domain.

public static bool IsLocalhostOrLocalhostTld(string? host);
static member IsLocalhostOrLocalhostTld : string -> bool
Public Shared Function IsLocalhostOrLocalhostTld (host As String) As Boolean

Parameters

host
String

The host to check.

Returns

true if the host is "localhost" (case-insensitive) or ends with ".localhost" (case-insensitive); otherwise, false.

Applies to

IsLocalhostOrLocalhostTld(Uri)

Source:
EndpointHostHelpers.cs

Determines whether the specified URI uses a host that is "localhost" or ends with ".localhost".

public static bool IsLocalhostOrLocalhostTld(Uri? uri);
static member IsLocalhostOrLocalhostTld : Uri -> bool
Public Shared Function IsLocalhostOrLocalhostTld (uri As Uri) As Boolean

Parameters

uri
Uri

Returns

true if the host is "localhost" (case-insensitive) or ends with ".localhost" (case-insensitive); otherwise, false.

Applies to