Back to product page

PreTranslateCommandEvent event


Fires before command is sent to FTP server.

Syntax

  • C#
  • VB.NET
delegate void PreTranslateCommandDelegate(object Sender, FtpReplyArgs Args);
The PreTranslateCommandEvent(Args.Command,Args.ReplyCode,Args.ReplyText) syntax has these parts:
Args.CommandString. Command executed by wodFtpDLX.NET.
Args.ReplyCodeInteger. Holds reply code returned by the server.
Args.ReplyTextString. Full reply as returned by the server.

Delegate Sub PreTranslateCommandDelegate(ByVal Sender As Object, ByVal Args As FtpReplyArgs)
The PreTranslateCommandEvent(Args.Command,Args.ReplyCode,Args.ReplyText) syntax has these parts:
Args.CommandString. Command executed by wodFtpDLX.NET.
Args.ReplyCodeInteger. Holds reply code returned by the server.
Args.ReplyTextString. Full reply as returned by the server.

Remarks

This event can be used for monitoring commands that are sent to FTP (or FTPS) server before they are actually transmitted. At this point, you can change this Args.Command data and it will be sent as you define it - without wodFtpDLX.NET knowing anything about it.

Beware - what you're doing here is dangerous for wodFtpDLX.NET. You may break its internal mechanism of behavior, and strange results may occur. But - to provide you with more freedom over what's going on 'under the hood', we have provided this event for advanced users.

Note - this event will not fire in SFTP protocol.

Platforms

Windows