Class FtpCommandHandlerExtension
The base class for FTP command extensions.
Inheritance
FtpCommandHandlerExtension
Inherited Members
Namespace: FubarDev.FtpServer.CommandExtensions
Assembly: FubarDev.FtpServer.Commands.dll
Syntax
public abstract class FtpCommandHandlerExtension : IFtpCommandHandlerExtension, IFtpCommandBase
Constructors
| Improve this Doc View SourceFtpCommandHandlerExtension()
Initializes a new instance of the FtpCommandHandlerExtension class.
Declaration
protected FtpCommandHandlerExtension()
FtpCommandHandlerExtension(String, String, String[])
Initializes a new instance of the FtpCommandHandlerExtension class.
Declaration
[Obsolete("Use the FtpCommandHandlerExtensionAttribute together with an additional IFtpCommandHandlerExtensionScanner.")]
protected FtpCommandHandlerExtension(string extensionFor, string name, params string[] alternativeNames)
Parameters
| Type | Name | Description |
|---|---|---|
| String | extensionFor | The name of the command this extension is for. |
| 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 |
ExtensionFor
Declaration
public string ExtensionFor { get; }
Property Value
| Type | Description |
|---|---|
| String |
FtpContext
Gets the connection this command was created for.
Declaration
protected FtpContext FtpContext { get; }
Property Value
| Type | Description |
|---|---|
| FtpContext |
IsLoginRequired
Declaration
[Obsolete("Use the FtpCommandHandlerExtension attribute instead.")]
public virtual bool? IsLoginRequired { get; }
Property Value
| Type | Description |
|---|---|
| Nullable<Boolean> |
Names
Declaration
public IReadOnlyCollection<string> Names { get; }
Property Value
| Type | Description |
|---|---|
| IReadOnlyCollection<String> |
Methods
| Improve this Doc View SourceInitializeConnectionData()
Declaration
public abstract void InitializeConnectionData()
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, 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. |
| Object[] | args | The format arguments. |
Returns
| Type | Description |
|---|---|
| String | The translated message. |