AspireMilvusExtensions Methods
Class Methods 2 members
Provides extension methods for registering Milvus-related services in an
Hosting.IHostApplicationBuilder. AddKeyedMilvusClient(IHostApplicationBuilder, string, Action<MilvusClientSettings>) Section titled AddKeyedMilvusClient(IHostApplicationBuilder, string, Action<MilvusClientSettings>) extension Registers
Client.MilvusClient as a keyed singleton for the given name in the services provided by the builder. Configures logging for the Client.MilvusClient. public static class AspireMilvusExtensions{ public static void AddKeyedMilvusClient( this IHostApplicationBuilder builder, string name, Action<MilvusClientSettings>? configureSettings = null) { // ... }}Parameters
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<MilvusClientSettings> optional An optional method that can be used for customizing the MilvusClientSettings. It's invoked after the settings are read from the configuration. Exceptions
InvalidOperationException If required ConnectionString is not provided in configuration section Remarks
Reads the configuration from "Aspire:Milvus:Client" section.
AddMilvusClient(IHostApplicationBuilder, string, Action<MilvusClientSettings>) Section titled AddMilvusClient(IHostApplicationBuilder, string, Action<MilvusClientSettings>) extension Registers
Client.MilvusClient as a singleton in the services provided by the builder. Configures logging for the Client.MilvusClient. public static class AspireMilvusExtensions{ public static void AddMilvusClient( this IHostApplicationBuilder builder, string connectionName, Action<MilvusClientSettings>? configureSettings = null) { // ... }}Parameters
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<MilvusClientSettings> optional An optional method that can be used for customizing the MilvusClientSettings. It's invoked after the settings are read from the configuration. Exceptions
InvalidOperationException If required ConnectionString is not provided in configuration section Remarks
Reads the configuration from "Aspire:Milvus:Client" section.