語言

AIFunctionArguments 類別

定義

表示與 一起使用 InvokeAsync(AIFunctionArguments, CancellationToken)的參數。

public ref class AIFunctionArguments : System::Collections::Generic::ICollection<System::Collections::Generic::KeyValuePair<System::String ^, System::Object ^>>, System::Collections::Generic::IDictionary<System::String ^, System::Object ^>, System::Collections::Generic::IEnumerable<System::Collections::Generic::KeyValuePair<System::String ^, System::Object ^>>, System::Collections::Generic::IReadOnlyCollection<System::Collections::Generic::KeyValuePair<System::String ^, System::Object ^>>, System::Collections::Generic::IReadOnlyDictionary<System::String ^, System::Object ^>
public class AIFunctionArguments : System.Collections.Generic.ICollection<System.Collections.Generic.KeyValuePair<string,object>>, System.Collections.Generic.IDictionary<string,object>, System.Collections.Generic.IEnumerable<System.Collections.Generic.KeyValuePair<string,object>>, System.Collections.Generic.IReadOnlyCollection<System.Collections.Generic.KeyValuePair<string,object>>, System.Collections.Generic.IReadOnlyDictionary<string,object>
type AIFunctionArguments = class
    interface IDictionary<string, obj>
    interface ICollection<KeyValuePair<string, obj>>
    interface seq<KeyValuePair<string, obj>>
    interface IEnumerable
    interface IReadOnlyDictionary<string, obj>
    interface IReadOnlyCollection<KeyValuePair<string, obj>>
Public Class AIFunctionArguments
Implements ICollection(Of KeyValuePair(Of String, Object)), IDictionary(Of String, Object), IEnumerable(Of KeyValuePair(Of String, Object)), IReadOnlyCollection(Of KeyValuePair(Of String, Object)), IReadOnlyDictionary(Of String, Object)
繼承
AIFunctionArguments
實作

備註

AIFunctionArguments 是一 AIFunction組用於輸入的名稱/值對字典。 然而,實例還攜帶額外的非名義資訊,例如一個可選 IServiceProvider 的資訊,若需要解析依賴注入容器中的任何服務,則可使用 AIFunction 。

建構函式

名稱 Description
AIFunctionArguments()

初始化類別的新實例 AIFunctionArguments ,並使用預設比較器進行金鑰比較。

AIFunctionArguments(IDictionary<String,Object>, IEqualityComparer<String>)

初始化包含指定 arguments的類別的新實例AIFunctionArguments。

AIFunctionArguments(IDictionary<String,Object>)

初始化包含指定 arguments的類別的新實例AIFunctionArguments。

AIFunctionArguments(IEqualityComparer<String>)

初始化 AIFunctionArguments 類別的新執行個體。

屬性

名稱 Description
Context

獲得或設定這些論點相關的額外背景。

Count

得到包含於 的 ICollection<T>元素數量。

Item[String]

取得或設定具有指定索引鍵的專案。

Keys

得到包含 ICollection<T> 的 IDictionary<TKey,TValue>鍵。

Services

取得或設定與這些參數可選關聯的服務。

Values

得到 和 ICollection<T> 包含 的值。IDictionary<TKey,TValue>

方法

名稱 Description
Add(String, Object)

在 中加入一個包含所提供鍵值與值的元素。IDictionary<TKey,TValue>

Clear()

移除所有項目。ICollection<T>

ContainsKey(String)

判斷是否 IDictionary<TKey,TValue> 包含具有指定鍵的元素。

CopyTo(KeyValuePair<String,Object>[], Int32)

從特定ICollection<T>索引開始,將 的Array元素複製到 Array。

GetEnumerator()

傳回逐一查看集合的列舉值。

Remove(String)

從 中移除具有指定鍵的 IDictionary<TKey,TValue>元素。

TryGetValue(String, Object)

表示與 一起使用 InvokeAsync(AIFunctionArguments, CancellationToken)的參數。

明確介面實作

名稱 Description
ICollection<KeyValuePair<String,Object>>.Add(KeyValuePair<String,Object>)

將一個項目加入 ICollection<T>。

ICollection<KeyValuePair<String,Object>>.Contains(KeyValuePair<String,Object>)

判斷是否 ICollection<T> 包含特定值。

ICollection<KeyValuePair<String,Object>>.IsReadOnly

取得值,指出 ICollection<T> 是否為唯讀。

