JsonObject 类

定义

表示可变 JSON 对象。

public ref class JsonObject sealed : System::Text::Json::Nodes::JsonNode, System::Collections::Generic::ICollection<System::Collections::Generic::KeyValuePair<System::String ^, System::Text::Json::Nodes::JsonNode ^>>, System::Collections::Generic::IDictionary<System::String ^, System::Text::Json::Nodes::JsonNode ^>, System::Collections::Generic::IEnumerable<System::Collections::Generic::KeyValuePair<System::String ^, System::Text::Json::Nodes::JsonNode ^>>
public ref class JsonObject sealed : System::Text::Json::Nodes::JsonNode, System::Collections::Generic::ICollection<System::Collections::Generic::KeyValuePair<System::String ^, System::Text::Json::Nodes::JsonNode ^>>, System::Collections::Generic::IDictionary<System::String ^, System::Text::Json::Nodes::JsonNode ^>, System::Collections::Generic::IEnumerable<System::Collections::Generic::KeyValuePair<System::String ^, System::Text::Json::Nodes::JsonNode ^>>, System::Collections::Generic::IList<System::Collections::Generic::KeyValuePair<System::String ^, System::Text::Json::Nodes::JsonNode ^>>
public sealed class JsonObject : System.Text.Json.Nodes.JsonNode, System.Collections.Generic.ICollection<System.Collections.Generic.KeyValuePair<string,System.Text.Json.Nodes.JsonNode>>, System.Collections.Generic.IDictionary<string,System.Text.Json.Nodes.JsonNode>, System.Collections.Generic.IEnumerable<System.Collections.Generic.KeyValuePair<string,System.Text.Json.Nodes.JsonNode>>
public sealed class JsonObject : System.Text.Json.Nodes.JsonNode, System.Collections.Generic.ICollection<System.Collections.Generic.KeyValuePair<string,System.Text.Json.Nodes.JsonNode>>, System.Collections.Generic.IDictionary<string,System.Text.Json.Nodes.JsonNode>, System.Collections.Generic.IEnumerable<System.Collections.Generic.KeyValuePair<string,System.Text.Json.Nodes.JsonNode>>, System.Collections.Generic.IList<System.Collections.Generic.KeyValuePair<string,System.Text.Json.Nodes.JsonNode>>
type JsonObject = class
    inherit JsonNode
    interface IDictionary<string, JsonNode>
    interface ICollection<KeyValuePair<string, JsonNode>>
    interface seq<KeyValuePair<string, JsonNode>>
    interface IEnumerable
type JsonObject = class
    inherit JsonNode
    interface IDictionary<string, JsonNode>
    interface ICollection<KeyValuePair<string, JsonNode>>
    interface seq<KeyValuePair<string, JsonNode>>
    interface IEnumerable
    interface IList<KeyValuePair<string, JsonNode>>
Public NotInheritable Class JsonObject
Inherits JsonNode
Implements ICollection(Of KeyValuePair(Of String, JsonNode)), IDictionary(Of String, JsonNode), IEnumerable(Of KeyValuePair(Of String, JsonNode))
Public NotInheritable Class JsonObject
Inherits JsonNode
Implements ICollection(Of KeyValuePair(Of String, JsonNode)), IDictionary(Of String, JsonNode), IEnumerable(Of KeyValuePair(Of String, JsonNode)), IList(Of KeyValuePair(Of String, JsonNode))
继承
JsonObject
实现

注解

可以安全地对 JsonObject执行多个并发读取操作,但如果正在读取集合时修改集合,则可能会出现问题。

构造函数

JsonObject(IEnumerable<KeyValuePair<String,JsonNode>>, Nullable<JsonNodeOptions>)

初始化包含指定 propertiesJsonObject 类的新实例。

JsonObject(Nullable<JsonNodeOptions>)

初始化 JsonObject 类的新实例,该实例为空。

属性

Count

获取 JsonObject中包含的元素数。

Item[Int32]

获取或设置指定索引处的元素。

(继承自 JsonNode)
Item[String]

获取或设置具有指定属性名称的元素。 如果未找到该属性,则返回 null

(继承自 JsonNode)
Options

获取用于控制行为的选项。

(继承自 JsonNode)
Parent

获取父 JsonNode。 如果没有父级,则返回 null。 父级可以是 JsonObject,也可以是 JsonArray

(继承自 JsonNode)
Root

获取根 JsonNode

(继承自 JsonNode)

方法

Add(KeyValuePair<String,JsonNode>)

将指定的属性添加到 JsonObject

Add(String, JsonNode)

将具有提供的属性名称和值的元素添加到 JsonObject

AsArray()

转换为派生 JsonArray 类型。

(继承自 JsonNode)
AsObject()

转换为派生 JsonObject 类型。

(继承自 JsonNode)
AsValue()

转换为派生 JsonValue 类型。

(继承自 JsonNode)
Clear()

JsonObject中删除所有元素。

ContainsKey(String)

确定 JsonObject 是否包含具有指定属性名称的元素。

Create(JsonElement, Nullable<JsonNodeOptions>)

