DependencyFound Delegate

Represents the callback method that is invoked when a dependency is found during scanning.

public delegate void DependencyFound(Dependency dependency)

Parameters

dependency Dependency
The dependency that was found.

Remarks

A directory scan or a multi-file scan scans several files concurrently, unless ScannerOptions.DegreeOfParallelism is 1, so the callback can be invoked concurrently from several threads and must be thread-safe. For instance, add the dependencies to a ConcurrentQueue<T> rather than to a List<T>. An exception thrown by the callback stops the scan, and the scan method reports it.