Class MutableMessageHeaders
- Namespace
- Steeltoe.Integration.Support
- Assembly
- Steeltoe.Integration.IntegrationBase.dll
public class MutableMessageHeaders : MessageHeaders, IMessageHeaders, IDictionary, ICollection, IDictionary<string, object>, ICollection<KeyValuePair<string, object>>, IEnumerable<KeyValuePair<string, object>>, IEnumerable
- Inheritance
-
MutableMessageHeaders
- Implements
- Inherited Members
Constructors
MutableMessageHeaders(IDictionary<string, object>)
public MutableMessageHeaders(IDictionary<string, object> headers)
Parameters
headers
IDictionary<string, object>
MutableMessageHeaders(IDictionary<string, object>, string, long?)
public MutableMessageHeaders(IDictionary<string, object> headers, string id, long? timestamp)
Parameters
headers
IDictionary<string, object>id
stringtimestamp
long?
Properties
this[string]
Gets or sets the element with the specified key.
public override object this[string key] { get; set; }
Parameters
key
stringThe key of the element to get or set.
Property Value
- object
The element with the specified key.
Exceptions
- ArgumentNullException
key
is null.- KeyNotFoundException
The property is retrieved and
key
is not found.- NotSupportedException
The property is set and the IDictionary<TKey, TValue> is read-only.
Methods
Add(KeyValuePair<string, object>)
Adds an item to the ICollection<T>.
public override void Add(KeyValuePair<string, object> item)
Parameters
item
KeyValuePair<string, object>The object to add to the ICollection<T>.
Exceptions
- NotSupportedException
The ICollection<T> is read-only.
Add(string, object)
Adds an element with the provided key and value to the IDictionary<TKey, TValue>.
public override void Add(string key, object value)
Parameters
key
stringThe object to use as the key of the element to add.
value
objectThe object to use as the value of the element to add.
Exceptions
- ArgumentNullException
key
is null.- ArgumentException
An element with the same key already exists in the IDictionary<TKey, TValue>.
- NotSupportedException
The IDictionary<TKey, TValue> is read-only.
AddRange(IDictionary<string, object>)
public virtual void AddRange(IDictionary<string, object> map)
Parameters
map
IDictionary<string, object>
Clear()
Removes all elements from the IDictionary object.
public override void Clear()
Exceptions
- NotSupportedException
The IDictionary object is read-only.
Remove(KeyValuePair<string, object>)
Removes the first occurrence of a specific object from the ICollection<T>.
public override bool Remove(KeyValuePair<string, object> item)
Parameters
item
KeyValuePair<string, object>The object to remove from the ICollection<T>.
Returns
- bool
true if
item
was successfully removed from the ICollection<T>; otherwise, false. This method also returns false ifitem
is not found in the original ICollection<T>.
Exceptions
- NotSupportedException
The ICollection<T> is read-only.
Remove(string)
Removes the element with the specified key from the IDictionary<TKey, TValue>.
public override bool Remove(string key)
Parameters
key
stringThe key of the element to remove.
Returns
- bool
true if the element is successfully removed; otherwise, false. This method also returns false if
key
was not found in the original IDictionary<TKey, TValue>.
Exceptions
- ArgumentNullException
key
is null.- NotSupportedException
The IDictionary<TKey, TValue> is read-only.