|
Proton DotNet
|
Attachments API used to provide additional state data to live alongside specific Proton AMQP resources. More...
Public Member Functions | |
| 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. | |
| 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. | |
| IAttachments | Set (in string key, in object value) |
| Maps a given object to the given key in this Attachments instance. | |
| bool | Contains (in string key) |
| Returns if the given key has a value mapped to it in this Attachments instance. | |
| IAttachments | Clear () |
| Removes all attachments from this instance. | |
Properties | |
| 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. | |
Attachments API used to provide additional state data to live alongside specific Proton AMQP resources.
| IAttachments Apache.Qpid.Proton.Engine.IAttachments.Clear | ( | ) |
Removes all attachments from this instance.
Implemented in Apache.Qpid.Proton.Engine.Implementation.ProtonAttachments.
| bool Apache.Qpid.Proton.Engine.IAttachments.Contains | ( | in string | key | ) |
Returns if the given key has a value mapped to it in this Attachments instance.
| key | The key to search in the attachments |
Implemented in Apache.Qpid.Proton.Engine.Implementation.ProtonAttachments.
| 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.
| T | The type to attempt to convert the attachment to |
| key | The key to search for in the attachments |
| defaultValue | The default to return if the key is not present |
| InvalidCastException | If the attachment cannot be converted |
Implemented in Apache.Qpid.Proton.Engine.Implementation.ProtonAttachments.
| IAttachments Apache.Qpid.Proton.Engine.IAttachments.Set | ( | in string | key, |
| in object | value | ||
| ) |
Maps a given object to the given key in this Attachments instance.
| key | The key used to add or replace a value |
| value | The value to store with the given key |
Implemented in Apache.Qpid.Proton.Engine.Implementation.ProtonAttachments.
| 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.
| key | The key to search for in the attachments |
| value | The value that result if the key exists |
Implemented in Apache.Qpid.Proton.Engine.Implementation.ProtonAttachments.
|
getset |
Gets or sets the attachment with the given key. If the element being retrieved is not in the collection an exception is thrown.
| key |
| KeyNotFoundException | If the given key is not in the attachments |
| ArgumentNullException | If the given key is null |
Implemented in Apache.Qpid.Proton.Engine.Implementation.ProtonAttachments.