AddKeyedOracleCollection<TKey, TRecord>(IServiceCollection, object?, string, Func<IServiceProvider, string>, Func<IServiceProvider, OracleVectorCollectionOptions>?, ServiceLifetime )

このメソッドは、指定された接続文字列プロバイダおよびサービス存続期間を使用して、キーが指定されたOracleCollection<TKey, TRecord>を、VectorStoreCollectionとして登録します。

宣言

// C#
public static IServiceCollection AddKeyedOracleCollection<TKey, TRecord>(this IServiceCollection services, object? serviceKey, string name,  Func<IServiceProvider, string> connectionStringProvider, Func<IServiceProvider, OracleVectorCollectionOptions>? optionsProvider = null, ServiceLifetime lifetime = ServiceLifeTime.Singleton) where TKey : notnull where TRecord : class

パラメータ

  • TKey

    OracleCollection<TKey, TRecord>のキー・タイプ。

  • TRecord

    OracleCollection<TKey, TRecord>のレコード・タイプ。

  • services

    VectorStoreを登録するIServiceCollection

  • serviceKey

    ベクトル・コレクションに関連付けるキー。

  • name

    コレクションの名前。

  • connectionStringProvider

    接続文字列プロバイダ。

  • optionsProvider

    ベクトル・ストアを詳細に構成するための省略可能なオプション・プロバイダ。

  • lifetime

    ストアのサービス存続期間。デフォルトはServiceLifetime.Singletonです。

戻り値

サービス・コレクションを返します。

例外

InvalidArgumentException:
  • 指定されたconnectionStringProviderまたはservicesパラメータがnullです。
  • 指定されたnameパラメータがnullまたは空です。