AspireMeilisearchExtensions Methods
ClassMethods2 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) { // ... }}Parameters
builderIHostApplicationBuilder The Hosting.IHostApplicationBuilder to read config from and add services to.namestringThe connection name to use to find a connection string.configureSettings Action<MeilisearchClientSettings> optionalAn optional method that can be used for customizing the MeilisearchClientSettings . It's invoked after the settings are read from the configuration.Exceptions
InvalidOperationExceptionIf required ConnectionString is not provided in configuration sectionRemarks
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) { // ... }}Parameters
builderIHostApplicationBuilder The Hosting.IHostApplicationBuilder to read config from and add services to.connectionName stringThe connection name to use to find a connection string.configureSettings Action<MeilisearchClientSettings> optionalAn optional method that can be used for customizing the MeilisearchClientSettings . It's invoked after the settings are read from the configuration.Exceptions
InvalidOperationExceptionIf required ConnectionString is not provided in configuration sectionRemarks
Reads the configuration from "Aspire:Meilisearch:Client" section.