初始化 JsonObject 类的新实例,该实例包含指定 JsonElement中的属性。

DeepClone()

创建 JsonNode 类的新实例。 所有子节点都以递归方式克隆。

(继承自 JsonNode)
Equals(Object)

确定指定的对象是否等于当前对象。

(继承自 Object)
GetAt(Int32)

表示可变 JSON 对象。

GetElementIndex()

从父 JsonArray返回当前节点的索引。

(继承自 JsonNode)
GetEnumerator()

返回循环访问 JsonObject的枚举数。

GetHashCode()

用作默认哈希函数。

(继承自 Object)
GetPath()

获取 JSON 路径。

(继承自 JsonNode)
GetPropertyName()

从父对象返回当前节点的属性名称。

(继承自 JsonNode)
GetType()

获取当前实例的 Type

(继承自 Object)
GetValue<T>()

获取当前 JsonValue的值。

(继承自 JsonNode)
GetValueKind()

返回当前实例的 JsonValueKind

(继承自 JsonNode)
IndexOf(String)

表示可变 JSON 对象。

Insert(Int32, String, JsonNode)

表示可变 JSON 对象。

MemberwiseClone()

创建当前 Object的浅表副本。

(继承自 Object)
Remove(String)

JsonObject中删除具有指定属性名称的元素。

RemoveAt(Int32)

表示可变 JSON 对象。

ReplaceWith<T>(T)

将此节点替换为新值。

(继承自 JsonNode)
SetAt(Int32, JsonNode)

表示可变 JSON 对象。

SetAt(Int32, String, JsonNode)

表示可变 JSON 对象。

ToJsonString(JsonSerializerOptions)

将当前实例转换为 JSON 格式的字符串。

(继承自 JsonNode)
ToString()

获取适用于节点类型的当前值的字符串表示形式。

(继承自 JsonNode)
TryGetPropertyValue(String, JsonNode)

返回具有指定名称的属性的值。

WriteTo(Utf8JsonWriter, JsonSerializerOptions)

JsonNode 写入提供的 Utf8JsonWriter 作为 JSON。

显式接口实现

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

确定 JsonObject 是否包含特定的属性名称和 JsonNode 引用。

ICollection<KeyValuePair<String,JsonNode>>.CopyTo(KeyValuePair<String,JsonNode>[], Int32)

从指定数组索引处开始,将 JsonObject 的元素复制到 KeyValuePair 类型的数组。

ICollection<KeyValuePair<String,JsonNode>>.IsReadOnly

返回 false

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

JsonObject中删除键和值。

IDictionary<String,JsonNode>.Keys

获取一个集合,该集合包含 JsonObject中的属性名称。

IDictionary<String,JsonNode>.TryGetValue(String, JsonNode)

获取与指定属性名称关联的值。

IDictionary<String,JsonNode>.Values

获取一个集合,该集合包含 JsonObject中的属性值。

IEnumerable.GetEnumerator()

返回循环访问 JsonObject的枚举数。

IList<KeyValuePair<String,JsonNode>>.IndexOf(KeyValuePair<String,JsonNode>)

表示可变 JSON 对象。

IList<KeyValuePair<String,JsonNode>>.Insert(Int32, KeyValuePair<String,JsonNode>)

表示可变 JSON 对象。

IList<KeyValuePair<String,JsonNode>>.Item[Int32]

表示可变 JSON 对象。

IList<KeyValuePair<String,JsonNode>>.RemoveAt(Int32)

表示可变 JSON 对象。

扩展方法

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

根据指定的键选择器函数从 IEnumerable<T> 创建 FrozenDictionary<TKey,TValue>

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

根据指定的键选择器和元素选择器函数从 IEnumerable<T> 创建 FrozenDictionary<TKey,TValue>

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

创建具有指定值的 FrozenSet<T>

AsReadOnly<T>(IList<T>)

返回指定列表的只读 ReadOnlyCollection<T> 包装器。

AsReadOnly<TKey,TValue>(IDictionary<TKey,TValue>)

返回当前字典的只读 ReadOnlyDictionary<TKey,TValue> 包装器。

Remove<TKey,TValue>(IDictionary<TKey,TValue>, TKey, TValue)

尝试从 dictionary中删除具有指定 key 的值。

TryAdd<TKey,TValue>(IDictionary<TKey,TValue>, TKey, TValue)

尝试将指定的 keyvalue 添加到 dictionary

ToImmutableArray<TSource>(IEnumerable<TSource>)

从指定的集合创建不可变数组。

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

从现有元素集合构造不可变字典,将转换函数应用于源键。

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

基于序列的某些转换构造不可变字典。

ToImmutableDictionary<TSource,TKey,TValue>(IEnumerable<TSource>, Func<TSource,TKey>, Func<TSource,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>, IEqualityComparer<TKey>, IEqualityComparer<TValue>)

枚举和转换序列,并使用指定的键和值比较器生成其内容的不可变字典。

ToImmutableHashSet<TSource>(IEnumerable<TSource>)

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

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

枚举序列,生成其内容的不可变哈希集,并为集类型使用指定的相等比较器。

