/// <summary>
		/// Raises the <see cref="E:UriFound"/> event.
		/// </summary>
		/// <param name="e">The <see cref="ManagedFusion.Crawler.UriFoundEventArgs"/> instance containing the event data.</param>
		protected virtual void OnUriFound(UriFoundEventArgs e)
		{
			_related.Add(e.Element);

			if (UriFound != null)
				UriFound(this, e);
		}
Ejemplo n.º 2
0
		private static void bot_UriFound(object sender, UriFoundEventArgs e)
		{
			Console.ForegroundColor = ConsoleColor.Yellow;
			Console.WriteLine(e.Element.RequestedUri);
			Console.ResetColor();
		}
Ejemplo n.º 3
0
 /// <summary>
 /// Raises the <see cref="E:UriError"/> event.
 /// </summary>
 /// <param name="e">The <see cref="ManagedFusion.Crawler.UriFoundEventArgs"/> instance containing the event data.</param>
 private void OnUriError(UriFoundEventArgs e)
 {
     if (UriError != null)
         UriError(this, e);
 }
Ejemplo n.º 4
0
 /// <summary>
 /// Raises the <see cref="E:UriFound"/> event.
 /// </summary>
 /// <param name="e">The <see cref="ManagedFusion.Crawler.UriFoundEventArgs"/> instance containing the event data.</param>
 private void OnUriFound(UriFoundEventArgs e)
 {
     if (UriFound != null)
         UriFound(this, e);
 }
Ejemplo n.º 5
0
        /// <summary>
        /// Handles the UriFound event of the handler control.
        /// </summary>
        /// <param name="sender">The source of the event.</param>
        /// <param name="e">The <see cref="ManagedFusion.Crawler.UriFoundEventArgs"/> instance containing the event data.</param>
        private void handler_UriFound(object sender, UriFoundEventArgs e)
        {
            lock (_sync)
            {
                // make sure the URI hasn't been processed, is processing, or in queued up
                if (IsProcessingRequired(e.Element))
                {
                    _notProcessed.Enqueue(e.Element);

                    OnUriFound(new UriFoundEventArgs(e.Element));
                }
            }
        }