Edit

Share via


CoseHeaderMap.Add Method

Definition

Overloads

Add(KeyValuePair<CoseHeaderLabel,CoseHeaderValue>)

Adds an item to the ICollection<T>.

Add(CoseHeaderLabel, Byte[])

Adds the specified label and value to the header map.

Add(CoseHeaderLabel, Int32)

Adds the specified label and value to the header map.

Add(CoseHeaderLabel, ReadOnlySpan<Byte>)

Adds the specified label and value to the header map.

Add(CoseHeaderLabel, CoseHeaderValue)

Adds an element with the provided key and value to the IDictionary<TKey,TValue>.

Add(CoseHeaderLabel, String)

Adds the specified label and value to the header map.

Add(KeyValuePair<CoseHeaderLabel,CoseHeaderValue>)

Source:
CoseHeaderMap.cs
Source:
CoseHeaderMap.cs
Source:
CoseHeaderMap.cs
Source:
CoseHeaderMap.cs
Source:
CoseHeaderMap.cs

Adds an item to the 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))

Parameters

Implements

Exceptions

The header map is read-only.

item's value is not a valid CBOR value.

Applies to

Add(CoseHeaderLabel, Byte[])

Source:
CoseHeaderMap.cs
Source:
CoseHeaderMap.cs
Source:
CoseHeaderMap.cs
Source:
CoseHeaderMap.cs
Source:
CoseHeaderMap.cs

Adds the specified label and value to the header map.

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())

Parameters

label
CoseHeaderLabel

The label for the header to add.

value
Byte[]

The value of the header to add.

Exceptions

The header map is read-only.

Remarks

value does not need to contain a valid CBOR-encoded value, as it will be encoded as a CBOR byte string. To specify a CBOR-encoded value directly, see FromEncodedValue(ReadOnlySpan<Byte>) and Add(CoseHeaderLabel, CoseHeaderValue).

Applies to

Add(CoseHeaderLabel, Int32)

Source:
CoseHeaderMap.cs
Source:
CoseHeaderMap.cs
Source:
CoseHeaderMap.cs
Source:
CoseHeaderMap.cs
Source:
CoseHeaderMap.cs

Adds the specified label and value to the header map.

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)

Parameters

label
CoseHeaderLabel

The label for the header to add.

value
Int32

The value of the header to add.

Exceptions

The header map is read-only.

Applies to

Add(CoseHeaderLabel, ReadOnlySpan<Byte>)

Source:
CoseHeaderMap.cs
Source:
CoseHeaderMap.cs
Source:
CoseHeaderMap.cs
Source:
CoseHeaderMap.cs
Source:
CoseHeaderMap.cs

Adds the specified label and value to the header map.

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))

Parameters

label
CoseHeaderLabel

The label for the header to add.

value
ReadOnlySpan<Byte>

The value of the header to add.

Exceptions

The header map is read-only.

Remarks

value does not need to contain a valid CBOR-encoded value, as it will be encoded as a CBOR byte string. To specify a CBOR-encoded value directly, see FromEncodedValue(ReadOnlySpan<Byte>) and Add(CoseHeaderLabel, CoseHeaderValue).

Applies to

Add(CoseHeaderLabel, CoseHeaderValue)

Source:
CoseHeaderMap.cs
Source:
CoseHeaderMap.cs
Source:
CoseHeaderMap.cs
Source:
CoseHeaderMap.cs
Source:
CoseHeaderMap.cs

Adds an element with the provided key and value to the 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)

Parameters

key
CoseHeaderLabel

The object to use as the key of the element to add.

value
CoseHeaderValue

The object to use as the value of the element to add.

Implements

Exceptions

The header map is read-only.

value is not a valid CBOR value.

Applies to

Add(CoseHeaderLabel, String)

Source:
CoseHeaderMap.cs
Source:
CoseHeaderMap.cs
Source:
CoseHeaderMap.cs
Source:
CoseHeaderMap.cs
Source:
CoseHeaderMap.cs

Adds the specified label and value to the header map.

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)

Parameters

label
CoseHeaderLabel

The label for the header to add.

value
String

The value of the header to add.

Exceptions

The header map is read-only.

Applies to