/// <summary>
 /// Called when a download is starting.
 /// </summary>
 /// <param name="sender">The sender.</param>
 /// <param name="e">The event args.</param>
 public override void OnDownloadStarting(object sender, DownloadStartingEventArgs e)
 {
     // Send the status to Twitter.
     this.UpdateStatus(_twitterUserName, _twitterPassword,
         string.Format("Download of file '{0}' has started (had {1} constraints)",
         e.Mapping.FileName, e.Mapping.Constraints.Count));
 }
Пример #2
0
 public void Validate(object sender, DownloadStartingEventArgs e)
 {
     this.Validate();
 }
Пример #3
0
 public virtual void OnDownloadStarting(object sender, DownloadStartingEventArgs e)
 {
 }
Пример #4
0
        /// <summary>
        /// Raises the download starting event.
        /// </summary>
        /// <param name="eventArgs">The event args.</param>
        protected virtual void OnDownloadStarting(DownloadStartingEventArgs eventArgs)
        {
            // Log the successful download.
            _logger.Info(String.Format(CultureInfo.CurrentCulture,
                "The download '{0}' is starting.", eventArgs.Mapping.Uri));

            // If there are any event handling methods subscribed, raise the event.
            EventHandler<DownloadStartingEventArgs> handler = this.DownloadStarting;
            if (handler != null)
            {
                handler(this, eventArgs);
            }
        }