Interface IAmqpObject
Represents an AMQP object.
Namespace: Amqp
Assembly: Amqp.Net.dll
Syntax
public interface IAmqpObjectProperties
Error
Gets the last Error, if any, of the object.
Declaration
Error Error { get; }Property Value
| Type | Description | 
|---|---|
| Error | 
IsClosed
Gets a boolean value indicating if the object has been closed.
Declaration
bool IsClosed { get; }Property Value
| Type | Description | 
|---|---|
| System.Boolean | 
Methods
AddClosedCallback(ClosedCallback)
Adds a callback to be called when the object is closed. This method guarantees that the callback is invoked even if it is called after the object is closed.
Declaration
void AddClosedCallback(ClosedCallback callback)Parameters
| Type | Name | Description | 
|---|---|---|
| ClosedCallback | callback | The callback to be invoked. | 
Close()
Closes the AMQP object. It waits until a response is received from the peer, or throws TimeoutException after a default timeout.
Declaration
void Close()Close(TimeSpan, Error)
Closes the AMQP object with the specified error.
Declaration
void Close(TimeSpan waitUntilEnded, Error error)Parameters
| Type | Name | Description | 
|---|---|---|
| System.TimeSpan | waitUntilEnded | The duration to block until a closing frame is received from the peer. If it is TimeSpan.Zero, the call is non-blocking. | 
| Error | error | The AMQP Error to send to the peer, indicating why the object is being closed. | 
CloseAsync()
Closes an AMQP object asynchronously using a default timeout.
Declaration
Task CloseAsync()Returns
| Type | Description | 
|---|---|
| System.Threading.Tasks.Task | A Task for the asynchronous close operation. | 
CloseAsync(TimeSpan, Error)
Closes an AMQP object asynchronously.
Declaration
Task CloseAsync(TimeSpan timeout, Error error)Parameters
| Type | Name | Description | 
|---|---|---|
| System.TimeSpan | timeout | The time to wait for the task to complete. Refer to AmqpObject.Close for details. | 
| Error | error | The AMQP Error to send to the peer, indicating why the object is being closed. | 
Returns
| Type | Description | 
|---|---|
| System.Threading.Tasks.Task | A Task for the asynchronous close operation. | 
Events
Closed
Gets the event used to notify that the object is closed. Callbacks may not be invoked if they are registered after the object is closed. It is recommend to call AddClosedCallback method.
Declaration
event ClosedCallback ClosedEvent Type
| Type | Description | 
|---|---|
| ClosedCallback |