Attachments API used to provide additional state data to live alongside specific Proton AMQP resources.
More...
|
bool | TryGet (in string key, out object value) |
| Gets the user attached value that is associated with the given key, or null if no data is mapped to the key. More...
|
|
T | Get< T > (in string key, in T defaultValue) |
| Gets the user attached value that is associated with the given key, or null if no data is mapped to the key. More...
|
|
IAttachments | Set (in string key, in object value) |
| Maps a given object to the given key in this Attachments instance. More...
|
|
bool | Contains (in string key) |
| Returns if the given key has a value mapped to it in this Attachments instance. More...
|
|
IAttachments | Clear () |
| Removes all attachments from this instance. More...
|
|
|
object | this[string key] [get, set] |
| Gets or sets the attachment with the given key. If the element being retrieved is not in the collection an exception is thrown. More...
|
|
Attachments API used to provide additional state data to live alongside specific Proton AMQP resources.
◆ Clear()
IAttachments Apache.Qpid.Proton.Engine.IAttachments.Clear |
( |
| ) |
|
◆ Contains()
bool Apache.Qpid.Proton.Engine.IAttachments.Contains |
( |
in string |
key | ) |
|
◆ Get< T >()
T Apache.Qpid.Proton.Engine.IAttachments.Get< T > |
( |
in string |
key, |
|
|
in T |
defaultValue |
|
) |
| |
Gets the user attached value that is associated with the given key, or null if no data is mapped to the key.
- Template Parameters
-
T | The type to attempt to convert the attachment to |
- Parameters
-
key | The key to search for in the attachments |
defaultValue | The default to return if the key is not present |
- Returns
- A user set attachment for this given key or return the default
- Exceptions
-
InvalidCastException | If the attachment cannot be converted |
Implemented in Apache.Qpid.Proton.Engine.Implementation.ProtonAttachments.
◆ Set()
IAttachments Apache.Qpid.Proton.Engine.IAttachments.Set |
( |
in string |
key, |
|
|
in object |
value |
|
) |
| |
◆ TryGet()
bool Apache.Qpid.Proton.Engine.IAttachments.TryGet |
( |
in string |
key, |
|
|
out object |
value |
|
) |
| |
Gets the user attached value that is associated with the given key, or null if no data is mapped to the key.
- Parameters
-
key | The key to search for in the attachments |
value | The value that result if the key exists |
- Returns
- True if the value was in the attachments and retrieved
Implemented in Apache.Qpid.Proton.Engine.Implementation.ProtonAttachments.
◆ this[string key]
object Apache.Qpid.Proton.Engine.IAttachments.this[string key] |
|
getset |
Gets or sets the attachment with the given key. If the element being retrieved is not in the collection an exception is thrown.
- Parameters
-
- Returns
- Exceptions
-
KeyNotFoundException | If the given key is not in the attachments |
ArgumentNullException | If the given key is null |
The documentation for this interface was generated from the following file:
- src/Proton/Engine/IAttachments.cs