Proton DotNet
Loading...
Searching...
No Matches
Public Member Functions | Properties | List of all members
Apache.Qpid.Proton.Engine.Implementation.ProtonAttachments Class Referencesealed
Inheritance diagram for Apache.Qpid.Proton.Engine.Implementation.ProtonAttachments:
Apache.Qpid.Proton.Engine.IAttachments

Public Member Functions

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

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.
 
- Properties inherited from Apache.Qpid.Proton.Engine.IAttachments

Member Function Documentation

◆ Clear()

IAttachments Apache.Qpid.Proton.Engine.Implementation.ProtonAttachments.Clear ( )
inline

Removes all attachments from this instance.

Returns
This Attachments instance

Implements Apache.Qpid.Proton.Engine.IAttachments.

◆ 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
keyThe 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
TThe type to attempt to convert the attachment to
Parameters
keyThe key to search for in the attachments
defaultValueThe default to return if the key is not present
Returns
A user set attachment for this given key or return the default
Exceptions
InvalidCastExceptionIf 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
keyThe key used to add or replace a value
valueThe 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
keyThe key to search for in the attachments
valueThe value that result if the key exists
Returns
True if the value was in the attachments and retrieved

Implements Apache.Qpid.Proton.Engine.IAttachments.

Property Documentation

◆ 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
key
Returns
Exceptions
KeyNotFoundExceptionIf the given key is not in the attachments
ArgumentNullExceptionIf the given key is null

Implements Apache.Qpid.Proton.Engine.IAttachments.


The documentation for this class was generated from the following file: