Preparation for switch to Kestrel
Pre-releaseThe code base was heavily refactored in preparation for a switch to the Kestrel server.
Many properties, methods and classes are now obsolete. The messages are giving hints so that you can fix the warnings yourself. The obsolete API will be removed with 4.0.
New
- Feature interfaces to be queried through
IFtpConnection.Features
- Lazy instantiation of FTP command handlers
- Using attributes for FTP command handlers and extensions
IFtpCommandActivator
that sets the FTP command handlers context- Quickstart sample
Fixed
- Fixed deadlock in
MultiBindingTcpListener
- MLST now returining a real list (bug introduced with v3.0.0-beta.5)
- Thread safe increment/decrement for connection counter (fixes #68)
Removed
IAccountInformation.AuthenticatedBy
: There's no reason for this
Breaking changes
Moved PromiscuousPasv
into PasvCommandOptions
The new location is a better fit.
FTP command handler not registgered in DI container
The FTP command handlers and extensions aren't registered in the service collection (for dependency injection) any more. We're now using implementations of the following DI services:
IFtpCommandHandlerScanner
which scans for types that may implement FTP command handlersIFtpCommandHandlerProvider
which returns information for all found FTP command handler types.
You can still add your FTP command handlers to the DI container, but those will be ignored from version 4.0 and up.
There are equivalent interfaces for FTP command handler extensions:
IFtpCommandHandlerExtensionScanner
IFtpCommandHandlerExtensionProvider
FTP command handlers require attributes
We're now able to write constructor-less FTP command handlers, but we now require new attributes.
FtpCommandHandlerAttribute
which gives the FTP command handler a name and defines if it needs a successful login or if it's abortableFtpCommandHandlerExtensionAttribute
is the equivalent ofFtpCommandHandlerAttribute
for FTP command handler extensions, likeOptsUtf8CommandExtension
forOPTS UTF8
FtpFeatureTextAttribute
defines the text to be returned by theFEAT
commandFtpFeatureFunctionAttribute
defines the function that returns the text to be returned by theFEAT
command