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输入。 但是,实例携带其他非名义信息,例如,如果需要从依赖项注入容器解析任何服务,则可以使用AIFunction该信息IServiceProvider

构造函数

名称 说明
AIFunctionArguments()

初始化类的新实例 AIFunctionArguments ,并使用默认比较器进行键比较。

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

初始化包含指定arguments对象的类的新实例AIFunctionArguments

AIFunctionArguments(IDictionary<String,Object>)

初始化包含指定arguments对象的类的新实例AIFunctionArguments

AIFunctionArguments(IEqualityComparer<String>)

初始化 AIFunctionArguments 类的新实例。

属性

名称 说明
Context

获取或设置与这些参数关联的其他上下文。

Count

获取包含在 . 中的 ICollection<T>元素数。

Item[String]

获取或设置具有指定键的元素。

Keys

获取一个ICollection<T>包含 . 的键。IDictionary<TKey,TValue>

Services

获取或设置与这些参数有选择性关联的服务。

Values

获取一个 ICollection<T> 包含值中的 IDictionary<TKey,TValue>值。

方法

名称 说明
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)的参数。

显式接口实现

名称 说明
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

获取一个可枚举集合,该集合包含只读字典中的值。

扩展方法

名称 说明
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>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>)

枚举序列并生成其内容的不可变排序集。

适用于