AspireMilvusExtensions.AddKeyedMilvusClient Method
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.
Registers Milvus.Client.MilvusClient as a keyed singleton for the given name
in the services provided by the builder
.
Configures logging for the Milvus.Client.MilvusClient.
public static void AddKeyedMilvusClient (this Microsoft.Extensions.Hosting.IHostApplicationBuilder builder, string name, Action<Aspire.Milvus.Client.MilvusClientSettings>? configureSettings = default);
static member AddKeyedMilvusClient : Microsoft.Extensions.Hosting.IHostApplicationBuilder * string * Action<Aspire.Milvus.Client.MilvusClientSettings> -> unit
<Extension()>
Public Sub AddKeyedMilvusClient (builder As IHostApplicationBuilder, name As String, Optional configureSettings As Action(Of MilvusClientSettings) = Nothing)
Parameters
- builder
- IHostApplicationBuilder
The IHostApplicationBuilder to read config from and add services to.
- name
- String
The connection name to use to find a connection string.
- configureSettings
- Action<MilvusClientSettings>
An optional method that can be used for customizing the MilvusClientSettings. It's invoked after the settings are read from the configuration.
Exceptions
If required ConnectionString is not provided in configuration section
Remarks
Reads the configuration from "Aspire:Milvus:Client" section.