ToImmutableList<TSource>(IEnumerable<TSource>)

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

ToImmutableSortedDictionary<TSource,TKey,TValue>(IEnumerable<TSource>, Func<TSource,TKey>, Func<TSource,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>, IComparer<TKey>, IEqualityComparer<TValue>)

枚举和转换序列,并使用指定的键和值比较器生成其内容的不可变排序字典。

ToImmutableSortedSet<TSource>(IEnumerable<TSource>)

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

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

枚举序列,生成其内容的不可变排序集,并使用指定的比较器。

CopyToDataTable<T>(IEnumerable<T>)

返回一个包含 DataRow 对象副本的 DataTable,给定 IEnumerable<T> 对象的输入 IEnumerable<T> 对象,其中泛型参数 TDataRow

CopyToDataTable<T>(IEnumerable<T>, DataTable, LoadOption)

给定泛型参数 TDataRow的输入 IEnumerable<T> 对象,将 DataRow 对象复制到指定的 DataTable

CopyToDataTable<T>(IEnumerable<T>, DataTable, LoadOption, FillErrorEventHandler)

给定泛型参数 TDataRow的输入 IEnumerable<T> 对象,将 DataRow 对象复制到指定的 DataTable

Aggregate<TSource>(IEnumerable<TSource>, Func<TSource,TSource,TSource>)

对序列应用累加器函数。

Aggregate<TSource,TAccumulate>(IEnumerable<TSource>, TAccumulate, Func<TAccumulate,TSource,TAccumulate>)

对序列应用累加器函数。 指定的种子值用作初始累加器值。

Aggregate<TSource,TAccumulate,TResult>(IEnumerable<TSource>, TAccumulate, Func<TAccumulate,TSource,TAccumulate>, Func<TAccumulate,TResult>)

对序列应用累加器函数。 指定的种子值用作初始累加器值,并且指定函数用于选择结果值。

AggregateBy<TSource,TKey,TAccumulate>(IEnumerable<TSource>, Func<TSource, TKey>, TAccumulate, Func<TAccumulate,TSource,TAccumulate>, IEqualityComparer<TKey>)

表示可变 JSON 对象。

AggregateBy<TSource,TKey,TAccumulate>(IEnumerable<TSource>, Func<TSource, TKey>, Func<TKey,TAccumulate>, Func<TAccumulate,TSource,TAccumulate>, IEqualityComparer<TKey>)

表示可变 JSON 对象。

All<TSource>(IEnumerable<TSource>, Func<TSource,Boolean>)

确定序列的所有元素是否满足条件。

Any<TSource>(IEnumerable<TSource>)

确定序列是否包含任何元素。

Any<TSource>(IEnumerable<TSource>, Func<TSource,Boolean>)

确定序列的任何元素是否满足条件。

Append<TSource>(IEnumerable<TSource>, TSource)

将值追加到序列的末尾。

AsEnumerable<TSource>(IEnumerable<TSource>)

返回类型化为 IEnumerable<T>的输入。

Average<TSource>(IEnumerable<TSource>, Func<TSource,Decimal>)

计算通过对输入序列的每个元素调用转换函数获得的 Decimal 值的序列的平均值。

Average<TSource>(IEnumerable<TSource>, Func<TSource,Double>)

计算通过对输入序列的每个元素调用转换函数获得的 Double 值的序列的平均值。

Average<TSource>(IEnumerable<TSource>, Func<TSource,Int32>)

计算通过对输入序列的每个元素调用转换函数获得的 Int32 值的序列的平均值。

Average<TSource>(IEnumerable<TSource>, Func<TSource,Int64>)

计算通过对输入序列的每个元素调用转换函数获得的 Int64 值的序列的平均值。

Average<TSource>(IEnumerable<TSource>, Func<TSource,Nullable<Decimal>>)

计算一系列可为 null 的 Decimal 值的平均值,这些值是通过对输入序列的每个元素调用转换函数获得的。

Average<TSource>(IEnumerable<TSource>, Func<TSource,Nullable<Double>>)

计算一系列可为 null 的 Double 值的平均值,这些值是通过对输入序列的每个元素调用转换函数获得的。

Average<TSource>(IEnumerable<TSource>, Func<TSource,Nullable<Int32>>)

计算一系列可为 null 的 Int32 值的平均值,这些值是通过对输入序列的每个元素调用转换函数获得的。

Average<TSource>(IEnumerable<TSource>, Func<TSource,Nullable<Int64>>)

计算一系列可为 null 的 Int64 值的平均值,这些值是通过对输入序列的每个元素调用转换函数获得的。

Average<TSource>(IEnumerable<TSource>, Func<TSource,Nullable<Single>>)

计算一系列可为 null 的 Single 值的平均值,这些值是通过对输入序列的每个元素调用转换函数获得的。

Average<TSource>(IEnumerable<TSource>, Func<TSource,Single>)

计算通过对输入序列的每个元素调用转换函数获得的 Single 值的序列的平均值。

Cast<TResult>(IEnumerable)

IEnumerable 的元素强制转换为指定类型。

Chunk<TSource>(IEnumerable<TSource>, Int32)

