Table of Contents

Interface IDirectoryScanListener

Namespace
Quartz.Jobs
Assembly
Quartz.Jobs.dll

Interface for objects wishing to receive a 'call-back' from a DirectoryScanJob

public interface IDirectoryScanListener

Remarks

Implementations can be provided to DirectoryScanJob in two ways:

  1. Via dependency injection (recommended): Register the implementation in the DI container. The job will resolve it by type name specified via DirectoryScanListenerName.
  2. Via SchedulerContext (legacy): Store the instance in the SchedulerContext with a key matching the value specified in DirectoryScanListenerName.

Methods

FilesDeleted(IReadOnlyCollection<FileInfo>, CancellationToken)

ValueTask FilesDeleted(IReadOnlyCollection<FileInfo> deletedFiles, CancellationToken cancellationToken = default)

Parameters

deletedFiles IReadOnlyCollection<FileInfo>

An array of FileInfo objects that were deleted since the last scan of the directory

cancellationToken CancellationToken

The cancellation instruction.

Returns

ValueTask

FilesUpdatedOrAdded(IReadOnlyCollection<FileInfo>, CancellationToken)

ValueTask FilesUpdatedOrAdded(IReadOnlyCollection<FileInfo> updatedFiles, CancellationToken cancellationToken = default)

Parameters

updatedFiles IReadOnlyCollection<FileInfo>

An array of FileInfo objects that were updated/added since the last scan of the directory

cancellationToken CancellationToken

The cancellation instruction.

Returns

ValueTask