Skip to content
Docs Try Aspire

AspireMeilisearchExtensions Methods

Class Methods 2 members
Provides extension methods for registering Meilisearch-related services in an Hosting.IHostApplicationBuilder.
AddKeyedMeilisearchClient(IHostApplicationBuilder, string, Action<MeilisearchClientSettings>) Section titled AddKeyedMeilisearchClient(IHostApplicationBuilder, string, Action<MeilisearchClientSettings>) extension
Registers MeilisearchClient as a keyed singleton for the given name in the services provided by the builder.
public static class AspireMeilisearchExtensions
{
public static void AddKeyedMeilisearchClient(
this IHostApplicationBuilder builder,
string name,
Action<MeilisearchClientSettings>? configureSettings = null)
{
// ...
}
}
builder IHostApplicationBuilder The Hosting.IHostApplicationBuilder to read config from and add services to.
name string The connection name to use to find a connection string.
configureSettings Action<MeilisearchClientSettings> optional An optional method that can be used for customizing the MeilisearchClientSettings. It's invoked after the settings are read from the configuration.
InvalidOperationException If required ConnectionString is not provided in configuration section
Reads the configuration from "Aspire:Meilisearch:Client" section.
AddMeilisearchClient(IHostApplicationBuilder, string, Action<MeilisearchClientSettings>) Section titled AddMeilisearchClient(IHostApplicationBuilder, string, Action<MeilisearchClientSettings>) extension
Registers MeilisearchClient as a singleton in the services provided by the builder.
public static class AspireMeilisearchExtensions
{
public static void AddMeilisearchClient(
this IHostApplicationBuilder builder,
string connectionName,
Action<MeilisearchClientSettings>? configureSettings = null)
{
// ...
}
}
builder IHostApplicationBuilder The Hosting.IHostApplicationBuilder to read config from and add services to.
connectionName string The connection name to use to find a connection string.
configureSettings Action<MeilisearchClientSettings> optional An optional method that can be used for customizing the MeilisearchClientSettings. It's invoked after the settings are read from the configuration.
InvalidOperationException If required ConnectionString is not provided in configuration section
Reads the configuration from "Aspire:Meilisearch:Client" section.