TextSearchProvider Constructor
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
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.