KestrunHostMapExtensions.EndpointSpecParser.TryParse method

Parses an endpoint specification into host, port and optional HTTPS flag.

public static bool TryParse(string spec, out string host, out int port, out bool? https)
parameter description
spec Specification string. See TryParseEndpointSpec for accepted formats.
host Resolved host when successful, otherwise empty string.
port Resolved port when successful, otherwise 0.
https True for https, false for http, null when unspecified (host:port form).

Return Value

true if parsing succeeds; otherwise false.

See Also