<PackageReference Include="System.ClientModel" Version="1.7.0" />

ClientConnection

public struct ClientConnection
Represents the connection options for a client.
public object Credential { get; }

Gets the credential.

Gets the kind of connection used by the client.

public string Id { get; }

Gets the connection identifier.

public string Locator { get; }

This is either URI, name, or something similar.

public IReadOnlyDictionary<string, string> Metadata { get; }

Metadata of the connection.

public ClientConnection(string id, string locator, object credential, CredentialKind credentialKind)

Initializes a new instance of the ClientConnection struct with a token credential.

public ClientConnection(string id, string locator)

Initializes a new instance of the ClientConnection struct with a with no authentication.

public ClientConnection(string id, string locator, object credential, CredentialKind credentialKind, IReadOnlyDictionary<string, string> metadata)

Initializes a new instance of the ClientConnection struct with the specified subclient ID. It is only for the JSON serializer.

public bool TryGetLocatorAsUri(out Uri uri)

Tries to convert the connection locator to a URI.