CoseHeaderMap 类

定义

表示 COSE 消息的标头参数的集合。

public ref class CoseHeaderMap sealed : System::Collections::Generic::ICollection<System::Collections::Generic::KeyValuePair<System::Security::Cryptography::Cose::CoseHeaderLabel, System::Security::Cryptography::Cose::CoseHeaderValue>>, System::Collections::Generic::IDictionary<System::Security::Cryptography::Cose::CoseHeaderLabel, System::Security::Cryptography::Cose::CoseHeaderValue>, System::Collections::Generic::IEnumerable<System::Collections::Generic::KeyValuePair<System::Security::Cryptography::Cose::CoseHeaderLabel, System::Security::Cryptography::Cose::CoseHeaderValue>>, System::Collections::Generic::IReadOnlyCollection<System::Collections::Generic::KeyValuePair<System::Security::Cryptography::Cose::CoseHeaderLabel, System::Security::Cryptography::Cose::CoseHeaderValue>>, System::Collections::Generic::IReadOnlyDictionary<System::Security::Cryptography::Cose::CoseHeaderLabel, System::Security::Cryptography::Cose::CoseHeaderValue>
public sealed class CoseHeaderMap : System.Collections.Generic.ICollection<System.Collections.Generic.KeyValuePair<System.Security.Cryptography.Cose.CoseHeaderLabel,System.Security.Cryptography.Cose.CoseHeaderValue>>, System.Collections.Generic.IDictionary<System.Security.Cryptography.Cose.CoseHeaderLabel,System.Security.Cryptography.Cose.CoseHeaderValue>, System.Collections.Generic.IEnumerable<System.Collections.Generic.KeyValuePair<System.Security.Cryptography.Cose.CoseHeaderLabel,System.Security.Cryptography.Cose.CoseHeaderValue>>, System.Collections.Generic.IReadOnlyCollection<System.Collections.Generic.KeyValuePair<System.Security.Cryptography.Cose.CoseHeaderLabel,System.Security.Cryptography.Cose.CoseHeaderValue>>, System.Collections.Generic.IReadOnlyDictionary<System.Security.Cryptography.Cose.CoseHeaderLabel,System.Security.Cryptography.Cose.CoseHeaderValue>
type CoseHeaderMap = class
    interface IDictionary<CoseHeaderLabel, CoseHeaderValue>
    interface ICollection<KeyValuePair<CoseHeaderLabel, CoseHeaderValue>>
    interface seq<KeyValuePair<CoseHeaderLabel, CoseHeaderValue>>
    interface IEnumerable
    interface IReadOnlyDictionary<CoseHeaderLabel, CoseHeaderValue>
    interface IReadOnlyCollection<KeyValuePair<CoseHeaderLabel, CoseHeaderValue>>
Public NotInheritable Class CoseHeaderMap
Implements ICollection(Of KeyValuePair(Of CoseHeaderLabel, CoseHeaderValue)), IDictionary(Of CoseHeaderLabel, CoseHeaderValue), IEnumerable(Of KeyValuePair(Of CoseHeaderLabel, CoseHeaderValue)), IReadOnlyCollection(Of KeyValuePair(Of CoseHeaderLabel, CoseHeaderValue)), IReadOnlyDictionary(Of CoseHeaderLabel, CoseHeaderValue)
继承
CoseHeaderMap
实现

构造函数

名称 说明
CoseHeaderMap()

初始化 CoseHeaderMap 类的新实例。

属性

名称 说明
Count

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

IsReadOnly

获取一个值,该值指示标头映射是否为只读。

Item[CoseHeaderLabel]

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

Keys

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

Values

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

方法

名称 说明
Add(CoseHeaderLabel, Byte[])

将指定的标签和值添加到标头映射。

Add(CoseHeaderLabel, CoseHeaderValue)

将具有提供的键和值的元素添加到 .IDictionary<TKey,TValue>

Add(CoseHeaderLabel, Int32)

将指定的标签和值添加到标头映射。

Add(CoseHeaderLabel, ReadOnlySpan<Byte>)

将指定的标签和值添加到标头映射。

Add(CoseHeaderLabel, String)

将指定的标签和值添加到标头映射。

Add(KeyValuePair<CoseHeaderLabel,CoseHeaderValue>)

将项添加到 ICollection<T>

Clear()

ICollection<T>.. 中删除所有项

Contains(KeyValuePair<CoseHeaderLabel,CoseHeaderValue>)

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

ContainsKey(CoseHeaderLabel)

确定该元素是否 IDictionary<TKey,TValue> 包含具有指定键的元素。

CopyTo(KeyValuePair<CoseHeaderLabel,CoseHeaderValue>[], Int32)

将元素ICollection<T>复制到从特定Array索引开始的元素Array

GetEnumerator()

返回循环访问集合的枚举器。

GetValueAsBytes(CoseHeaderLabel, Span<Byte>)

获取与指定标签关联的值,作为字节字符串。

GetValueAsBytes(CoseHeaderLabel)

获取与指定标签关联的值,作为字节字符串。

GetValueAsInt32(CoseHeaderLabel)

获取与指定标签关联的值,作为带符号整数。

GetValueAsString(CoseHeaderLabel)

获取与指定标签关联的值,作为文本字符串。

Remove(CoseHeaderLabel)

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

Remove(KeyValuePair<CoseHeaderLabel,CoseHeaderValue>)

ICollection<T>中删除特定对象的第一个匹配项。

TryGetValue(CoseHeaderLabel, CoseHeaderValue)

获取与指定键关联的值。

显式接口实现

名称 说明
IEnumerable.GetEnumerator()

返回循环访问集合的枚举器。

IReadOnlyDictionary<CoseHeaderLabel,CoseHeaderValue>.Keys

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

IReadOnlyDictionary<CoseHeaderLabel,CoseHeaderValue>.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>)

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

适用于