Class FtpCommandHandler
The base class for all FTP command handlers.
Inheritance
FtpCommandHandler
Inherited Members
Namespace: FubarDev.FtpServer.CommandHandlers
Assembly: FubarDev.FtpServer.Commands.dll
Syntax
public abstract class FtpCommandHandler : IFtpCommandHandler, IFtpCommandBase, IFeatureHost
Constructors
| Improve this Doc View SourceFtpCommandHandler()
Initializes a new instance of the FtpCommandHandler class.
Declaration
protected FtpCommandHandler()
FtpCommandHandler(String, String[])
Initializes a new instance of the FtpCommandHandler class.
Declaration
[Obsolete("The mapping from name to command handler is created by using the FtpCommandHandlerAttribute.")]
protected FtpCommandHandler(string name, params string[] alternativeNames)
Parameters
Type | Name | Description |
---|---|---|
String | name | The command name. |
String[] | alternativeNames | Alternative names. |
Properties
| Improve this Doc View SourceCommandContext
Gets or sets the FTP command context.
Declaration
public FtpCommandHandlerContext CommandContext { get; set; }
Property Value
Type | Description |
---|---|
FtpCommandHandlerContext |
Connection
Gets the connection this command was created for.
Declaration
protected IFtpConnection Connection { get; }
Property Value
Type | Description |
---|---|
IFtpConnection |
Data
Gets the connection data.
Declaration
[Obsolete("Query the information using the Features property instead.")]
protected FtpConnectionData Data { get; }
Property Value
Type | Description |
---|---|
FtpConnectionData |
FtpContext
Gets the connection this command was created for.
Declaration
protected FtpContext FtpContext { get; }
Property Value
Type | Description |
---|---|
FtpContext |
IsAbortable
Declaration
[Obsolete("Information about an FTP command handler can be queried through the IFtpCommandHandlerProvider service.")]
public virtual bool IsAbortable { get; }
Property Value
Type | Description |
---|---|
Boolean |
IsLoginRequired
Declaration
[Obsolete("Information about an FTP command handler can be queried through the IFtpCommandHandlerProvider service.")]
public virtual bool IsLoginRequired { get; }
Property Value
Type | Description |
---|---|
Boolean |
Names
Declaration
[Obsolete("The mapping from name to command handler is created by using the FtpCommandHandlerAttribute.")]
public IReadOnlyCollection<string> Names { get; }
Property Value
Type | Description |
---|---|
IReadOnlyCollection<String> |
ServerMessages
Gets the server messages to be returned.
Declaration
protected IFtpServerMessages ServerMessages { get; }
Property Value
Type | Description |
---|---|
IFtpServerMessages |
Methods
| Improve this Doc View SourceGetExtensions()
Declaration
public virtual IEnumerable<IFtpCommandHandlerExtension> GetExtensions()
Returns
Type | Description |
---|---|
IEnumerable<IFtpCommandHandlerExtension> |
GetSupportedFeatures(IFtpConnection)
Declaration
[Obsolete("FTP command handlers (and other types) are now annotated with attributes implementing IFeatureInfo.")]
public virtual IEnumerable<IFeatureInfo> GetSupportedFeatures(IFtpConnection connection)
Parameters
Type | Name | Description |
---|---|---|
IFtpConnection | connection |
Returns
Type | Description |
---|---|
IEnumerable<IFeatureInfo> |
Process(FtpCommand, CancellationToken)
Declaration
public abstract Task<IFtpResponse? > Process(FtpCommand command, CancellationToken cancellationToken)
Parameters
Type | Name | Description |
---|---|---|
FtpCommand | command | |
CancellationToken | cancellationToken |
Returns
Type | Description |
---|---|
Task<Nullable<IFtpResponse>> |
T(String)
Translates a message using the current catalog of the active connection.
Declaration
protected string T(string message)
Parameters
Type | Name | Description |
---|---|---|
String | message | The message to translate. |
Returns
Type | Description |
---|---|
String | The translated message. |
T(String, Nullable<Object>[])
Translates a message using the current catalog of the active connection.
Declaration
[StringFormatMethod("message")]
protected string T(string message, params object? [] args)
Parameters
Type | Name | Description |
---|---|---|
String | message | The message to translate. |
Nullable<Object>[] | args | The format arguments. |
Returns
Type | Description |
---|---|
String | The translated message. |