Class ConnectionExtensions
Extension methods for IFtpConnection.
Inherited Members
Namespace: FubarDev.FtpServer
Assembly: FubarDev.FtpServer.Abstractions.dll
Syntax
public static class ConnectionExtensions
Methods
| Improve this Doc View SourceExecuteCommand(IFtpConnection, FtpCommand, Func<FtpCommand, CancellationToken, Task<Nullable<IFtpResponse>>>, Nullable<ILogger>, CancellationToken)
Executes some code with error handling.
Declaration
public static Task<IFtpResponse? > ExecuteCommand(this IFtpConnection connection, FtpCommand command, Func<FtpCommand, CancellationToken, Task<IFtpResponse? >> commandAction, ILogger? logger, CancellationToken cancellationToken)
Parameters
Type | Name | Description |
---|---|---|
IFtpConnection | connection | The connection to execute the code for. |
FtpCommand | command | The command to execute the code for. |
Func<FtpCommand, CancellationToken, Task<Nullable<IFtpResponse>>> | commandAction | The action to be executed. |
Nullable<ILogger> | logger | The logger to be used for logging. |
CancellationToken | cancellationToken | The cancellation token to signal command abortion. |
Returns
Type | Description |
---|---|
Task<Nullable<IFtpResponse>> | The task with the (optional) response. |