将序列的元素拆分为大小块,最多 size

Concat<TSource>(IEnumerable<TSource>, IEnumerable<TSource>)

连接两个序列。

Contains<TSource>(IEnumerable<TSource>, TSource)

使用默认相等比较器确定序列是否包含指定的元素。

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

确定序列是否使用指定的 IEqualityComparer<T>包含指定的元素。

Count<TSource>(IEnumerable<TSource>)

返回序列中的元素数。

Count<TSource>(IEnumerable<TSource>, Func<TSource,Boolean>)

返回一个数字,该值代表指定序列中满足条件的元素数。

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

表示可变 JSON 对象。

DefaultIfEmpty<TSource>(IEnumerable<TSource>)

如果序列为空,则返回指定序列的元素或类型参数在单一实例集合中的默认值。

DefaultIfEmpty<TSource>(IEnumerable<TSource>, TSource)

如果序列为空,则返回指定序列的元素或单个实例集合中的指定值。

Distinct<TSource>(IEnumerable<TSource>)

通过使用默认相等比较器比较值,从序列中返回不同的元素。

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

通过使用指定的 IEqualityComparer<T> 来比较值,从序列中返回不同的元素。

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

根据指定的键选择器函数返回序列中的不同元素。

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

根据指定的键选择器函数并使用指定的比较器比较键,从序列中返回不同的元素。

ElementAt<TSource>(IEnumerable<TSource>, Index)

返回序列中指定索引处的元素。

ElementAt<TSource>(IEnumerable<TSource>, Int32)

返回序列中指定索引处的元素。

ElementAtOrDefault<TSource>(IEnumerable<TSource>, Index)

返回序列中指定索引处的元素;如果索引范围不足,则返回默认值。

ElementAtOrDefault<TSource>(IEnumerable<TSource>, Int32)

返回序列中指定索引处的元素;如果索引范围不足,则返回默认值。

Except<TSource>(IEnumerable<TSource>, IEnumerable<TSource>)

使用默认相等比较器来比较值,生成两个序列的集差。

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

通过使用指定的 IEqualityComparer<T> 来比较值,生成两个序列的集差异。

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

根据指定的键选择器函数生成两个序列的集差异。

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

根据指定的键选择器函数生成两个序列的集差异。

First<TSource>(IEnumerable<TSource>)

返回序列的第一个元素。

First<TSource>(IEnumerable<TSource>, Func<TSource,Boolean>)

返回满足指定条件的序列中的第一个元素。

FirstOrDefault<TSource>(IEnumerable<TSource>)

返回序列的第一个元素;如果序列不包含任何元素,则返回默认值。

FirstOrDefault<TSource>(IEnumerable<TSource>, TSource)

返回序列的第一个元素;如果序列不包含任何元素,则返回指定的默认值。

FirstOrDefault<TSource>(IEnumerable<TSource>, Func<TSource,Boolean>)

返回满足条件的序列的第一个元素;如果未找到此类元素,则返回默认值。

FirstOrDefault<TSource>(IEnumerable<TSource>, Func<TSource,Boolean>, TSource)

返回满足条件的序列的第一个元素;如果未找到此类元素,则返回指定的默认值。

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

根据指定的键选择器函数对序列的元素进行分组。

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

根据指定的键选择器函数对序列的元素进行分组,并使用指定的比较器比较键。

GroupBy<TSource,TKey,TElement>(IEnumerable<TSource>, Func<TSource,TKey>, Func<TSource,TElement>)

根据指定的键选择器函数对序列的元素进行分组,并使用指定的函数投影每个组的元素。

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

根据键选择器函数对序列的元素进行分组。 通过使用比较器比较键,并且每个组的元素都通过使用指定的函数进行投影。

GroupBy<TSource,TKey,TResult>(IEnumerable<TSource>, Func<TSource,TKey>, Func<TKey,IEnumerable<TSource>,TResult>)

根据指定的键选择器函数对序列的元素进行分组,并从每个组及其键创建结果值。

GroupBy<TSource,TKey,TResult>(IEnumerable<TSource>, Func<TSource,TKey>, Func<TKey,IEnumerable<TSource>,TResult>, IEqualityComparer<TKey>)

根据指定的键选择器函数对序列的元素进行分组,并从每个组及其键创建结果值。 使用指定的比较器比较键。

GroupBy<TSource,TKey,TElement,TResult>(IEnumerable<TSource>, Func<TSource,TKey>, Func<TSource,TElement>, Func<TKey,IEnumerable<TElement>,TResult>)

根据指定的键选择器函数对序列的元素进行分组,并从每个组及其键创建结果值。 每个组的元素是使用指定的函数投影的。

GroupBy<TSource,TKey,TElement,TResult>(IEnumerable<TSource>, Func<TSource, TKey>, Func<TSource,TElement>, Func<TKey,IEnumerable<TElement>, TResult>, IEqualityComparer<TKey>)

根据指定的键选择器函数对序列的元素进行分组,并从每个组及其键创建结果值。 使用指定的比较器比较键值,并且每个组的元素都通过使用指定的函数进行投影。

