I'm evaluating SharpBits for use in a project and have noticed the following:
I'm catching the OnJobTransferred event in order to notify the user that the file has downloaded. But I found that the event args parameter of the OnJobTransferred event doesn't contain any reference to the job that has actually completed. It
seems silly to have to walk thru the EnumJobs list to find which may have just completed. Is there a reason why the NotificationEventArgs gets converted to a "new JobNotificationEventArgs" in JobTransferred in BitsJob.cs? I tried changing
that to pass thru the NotificationEventArgs which does include the Job and that seems to work ok in my limited testing.
Secondly, after making the above change I found that the "File" property of the NotificationEventArgs is null. By adding "job.EnumFiles();" just before line 131 of BitsNotification.cs I'm able to get the files that were in the job
and that also seems to work ok.
Both of these issues seem so obvious that I can't believe that no one has noticed them yet...or am I missing something/have the wrong version of the source code, etc or is there a good reason why the app is coded this way?