ICollection<KeyValuePair<String,Object>>.Remove(KeyValuePair<String,Object>)

從 ICollection<T>移除第一個出現的特定物件。

IEnumerable.GetEnumerator()

傳回逐一查看集合的列舉值。

IReadOnlyDictionary<String,Object>.Keys

取得可列舉集合,其中包含唯讀字典中的索引鍵。

IReadOnlyDictionary<String,Object>.Values

取得可列舉集合,其中包含唯讀字典中的值。

擴充方法

名稱 Description
ToAsyncEnumerable<TSource>(IEnumerable<TSource>)

將 IEnumerable<T> 轉換成 IAsyncEnumerable<T>。

ToFrozenDictionary<TSource,TKey,TElement>(IEnumerable<TSource>, Func<TSource,TKey>, Func<TSource,TElement>, IEqualityComparer<TKey>)

根據指定的索引鍵選取器和項目選取器函式,從 FrozenDictionary<TKey,TValue> 建立 IEnumerable<T>。

ToFrozenDictionary<TSource,TKey>(IEnumerable<TSource>, Func<TSource,TKey>, IEqualityComparer<TKey>)

根據指定的鍵選擇函式從 FrozenDictionary<TKey,TValue> a 建立 。IEnumerable<T>

ToFrozenSet<T>(IEnumerable<T>, IEqualityComparer<T>)

建立 FrozenSet<T> 一個符合指定值的 。

ToImmutableArray<TSource>(IEnumerable<TSource>)

從指定的集合建立不可變的陣列。

ToImmutableDictionary<TSource,TKey,TValue>(IEnumerable<TSource>, Func<TSource,TKey>, Func<TSource,TValue>, IEqualityComparer<TKey>, IEqualityComparer<TValue>)

列舉和轉換序列,並使用指定的索引鍵和值比較子產生其內容的不可變字典。

ToImmutableDictionary<TSource,TKey,TValue>(IEnumerable<TSource>, Func<TSource,TKey>, Func<TSource,TValue>, IEqualityComparer<TKey>)

列舉和轉換序列,並使用指定的索引鍵比較子產生其內容的不可變字典。

ToImmutableDictionary<TSource,TKey,TValue>(IEnumerable<TSource>, Func<TSource,TKey>, Func<TSource,TValue>)

列舉和轉換序列,併產生其內容的不可變字典。

ToImmutableDictionary<TSource,TKey>(IEnumerable<TSource>, Func<TSource,TKey>, IEqualityComparer<TKey>)

根據序列的一些轉換,建構不可變的字典。

ToImmutableDictionary<TSource,TKey>(IEnumerable<TSource>, Func<TSource,TKey>)

從現有的專案集合建構不可變的字典,將轉換函式套用至來源索引鍵。

ToImmutableHashSet<TSource>(IEnumerable<TSource>, IEqualityComparer<TSource>)

列舉序列、產生其內容的不可變哈希集,並使用集合類型的指定相等比較子。

ToImmutableHashSet<TSource>(IEnumerable<TSource>)

列舉序列,併產生其內容的不可變哈希集。

ToImmutableList<TSource>(IEnumerable<TSource>)

列舉序列,併產生其內容的不可變清單。

ToImmutableSortedDictionary<TSource,TKey,TValue>(IEnumerable<TSource>, Func<TSource,TKey>, Func<TSource,TValue>, IComparer<TKey>, IEqualityComparer<TValue>)

列舉和轉換序列,並使用指定的索引鍵和值比較子產生其內容的不可變排序字典。

ToImmutableSortedDictionary<TSource,TKey,TValue>(IEnumerable<TSource>, Func<TSource,TKey>, Func<TSource,TValue>, IComparer<TKey>)

列舉和轉換序列,並使用指定的索引鍵比較子產生其內容的不可變排序字典。

ToImmutableSortedDictionary<TSource,TKey,TValue>(IEnumerable<TSource>, Func<TSource,TKey>, Func<TSource,TValue>)

列舉和轉換序列,併產生其內容的不可變排序字典。

ToImmutableSortedSet<TSource>(IEnumerable<TSource>, IComparer<TSource>)

列舉序列、產生其內容的不可變排序集,並使用指定的比較子。

ToImmutableSortedSet<TSource>(IEnumerable<TSource>)

列舉序列,併產生其內容的不可變排序集。

適用於