GroupJoin<TOuter,TInner,TKey,TResult>(IEnumerable<TOuter>, IEnumerable<TInner>, Func<TOuter,TKey>, Func<TInner,TKey>, Func<TOuter,IEnumerable<TInner>, TResult>)

根据键的相等性关联两个序列的元素,并对结果进行分组。 默认相等比较器用于比较键。

GroupJoin<TOuter,TInner,TKey,TResult>(IEnumerable<TOuter>, IEnumerable<TInner>, Func<TOuter,TKey>, Func<TInner,TKey>, Func<TOuter,IEnumerable<TInner>, TResult>, IEqualityComparer<TKey>)

根据键相等性关联两个序列的元素,并对结果进行分组。 指定的 IEqualityComparer<T> 用于比较键。

Index<TSource>(IEnumerable<TSource>)

表示可变 JSON 对象。

Intersect<TSource>(IEnumerable<TSource>, IEnumerable<TSource>)

通过使用默认相等比较器来比较值,生成两个序列的集交集。

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

通过使用指定的 IEqualityComparer<T> 来比较值,生成两个序列的集交集。

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

根据指定的键选择器函数生成两个序列的集交集。

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

根据指定的键选择器函数生成两个序列的集交集。

Join<TOuter,TInner,TKey,TResult>(IEnumerable<TOuter>, IEnumerable<TInner>, Func<TOuter,TKey>, Func<TInner,TKey>, Func<TOuter,TInner,TResult>)

根据匹配键关联两个序列的元素。 默认相等比较器用于比较键。

Join<TOuter,TInner,TKey,TResult>(IEnumerable<TOuter>, IEnumerable<TInner>, Func<TOuter,TKey>, Func<TInner,TKey>, Func<TOuter,TInner,TResult>, IEqualityComparer<TKey>)

根据匹配键关联两个序列的元素。 指定的 IEqualityComparer<T> 用于比较键。

Last<TSource>(IEnumerable<TSource>)

返回序列的最后一个元素。

Last<TSource>(IEnumerable<TSource>, Func<TSource,Boolean>)

返回满足指定条件的序列的最后一个元素。

LastOrDefault<TSource>(IEnumerable<TSource>)

返回序列的最后一个元素;如果序列不包含任何元素,则返回默认值。

LastOrDefault<TSource>(IEnumerable<TSource>, TSource)

返回序列的最后一个元素;如果序列不包含任何元素,则返回指定的默认值。

LastOrDefault<TSource>(IEnumerable<TSource>, Func<TSource,Boolean>)

返回满足条件的序列的最后一个元素;如果未找到此类元素,则返回默认值。

LastOrDefault<TSource>(IEnumerable<TSource>, Func<TSource,Boolean>, TSource)

返回满足条件的序列的最后一个元素;如果未找到此类元素,则返回指定的默认值。

LongCount<TSource>(IEnumerable<TSource>)

返回一个表示序列中元素总数的 Int64

LongCount<TSource>(IEnumerable<TSource>, Func<TSource,Boolean>)

返回表示序列中满足条件的元素数的 Int64

Max<TSource>(IEnumerable<TSource>)

返回泛型序列中的最大值。

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

返回泛型序列中的最大值。

Max<TSource>(IEnumerable<TSource>, Func<TSource,Decimal>)

对序列的每个元素调用转换函数,并返回最大 Decimal 值。

Max<TSource>(IEnumerable<TSource>, Func<TSource,Double>)

对序列的每个元素调用转换函数,并返回最大 Double 值。

Max<TSource>(IEnumerable<TSource>, Func<TSource,Int32>)

对序列的每个元素调用转换函数,并返回最大 Int32 值。

Max<TSource>(IEnumerable<TSource>, Func<TSource,Int64>)

对序列的每个元素调用转换函数,并返回最大 Int64 值。

Max<TSource>(IEnumerable<TSource>, Func<TSource,Nullable<Decimal>>)

对序列的每个元素调用转换函数,并返回最大可为 null Decimal 值。

Max<TSource>(IEnumerable<TSource>, Func<TSource,Nullable<Double>>)

对序列的每个元素调用转换函数,并返回最大可为 null Double 值。

Max<TSource>(IEnumerable<TSource>, Func<TSource,Nullable<Int32>>)

对序列的每个元素调用转换函数,并返回最大可为 null Int32 值。

Max<TSource>(IEnumerable<TSource>, Func<TSource,Nullable<Int64>>)

对序列的每个元素调用转换函数,并返回最大可为 null Int64 值。

Max<TSource>(IEnumerable<TSource>, Func<TSource,Nullable<Single>>)

对序列的每个元素调用转换函数,并返回最大可为 null Single 值。

Max<TSource>(IEnumerable<TSource>, Func<TSource,Single>)

对序列的每个元素调用转换函数,并返回最大 Single 值。

Max<TSource,TResult>(IEnumerable<TSource>, Func<TSource,TResult>)

对泛型序列的每个元素调用转换函数,并返回得到的最大值。

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

根据指定的键选择器函数返回泛型序列中的最大值。

