Share via


CoseHeaderMap.Add 方法

定義

多載

Add(KeyValuePair<CoseHeaderLabel,CoseHeaderValue>)

將項目加入至 ICollection<T>

Add(CoseHeaderLabel, Byte[])

將指定的標籤和值新增至標頭對應。

Add(CoseHeaderLabel, Int32)

將指定的標籤和值新增至標頭對應。

Add(CoseHeaderLabel, ReadOnlySpan<Byte>)

將指定的標籤和值新增至標頭對應。

Add(CoseHeaderLabel, CoseHeaderValue)

將隨附有索引鍵和值的項目加入至 IDictionary<TKey,TValue>

Add(CoseHeaderLabel, String)

將指定的標籤和值新增至標頭對應。

Add(KeyValuePair<CoseHeaderLabel,CoseHeaderValue>)

來源:
CoseHeaderMap.cs
來源:
CoseHeaderMap.cs
來源:
CoseHeaderMap.cs
來源:
CoseHeaderMap.cs

將項目加入至 ICollection<T>

public:
 virtual void Add(System::Collections::Generic::KeyValuePair<System::Security::Cryptography::Cose::CoseHeaderLabel, System::Security::Cryptography::Cose::CoseHeaderValue> item);
public void Add (System.Collections.Generic.KeyValuePair<System.Security.Cryptography.Cose.CoseHeaderLabel,System.Security.Cryptography.Cose.CoseHeaderValue> item);
abstract member Add : System.Collections.Generic.KeyValuePair<System.Security.Cryptography.Cose.CoseHeaderLabel, System.Security.Cryptography.Cose.CoseHeaderValue> -> unit
override this.Add : System.Collections.Generic.KeyValuePair<System.Security.Cryptography.Cose.CoseHeaderLabel, System.Security.Cryptography.Cose.CoseHeaderValue> -> unit
Public Sub Add (item As KeyValuePair(Of CoseHeaderLabel, CoseHeaderValue))

參數

實作

例外狀況

標頭對應是唯讀的。

item的值不是有效的 CBOR 值。

適用於

Add(CoseHeaderLabel, Byte[])

來源:
CoseHeaderMap.cs
來源:
CoseHeaderMap.cs
來源:
CoseHeaderMap.cs
來源:
CoseHeaderMap.cs

將指定的標籤和值新增至標頭對應。

public:
 void Add(System::Security::Cryptography::Cose::CoseHeaderLabel label, cli::array <System::Byte> ^ value);
public void Add (System.Security.Cryptography.Cose.CoseHeaderLabel label, byte[] value);
member this.Add : System.Security.Cryptography.Cose.CoseHeaderLabel * byte[] -> unit
Public Sub Add (label As CoseHeaderLabel, value As Byte())

參數

label
CoseHeaderLabel

要加入之標頭的標籤。

value
Byte[]

要加入之標頭的值。

例外狀況

標頭對應是唯讀的。

備註

value 不需要包含有效的 CBOR 編碼值,因為它會編碼為 CBOR 位元組字串。 若要直接指定 CBOR 編碼的值,請參閱 FromEncodedValue(ReadOnlySpan<Byte>)Add(CoseHeaderLabel, CoseHeaderValue)

適用於

Add(CoseHeaderLabel, Int32)

來源:
CoseHeaderMap.cs
來源:
CoseHeaderMap.cs
來源:
CoseHeaderMap.cs
來源:
CoseHeaderMap.cs

將指定的標籤和值新增至標頭對應。

public:
 void Add(System::Security::Cryptography::Cose::CoseHeaderLabel label, int value);
public void Add (System.Security.Cryptography.Cose.CoseHeaderLabel label, int value);
member this.Add : System.Security.Cryptography.Cose.CoseHeaderLabel * int -> unit
Public Sub Add (label As CoseHeaderLabel, value As Integer)

參數

label
CoseHeaderLabel

要加入之標頭的標籤。

value
Int32

要加入之標頭的值。

例外狀況

標頭對應是唯讀的。

適用於

Add(CoseHeaderLabel, ReadOnlySpan<Byte>)

來源:
CoseHeaderMap.cs
來源:
CoseHeaderMap.cs
來源:
CoseHeaderMap.cs
來源:
CoseHeaderMap.cs

將指定的標籤和值新增至標頭對應。

public:
 void Add(System::Security::Cryptography::Cose::CoseHeaderLabel label, ReadOnlySpan<System::Byte> value);
public void Add (System.Security.Cryptography.Cose.CoseHeaderLabel label, ReadOnlySpan<byte> value);
member this.Add : System.Security.Cryptography.Cose.CoseHeaderLabel * ReadOnlySpan<byte> -> unit
Public Sub Add (label As CoseHeaderLabel, value As ReadOnlySpan(Of Byte))

參數

label
CoseHeaderLabel

要加入之標頭的標籤。

value
ReadOnlySpan<Byte>

要加入之標頭的值。

例外狀況

標頭對應是唯讀的。

備註

value 不需要包含有效的 CBOR 編碼值,因為它會編碼為 CBOR 位元組字串。 若要直接指定 CBOR 編碼的值,請參閱 FromEncodedValue(ReadOnlySpan<Byte>)Add(CoseHeaderLabel, CoseHeaderValue)

適用於

Add(CoseHeaderLabel, CoseHeaderValue)

來源:
CoseHeaderMap.cs
來源:
CoseHeaderMap.cs
來源:
CoseHeaderMap.cs
來源:
CoseHeaderMap.cs

將隨附有索引鍵和值的項目加入至 IDictionary<TKey,TValue>

public:
 virtual void Add(System::Security::Cryptography::Cose::CoseHeaderLabel key, System::Security::Cryptography::Cose::CoseHeaderValue value);
public void Add (System.Security.Cryptography.Cose.CoseHeaderLabel key, System.Security.Cryptography.Cose.CoseHeaderValue value);
abstract member Add : System.Security.Cryptography.Cose.CoseHeaderLabel * System.Security.Cryptography.Cose.CoseHeaderValue -> unit
override this.Add : System.Security.Cryptography.Cose.CoseHeaderLabel * System.Security.Cryptography.Cose.CoseHeaderValue -> unit
Public Sub Add (key As CoseHeaderLabel, value As CoseHeaderValue)

參數

key
CoseHeaderLabel

做為要加入項目之索引鍵的物件。

value
CoseHeaderValue

做為要加入項目之值的物件。

實作

例外狀況

標頭對應是唯讀的。

value 不是有效的 CBOR 值。

適用於

Add(CoseHeaderLabel, String)

來源:
CoseHeaderMap.cs
來源:
CoseHeaderMap.cs
來源:
CoseHeaderMap.cs
來源:
CoseHeaderMap.cs

將指定的標籤和值新增至標頭對應。

public:
 void Add(System::Security::Cryptography::Cose::CoseHeaderLabel label, System::String ^ value);
public void Add (System.Security.Cryptography.Cose.CoseHeaderLabel label, string value);
member this.Add : System.Security.Cryptography.Cose.CoseHeaderLabel * string -> unit
Public Sub Add (label As CoseHeaderLabel, value As String)

參數

label
CoseHeaderLabel

要加入之標頭的標籤。

value
String

要加入之標頭的值。

例外狀況

標頭對應是唯讀的。

適用於