ServiceEndpoint.TryParse(String, ServiceEndpoint) Method

Definition

Tries to convert a specified string representation to its ServiceEndpoint equivalent, and returns a value that indicates whether the conversion succeeded.

public static bool TryParse(string? value, out Microsoft.Extensions.ServiceDiscovery.ServiceEndpoint? serviceEndpoint);
static member TryParse : string * ServiceEndpoint -> bool
Public Shared Function TryParse (value As String, ByRef serviceEndpoint As ServiceEndpoint) As Boolean

Parameters

value
String

A string that consists of an IP address or hostname, optionally followed by a colon and port number, or a URI.

serviceEndpoint
ServiceEndpoint

When this method returns, contains the equivalent ServiceEndpoint if the conversion succeeded; otherwise, null. This parameter is passed uninitialized; any value originally supplied will be overwritten.

Returns

true if the string was successfully parsed into a ServiceEndpoint; otherwise, false.

Applies to