Proton DotNet
Loading...
Searching...
No Matches
Public Member Functions | Properties | List of all members
Apache.Qpid.Proton.Engine.IAttachments Interface Reference

Attachments API used to provide additional state data to live alongside specific Proton AMQP resources. More...

Inheritance diagram for Apache.Qpid.Proton.Engine.IAttachments:
Apache.Qpid.Proton.Engine.Implementation.ProtonAttachments

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

Detailed Description

Attachments API used to provide additional state data to live alongside specific Proton AMQP resources.

Member Function Documentation

◆ Clear()

IAttachments Apache.Qpid.Proton.Engine.IAttachments.Clear ( )

Removes all attachments from this instance.

Returns
This Attachments instance

Implemented in Apache.Qpid.Proton.Engine.Implementation.ProtonAttachments.

◆ Contains()

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.

Parameters
keyThe key to search in the attachments
Returns
true if the key is present or false if not.

Implemented in Apache.Qpid.Proton.Engine.Implementation.ProtonAttachments.

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

Implemented in Apache.Qpid.Proton.Engine.Implementation.ProtonAttachments.

◆ Set()

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.

Parameters
keyThe key used to add or replace a value
valueThe value to store with the given key
Returns
This Attachments instance

Implemented in Apache.Qpid.Proton.Engine.Implementation.ProtonAttachments.

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

Implemented in Apache.Qpid.Proton.Engine.Implementation.ProtonAttachments.

Property Documentation

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

Implemented in Apache.Qpid.Proton.Engine.Implementation.ProtonAttachments.


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