Interface ISshEndpoint
- Namespace
- SshSharp.Extensions.DependencyInjection
- Assembly
- SshSharp.Extensions.DependencyInjection.dll
One endpoint registered with services.AddSshClient(name), resolved by its name as a keyed service:
[FromKeyedServices("deploy")] ISshEndpoint deploy, or GetRequiredKeyedService<ISshEndpoint>("deploy"). It is
ISshConnectionProvider and ISshClientFactory for that one name, with the same lifetimes: a singleton,
whose shared connection is the provider's.
public interface ISshEndpoint
- Extension Methods
Properties
- Name
The endpoint's name, as registered with
AddSshClient.
Methods
- ConnectAsync(CancellationToken)
A new connection to the endpoint, as ConnectAsync(string, CancellationToken) opens it: the caller owns it and disposes it.
- GetClientAsync(CancellationToken)
The endpoint's shared connection, as GetClientAsync(string, CancellationToken) returns it: owned by the provider, not to be disposed.
- WatchAsync(CancellationToken)
The changes of the endpoint's shared connection, as WatchAsync(string, CancellationToken) gives them.