|
IAttachments | Clear () |
| Removes all attachments from this instance.
|
|
bool | Contains (in string key) |
| Returns if the given key has a value mapped to it in this Attachments instance.
|
|
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 | 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.
|
|
|
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.
|
|
◆ Clear()
IAttachments Apache.Qpid.Proton.Engine.Implementation.ProtonAttachments.Clear |
( |
| ) |
|
|
inline |
◆ Contains()
bool Apache.Qpid.Proton.Engine.Implementation.ProtonAttachments.Contains |
( |
in string |
key | ) |
|
|
inline |
Returns if the given key has a value mapped to it in this Attachments instance.
- Parameters
-
key | The key to search in the attachments |
- Returns
- true if the key is present or false if not.
Implements Apache.Qpid.Proton.Engine.IAttachments.
◆ Get< T >()
T Apache.Qpid.Proton.Engine.Implementation.ProtonAttachments.Get< T > |
( |
in string |
key, |
|
|
in T |
defaultValue |
|
) |
| |
|
inline |
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 |
Implements Apache.Qpid.Proton.Engine.IAttachments.
◆ Set()
IAttachments Apache.Qpid.Proton.Engine.Implementation.ProtonAttachments.Set |
( |
in string |
key, |
|
|
in object |
value |
|
) |
| |
|
inline |
Maps a given object to the given key in this Attachments instance.
- Parameters
-
key | The key used to add or replace a value |
value | The value to store with the given key |
- Returns
- This Attachments instance
Implements Apache.Qpid.Proton.Engine.IAttachments.
◆ TryGet()
bool Apache.Qpid.Proton.Engine.Implementation.ProtonAttachments.TryGet |
( |
in string |
key, |
|
|
out object |
value |
|
) |
| |
|
inline |
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
Implements Apache.Qpid.Proton.Engine.IAttachments.
◆ this[string key]
object Apache.Qpid.Proton.Engine.Implementation.ProtonAttachments.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 |
Implements Apache.Qpid.Proton.Engine.IAttachments.
The documentation for this class was generated from the following file:
- src/Proton/Engine/Implementation/ProtonAttachments.cs