MaxBy<TSource,TKey>(IEnumerable<TSource>, Func<TSource,TKey>, IComparer<TKey>)

根据指定的键选择器函数和键比较器返回泛型序列中的最大值。

Min<TSource>(IEnumerable<TSource>)

返回泛型序列中的最小值。

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

返回泛型序列中的最小值。

Min<TSource>(IEnumerable<TSource>, Func<TSource,Decimal>)

对序列的每个元素调用转换函数,并返回最小 Decimal 值。

Min<TSource>(IEnumerable<TSource>, Func<TSource,Double>)

对序列的每个元素调用转换函数,并返回最小 Double 值。

Min<TSource>(IEnumerable<TSource>, Func<TSource,Int32>)

对序列的每个元素调用转换函数,并返回最小 Int32 值。

Min<TSource>(IEnumerable<TSource>, Func<TSource,Int64>)

对序列的每个元素调用转换函数,并返回最小 Int64 值。

Min<TSource>(IEnumerable<TSource>, Func<TSource,Nullable<Decimal>>)

对序列的每个元素调用转换函数,并返回可为 null 的最小 Decimal 值。

Min<TSource>(IEnumerable<TSource>, Func<TSource,Nullable<Double>>)

对序列的每个元素调用转换函数,并返回可为 null 的最小 Double 值。

Min<TSource>(IEnumerable<TSource>, Func<TSource,Nullable<Int32>>)

对序列的每个元素调用转换函数,并返回可为 null 的最小 Int32 值。

Min<TSource>(IEnumerable<TSource>, Func<TSource,Nullable<Int64>>)

对序列的每个元素调用转换函数,并返回可为 null 的最小 Int64 值。

Min<TSource>(IEnumerable<TSource>, Func<TSource,Nullable<Single>>)

对序列的每个元素调用转换函数,并返回可为 null 的最小 Single 值。

Min<TSource>(IEnumerable<TSource>, Func<TSource,Single>)

对序列的每个元素调用转换函数,并返回最小 Single 值。

Min<TSource,TResult>(IEnumerable<TSource>, Func<TSource,TResult>)

对泛型序列的每个元素调用转换函数,并返回生成的最小值。

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

根据指定的键选择器函数返回泛型序列中的最小值。

MinBy<TSource,TKey>(IEnumerable<TSource>, Func<TSource,TKey>, IComparer<TKey>)

根据指定的键选择器函数和键比较器返回泛型序列中的最小值。

OfType<TResult>(IEnumerable)

根据指定类型筛选 IEnumerable 的元素。

Order<T>(IEnumerable<T>)

按升序对序列的元素进行排序。

Order<T>(IEnumerable<T>, IComparer<T>)

按升序对序列的元素进行排序。

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

根据键按升序对序列的元素进行排序。

OrderBy<TSource,TKey>(IEnumerable<TSource>, Func<TSource,TKey>, IComparer<TKey>)

使用指定的比较器按升序对序列的元素进行排序。

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

根据键按降序对序列的元素进行排序。

OrderByDescending<TSource,TKey>(IEnumerable<TSource>, Func<TSource,TKey>, IComparer<TKey>)

使用指定的比较器按降序对序列的元素进行排序。

OrderDescending<T>(IEnumerable<T>)

按降序对序列的元素进行排序。

OrderDescending<T>(IEnumerable<T>, IComparer<T>)

按降序对序列的元素进行排序。

Prepend<TSource>(IEnumerable<TSource>, TSource)

将值添加到序列的开头。

Reverse<TSource>(IEnumerable<TSource>)

反转序列中元素的顺序。

Select<TSource,TResult>(IEnumerable<TSource>, Func<TSource,TResult>)

将序列的每个元素投影到一个新窗体中。

Select<TSource,TResult>(IEnumerable<TSource>, Func<TSource,Int32,TResult>)

通过合并元素的索引,将序列的每个元素投影到一个新窗体中。

SelectMany<TSource,TResult>(IEnumerable<TSource>, Func<TSource,IEnumerable<TResult>>)

将序列的每个元素投影到 IEnumerable<T>,并将生成的序列平展为一个序列。

SelectMany<TSource,TResult>(IEnumerable<TSource>, Func<TSource,Int32,IEnumerable<TResult>>)

将序列的每个元素投影到 IEnumerable<T>,并将生成的序列平展为一个序列。 每个源元素的索引用于该元素的投影形式。

SelectMany<TSource,TCollection,TResult>(IEnumerable<TSource>, Func<TSource,IEnumerable<TCollection>>, Func<TSource,TCollection,TResult>)

将序列的每个元素投影到 IEnumerable<T>,将生成的序列平展为一个序列,并在其中的每个元素上调用结果选择器函数。

SelectMany<TSource,TCollection,TResult>(IEnumerable<TSource>, Func<TSource,Int32,IEnumerable<TCollection>>, Func<TSource,TCollection,TResult>)

将序列的每个元素投影到 IEnumerable<T>,将生成的序列平展为一个序列,并在其中的每个元素上调用结果选择器函数。 每个源元素的索引用于该元素的中间投影形式。

