AspireSftpExtensions Methods
Class Methods 2 members
Provides extension methods for registering SFTP-related services in an
Hosting.IHostApplicationBuilder. AddKeyedSftpClient(IHostApplicationBuilder, string, Action<SftpSettings>) Section titled AddKeyedSftpClient(IHostApplicationBuilder, string, Action<SftpSettings>) extension Registers
SshNet.SftpClient as a keyed singleton for the given name in the services provided by the builder. public static class AspireSftpExtensions{ public static void AddKeyedSftpClient( this IHostApplicationBuilder builder, string name, Action<SftpSettings>? configureSettings = null) { // ... }}Parameters
builder IHostApplicationBuilder The Hosting.IHostApplicationBuilder to read config from and add services to. name string The connection name to use to find a connection string. configureSettings Action<SftpSettings> optional An optional method that can be used for customizing the SftpSettings. It's invoked after the settings are read from the configuration. AddSftpClient(IHostApplicationBuilder, string, Action<SftpSettings>) Section titled AddSftpClient(IHostApplicationBuilder, string, Action<SftpSettings>) extension Registers
SshNet.SftpClient as a singleton in the services provided by the builder. public static class AspireSftpExtensions{ public static void AddSftpClient( this IHostApplicationBuilder builder, string connectionName, Action<SftpSettings>? configureSettings = null) { // ... }}Parameters
builder IHostApplicationBuilder The Hosting.IHostApplicationBuilder to read config from and add services to. connectionName string The connection name to use to find a connection string. configureSettings Action<SftpSettings> optional An optional method that can be used for customizing the SftpSettings. It's invoked after the settings are read from the configuration.