Share via


CircuitHandler Class

Definition

A CircuitHandler allows running code during specific lifetime events of a Circuit.

public ref class CircuitHandler abstract
public abstract class CircuitHandler
type CircuitHandler = class
Public MustInherit Class CircuitHandler
Inheritance
CircuitHandler

Constructors

CircuitHandler()

Properties

Order

Gets the execution order for the current instance of CircuitHandler.

When multiple CircuitHandler instances are registered, the Order property is used to determine the order in which instances are executed. When two handlers have the same value for Order, their execution order is non-deterministic.

Methods

CreateInboundActivityHandler(Func<CircuitInboundActivityContext,Task>)

Creates a handler that gets invoked when inbound activity on the circuit causes an asynchronous task to be dispatched on the server.

OnCircuitClosedAsync(Circuit, CancellationToken)

Invoked when a new circuit is being discarded.

OnCircuitOpenedAsync(Circuit, CancellationToken)

Invoked when a new circuit was established.

OnConnectionDownAsync(Circuit, CancellationToken)

Invoked when a connection to the client was dropped.

OnConnectionUpAsync(Circuit, CancellationToken)

Invoked when a connection to the client was established.

This method is executed once initially after OnCircuitOpenedAsync(Circuit, CancellationToken) and once each for each reconnect during the lifetime of a circuit.

Applies to