Showing the build progress. This requires just a small update to the code:
Things updates :
° updated the constructor so it takes the
BuildProgressInformation as an extra argument
° updated the creation of the ftp lib (duh)
° updated the
HandleMessages inside the ftplib to visualize the buildprogress info.
The new constructor
private Tasks.TaskBase CallingTask; private Util.BuildProgressInformation bpi;
public FtpLib(Tasks.TaskBase callingTask, Util.BuildProgressInformation buildProgressInformation) { CallingTask = callingTask; bpi = buildProgressInformation;
this.FtpServer = new EnterpriseDT.Net.Ftp.FTPConnection();
this.FtpServer.ReplyReceived += HandleMessages;
this.FtpServer.CommandSent += HandleMessages;
this.FtpServer.Downloaded += new EnterpriseDT.Net.Ftp.FTPFileTransferEventHandler(FtpServer_Downloaded);
this.FtpServer.Uploaded += new EnterpriseDT.Net.Ftp.FTPFileTransferEventHandler(FtpServer_Uploaded);
} |
Updating the handle message
private void HandleMessages(object sender, EnterpriseDT.Net.Ftp.FTPMessageEventArgs e) { bpi.AddTaskInformation(e.Message);
Log.Info(e.Message); } |
No comments:
Post a Comment