Beispiel #1
0
 /// <summary>
 /// Initializes a new instance of the <see cref="DirectoryScannerService{TInfo}" /> class.
 /// </summary>
 /// <param name="scanner">The scanner.</param>
 /// <param name="logger">The logger.</param>
 public DirectoryScannerService(IAsyncFileScanner <TInfo> scanner, ILogger logger)
     : base(logger)
 {
     scanner.Guard("scanner");
     this.scanner      = scanner;
     scanner.Progress += OnProgress;
 }
 /// <summary>
 /// Called from a ScannerWrapper when a progress update is "available"... (Called from a seperate thread)
 /// </summary>
 /// <param name="sender">The sender.</param>
 /// <param name="progress">The progress.</param>
 protected virtual void OnProgress(IAsyncFileScanner <TInfo> sender,
                                   double progress)
 {
     RaiseProgress(progress);
 }