Class SearchPluginWrapper
Wraps an instance of ISearch with the provided plugins.
Implements
Inherited Members
Namespace: StrixMusic.Sdk.PluginModels
Assembly: StrixMusic.Sdk.dll
Syntax
public class SearchPluginWrapper : ISearch, ISearchBase, IAppModel, IMerged<ICoreSearch>, IEquatable<ICoreSearch>, IMerged, IPluginWrapper
Constructors
| Improve this Doc View SourceSearchPluginWrapper(ISearch, params SdkModelPlugin[])
Initializes a new instance of the SearchPluginWrapper class.
Declaration
public SearchPluginWrapper(ISearch search, params SdkModelPlugin[] plugins)
Parameters
Type | Name | Description |
---|---|---|
ISearch | search | The instance to wrap around and apply plugins to. |
SdkModelPlugin[] | plugins | The plugins that are applied to items returned from or emitted by this collection. |
Properties
| Improve this Doc View SourceActivePlugins
All plugins that were imported and activated for this instance.
Declaration
public SdkModelPlugin ActivePlugins { get; }
Property Value
Type | Description |
---|---|
SdkModelPlugin |
Remarks
Once built, the returned instance will have plugins applied on top of the <xref href="StrixMusic.Sdk.AdapterModels.IMergedMutable%601" data-throw-if-not-resolved="false"></xref> instance.
If no plugins override functionality when accessing a member, the provided <xref href="StrixMusic.Sdk.AdapterModels.IMergedMutable%601" data-throw-if-not-resolved="false"></xref> will be used instead.
See SdkModelPlugin for more info.
See Also
| Improve this Doc View SourceSearchHistory
Contains items that the user has recently selected from the search results.
Declaration
public ISearchHistory? SearchHistory { get; }
Property Value
Type | Description |
---|---|
ISearchHistory |
Sources
The sources that make up this merged item.
Declaration
public IReadOnlyList<ICoreSearch> Sources { get; }
Property Value
Type | Description |
---|---|
IReadOnlyList<ICoreSearch> |
Methods
| Improve this Doc View SourceEquals(ICoreSearch?)
Declaration
public bool Equals(ICoreSearch? other)
Parameters
Type | Name | Description |
---|---|---|
ICoreSearch | other |
Returns
Type | Description |
---|---|
bool |
GetRecentSearchQueries(CancellationToken)
Gets the recent search queries.
Declaration
public IAsyncEnumerable<ISearchQuery> GetRecentSearchQueries(CancellationToken cancellationToken = default)
Parameters
Type | Name | Description |
---|---|---|
CancellationToken | cancellationToken | A cancellation token that may be used to cancel the ongoing task. |
Returns
Type | Description |
---|---|
IAsyncEnumerable<ISearchQuery> | The recent search queries. |
GetSearchAutoCompleteAsync(string, CancellationToken)
Given a query, return suggested completed queries.
Declaration
public IAsyncEnumerable<string> GetSearchAutoCompleteAsync(string query, CancellationToken cancellationToken = default)
Parameters
Type | Name | Description |
---|---|---|
string | query | Search query |
CancellationToken | cancellationToken | A cancellation token that may be used to cancel the ongoing task. |
Returns
Type | Description |
---|---|
IAsyncEnumerable<string> | Suggested completed queries. |
GetSearchResultsAsync(string, CancellationToken)
Gets search results for a given query.
Declaration
public Task<ISearchResults> GetSearchResultsAsync(string query, CancellationToken cancellationToken = default)
Parameters
Type | Name | Description |
---|---|---|
string | query | The search query. |
CancellationToken | cancellationToken | A cancellation token that may be used to cancel the ongoing task. |
Returns
Type | Description |
---|---|
Task<ISearchResults> | A task representing the async operation. Value is ISearchResults. |
Events
| Improve this Doc View SourceSourcesChanged
Raised when any of the sources have changed.
Declaration
public event EventHandler? SourcesChanged
Event Type
Type | Description |
---|---|
EventHandler |