Пример #1
0
 /// <summary>
 /// Method being called on parse failure of each Urls string.
 /// Triggers OnParseFailed event.
 /// </summary>
 /// <param name="sender">
 /// caller object.
 /// </param>
 /// <param name="args">
 /// Event arguments as ParserEventArgs object.
 /// </param>
 private void OnInvalid(object sender, ParserEventArgs args)
 {
     if (args != null)
     {
         this.OnParseFailed?.Invoke(sender, args);
     }
 }
Пример #2
0
 /// <summary>
 /// Method that is called when parser event is triggered.
 /// Outputs event information on console.
 /// </summary>
 /// <param name="sender">
 /// Caller object.
 /// </param>
 /// <param name="args">
 /// Event arguments - event information.
 /// </param>
 public static void DisplayEvenet(object sender, ParserEventArgs args)
 {
     Console.WriteLine($"Unable to process line {args.Line} - {args.Message}");
 }