Share via


IngestionPipeline<T>.ProcessAsync Method

Definition

Overloads

Name Description
ProcessAsync(IEnumerable<FileInfo>, CancellationToken)

Processes the specified files.

ProcessAsync(DirectoryInfo, String, SearchOption, CancellationToken)

Processes all files in the specified directory that match the given search pattern and option.

ProcessAsync(IEnumerable<FileInfo>, CancellationToken)

Source:
IngestionPipeline.cs

Processes the specified files.

public System.Collections.Generic.IAsyncEnumerable<Microsoft.Extensions.DataIngestion.IngestionResult> ProcessAsync(System.Collections.Generic.IEnumerable<System.IO.FileInfo> files, System.Threading.CancellationToken cancellationToken = default);
member this.ProcessAsync : seq<System.IO.FileInfo> * System.Threading.CancellationToken -> System.Collections.Generic.IAsyncEnumerable<Microsoft.Extensions.DataIngestion.IngestionResult>
Public Function ProcessAsync (files As IEnumerable(Of FileInfo), Optional cancellationToken As CancellationToken = Nothing) As IAsyncEnumerable(Of IngestionResult)

Parameters

files
IEnumerable<FileInfo>

The collection of files to process.

cancellationToken
CancellationToken

The cancellation token for the operation.

Returns

A task representing the asynchronous operation.

Applies to

ProcessAsync(DirectoryInfo, String, SearchOption, CancellationToken)

Source:
IngestionPipeline.cs

Processes all files in the specified directory that match the given search pattern and option.

public System.Collections.Generic.IAsyncEnumerable<Microsoft.Extensions.DataIngestion.IngestionResult> ProcessAsync(System.IO.DirectoryInfo directory, string searchPattern = "*.*", System.IO.SearchOption searchOption = System.IO.SearchOption.TopDirectoryOnly, System.Threading.CancellationToken cancellationToken = default);
member this.ProcessAsync : System.IO.DirectoryInfo * string * System.IO.SearchOption * System.Threading.CancellationToken -> System.Collections.Generic.IAsyncEnumerable<Microsoft.Extensions.DataIngestion.IngestionResult>
Public Function ProcessAsync (directory As DirectoryInfo, Optional searchPattern As String = "*.*", Optional searchOption As SearchOption = System.IO.SearchOption.TopDirectoryOnly, Optional cancellationToken As CancellationToken = Nothing) As IAsyncEnumerable(Of IngestionResult)

Parameters

directory
DirectoryInfo

The directory to process.

searchPattern
String

The search pattern for file selection.

searchOption
SearchOption

The search option for directory traversal.

cancellationToken
CancellationToken

The cancellation token for the operation.

Returns

A task representing the asynchronous operation.

Applies to