Share via


TextSearchProvider Constructor

Definition

Initializes a new instance of the TextSearchProvider class.

public TextSearchProvider(Func<string,System.Threading.CancellationToken,System.Threading.Tasks.Task<System.Collections.Generic.IEnumerable<Microsoft.Agents.AI.TextSearchProvider.TextSearchResult>>> searchAsync, Microsoft.Agents.AI.TextSearchProviderOptions? options = default, Microsoft.Extensions.Logging.ILoggerFactory? loggerFactory = default);
new Microsoft.Agents.AI.TextSearchProvider : Func<string, System.Threading.CancellationToken, System.Threading.Tasks.Task<seq<Microsoft.Agents.AI.TextSearchProvider.TextSearchResult>>> * Microsoft.Agents.AI.TextSearchProviderOptions * Microsoft.Extensions.Logging.ILoggerFactory -> Microsoft.Agents.AI.TextSearchProvider
Public Sub New (searchAsync As Func(Of String, CancellationToken, Task(Of IEnumerable(Of TextSearchProvider.TextSearchResult))), Optional options As TextSearchProviderOptions = Nothing, Optional loggerFactory As ILoggerFactory = Nothing)

Parameters

searchAsync
Func<String,CancellationToken,Task<IEnumerable<TextSearchProvider.TextSearchResult>>>

Delegate that executes the search logic. Must not be null.

options
TextSearchProviderOptions

Optional configuration options.

loggerFactory
ILoggerFactory

Optional logger factory.

Exceptions

Thrown when searchAsync is null.

Applies to