Table of Contents

Class ConnectionStatusBehavior

Namespace
Microsoft.ServiceBus
Assembly
Microsoft.ServiceBus.dll

An endpoint behavior that provides access to the connection status of a service listening on Azure Service Bus.

public class ConnectionStatusBehavior : IEndpointBehavior, IConnectionStatus
Inheritance
ConnectionStatusBehavior
Implements
IEndpointBehavior
Inherited Members

Constructors

ConnectionStatusBehavior()

Initializes a new instance of the ConnectionStatusBehavior class.

public ConnectionStatusBehavior()

Properties

IsOnline

Gets a value that determines if the connection is online.

public bool IsOnline { get; }

Property Value

bool

true if the connection is online; otherwise, false.

LastError

Gets the last error.

public Exception LastError { get; }

Property Value

Exception

Returns a Exception that contains the last error.

Methods

Retry()

Retries the connection.

public void Retry()

Events

Connecting

Occurs when the endpoint gets temporarily disconnected from the Relay Service and for each reconnect attempt.

public event EventHandler Connecting

Event Type

EventHandler

Offline

Occurs when the endpoint stops attempting to connect to the Relay Service.

public event EventHandler Offline

Event Type

EventHandler

Online

Occurs when the endpoint successfully connects to the Relay Service.

public event EventHandler Online

Event Type

EventHandler