SequenceEqual<TSource>(IEnumerable<TSource>, IEnumerable<TSource>)

通过使用其类型的默认相等比较器,确定两个序列是否相等。

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

通过使用指定的 IEqualityComparer<T>,确定两个序列是否相等。

Single<TSource>(IEnumerable<TSource>)

返回序列的唯一元素,如果序列中没有完全有一个元素,则会引发异常。

Single<TSource>(IEnumerable<TSource>, Func<TSource,Boolean>)

返回满足指定条件的序列的唯一元素,如果存在多个此类元素,则会引发异常。

SingleOrDefault<TSource>(IEnumerable<TSource>)

返回序列的唯一元素;如果序列为空,则返回默认值;如果序列中有多个元素,此方法将引发异常。

SingleOrDefault<TSource>(IEnumerable<TSource>, TSource)

返回序列的唯一元素;如果序列为空,则返回指定的默认值;如果序列中有多个元素,此方法将引发异常。

SingleOrDefault<TSource>(IEnumerable<TSource>, Func<TSource,Boolean>)

返回满足指定条件的序列的唯一元素;如果没有此类元素,则返回默认值;如果多个元素满足条件,此方法将引发异常。

SingleOrDefault<TSource>(IEnumerable<TSource>, Func<TSource,Boolean>, TSource)

返回满足指定条件的序列的唯一元素;如果没有此类元素,则返回指定的默认值;如果多个元素满足条件,此方法将引发异常。

Skip<TSource>(IEnumerable<TSource>, Int32)

绕过序列中的指定数量的元素,然后返回其余元素。

SkipLast<TSource>(IEnumerable<TSource>, Int32)

返回一个新的可枚举集合,该集合包含 source 的元素,其中省略了源集合的最后一个 count 元素。

SkipWhile<TSource>(IEnumerable<TSource>, Func<TSource,Boolean>)

只要指定条件为 true,即可绕过序列中的元素,然后返回其余元素。

SkipWhile<TSource>(IEnumerable<TSource>, Func<TSource,Int32,Boolean>)

只要指定条件为 true,即可绕过序列中的元素,然后返回其余元素。 元素的索引用于谓词函数的逻辑。

Sum<TSource>(IEnumerable<TSource>, Func<TSource,Decimal>)

计算通过对输入序列的每个元素调用转换函数获得的 Decimal 值序列的总和。

Sum<TSource>(IEnumerable<TSource>, Func<TSource,Double>)

计算通过对输入序列的每个元素调用转换函数获得的 Double 值序列的总和。

Sum<TSource>(IEnumerable<TSource>, Func<TSource,Int32>)

计算通过对输入序列的每个元素调用转换函数获得的 Int32 值序列的总和。

Sum<TSource>(IEnumerable<TSource>, Func<TSource,Int64>)

计算通过对输入序列的每个元素调用转换函数获得的 Int64 值序列的总和。

Sum<TSource>(IEnumerable<TSource>, Func<TSource,Nullable<Decimal>>)

计算通过对输入序列的每个元素调用转换函数获取的可为 null Decimal 值的序列的总和。

Sum<TSource>(IEnumerable<TSource>, Func<TSource,Nullable<Double>>)

计算通过对输入序列的每个元素调用转换函数获取的可为 null Double 值的序列的总和。

Sum<TSource>(IEnumerable<TSource>, Func<TSource,Nullable<Int32>>)

计算通过对输入序列的每个元素调用转换函数获取的可为 null Int32 值的序列的总和。

Sum<TSource>(IEnumerable<TSource>, Func<TSource,Nullable<Int64>>)

计算通过对输入序列的每个元素调用转换函数获取的可为 null Int64 值的序列的总和。

Sum<TSource>(IEnumerable<TSource>, Func<TSource,Nullable<Single>>)

计算通过对输入序列的每个元素调用转换函数获取的可为 null Single 值的序列的总和。

Sum<TSource>(IEnumerable<TSource>, Func<TSource,Single>)

计算通过对输入序列的每个元素调用转换函数获得的 Single 值序列的总和。

Take<TSource>(IEnumerable<TSource>, Int32)

从序列的开头返回指定的连续元素数。

Take<TSource>(IEnumerable<TSource>, Range)

返回序列中连续元素的指定范围。

TakeLast<TSource>(IEnumerable<TSource>, Int32)

返回一个新的可枚举集合,该集合包含来自 source的最后一个 count 元素。

TakeWhile<TSource>(IEnumerable<TSource>, Func<TSource,Boolean>)

只要指定的条件为 true,就从序列中返回元素。

TakeWhile<TSource>(IEnumerable<TSource>, Func<TSource,Int32,Boolean>)

只要指定的条件为 true,就从序列中返回元素。 元素的索引用于谓词函数的逻辑。

ToArray<TSource>(IEnumerable<TSource>)

IEnumerable<T>创建数组。

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

根据指定的键选择器函数从 IEnumerable<T> 创建 Dictionary<TKey,TValue>

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

根据指定的键选择器函数和键比较器从 IEnumerable<T> 创建 Dictionary<TKey,TValue>

ToDictionary<TSource,TKey,TElement>(IEnumerable<TSource>, Func<TSource,TKey>, Func<TSource,TElement>)

根据指定的键选择器和元素选择器函数从 IEnumerable<T> 创建 Dictionary<TKey,TValue>

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

根据指定的键选择器函数、比较器和元素选择器函数从 IEnumerable<T> 创建 Dictionary<TKey,TValue>

ToHashSet<TSource>(IEnumerable<TSource>)

IEnumerable<T>创建 HashSet<T>

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

使用 comparer 比较键从 IEnumerable<T> 创建 HashSet<T>

ToList<TSource>(IEnumerable<TSource>)

IEnumerable<T>创建 List<T>

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

根据指定的键选择器函数从 IEnumerable<T> 创建 Lookup<TKey,TElement>

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

根据指定的键选择器函数和键比较器从 IEnumerable<T> 创建 Lookup<TKey,TElement>

ToLookup<TSource,TKey,TElement>(IEnumerable<TSource>, Func<TSource,TKey>, Func<TSource,TElement>)

根据指定的键选择器和元素选择器函数从 IEnumerable<T> 创建 Lookup<TKey,TElement>

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

根据指定的键选择器函数、比较器和元素选择器函数从 IEnumerable<T> 创建 Lookup<TKey,TElement>

TryGetNonEnumeratedCount<TSource>(IEnumerable<TSource>, Int32)

尝试在不强制枚举的情况下确定序列中的元素数。

Union<TSource>(IEnumerable<TSource>, IEnumerable<TSource>)

使用默认相等比较器生成两个序列的集并集。

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

使用指定的 IEqualityComparer<T>生成两个序列的集并集。

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

根据指定的键选择器函数生成两个序列的集并集。

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

根据指定的键选择器函数生成两个序列的集并集。

Where<TSource>(IEnumerable<TSource>, Func<TSource,Boolean>)

根据谓词筛选值序列。

Where<TSource>(IEnumerable<TSource>, Func<TSource,Int32,Boolean>)

根据谓词筛选值序列。 每个元素的索引都在谓词函数的逻辑中使用。

Zip<TFirst,TSecond>(IEnumerable<TFirst>, IEnumerable<TSecond>)

生成包含两个指定序列中的元素的元组序列。

Zip<TFirst,TSecond,TThird>(IEnumerable<TFirst>, IEnumerable<TSecond>, IEnumerable<TThird>)

生成包含三个指定序列中的元素的元组序列。

Zip<TFirst,TSecond,TResult>(IEnumerable<TFirst>, IEnumerable<TSecond>, Func<TFirst,TSecond,TResult>)

将指定的函数应用于两个序列的相应元素,从而生成结果序列。

AsParallel(IEnumerable)

启用查询的并行化。

AsParallel<TSource>(IEnumerable<TSource>)

启用查询的并行化。

AsQueryable(IEnumerable)

IEnumerable 转换为 IQueryable

AsQueryable<TElement>(IEnumerable<TElement>)

将泛型 IEnumerable<T> 转换为泛型 IQueryable<T>

Deserialize(JsonNode, JsonTypeInfo)

将表示单个 JSON 值的 JsonNode 转换为由 jsonTypeInfo指定的实例。

Deserialize(JsonNode, Type, JsonSerializerOptions)

将表示单个 JSON 值的 JsonNode 转换为 returnType

Deserialize(JsonNode, Type, JsonSerializerContext)

将表示单个 JSON 值的 JsonNode 转换为 returnType

Deserialize<TValue>(JsonNode, JsonSerializerOptions)

将表示单个 JSON 值的 JsonNode 转换为 TValue

Deserialize<TValue>(JsonNode, JsonTypeInfo<TValue>)

将表示单个 JSON 值的 JsonNode 转换为 TValue

Ancestors<T>(IEnumerable<T>)

返回一个元素集合,其中包含源集合中每个节点的上级。

Ancestors<T>(IEnumerable<T>, XName)

返回一个筛选的元素集合,其中包含源集合中每个节点的上级。 集合中仅包含具有匹配 XName 的元素。

DescendantNodes<T>(IEnumerable<T>)

返回源集合中每个文档和元素的子代节点的集合。

Descendants<T>(IEnumerable<T>)

返回一个元素集合,其中包含源集合中每个元素和文档的子代元素。

Descendants<T>(IEnumerable<T>, XName)

返回一个筛选的元素集合,其中包含源集合中每个元素和文档的子代元素。 集合中仅包含具有匹配 XName 的元素。

Elements<T>(IEnumerable<T>)

返回源集合中每个元素和文档的子元素的集合。

Elements<T>(IEnumerable<T>, XName)

返回源集合中每个元素和文档的子元素的筛选集合。 集合中仅包含具有匹配 XName 的元素。

InDocumentOrder<T>(IEnumerable<T>)

返回一个节点集合,其中包含源集合中的所有节点,按文档顺序排序。

Nodes<T>(IEnumerable<T>)

返回源集合中每个文档和元素的子节点的集合。

Remove<T>(IEnumerable<T>)

从源集合的父节点中删除每个节点。

适用于