Interface IAgent
- Namespace
- MassTransit
- Assembly
- MassTransit.Abstractions.dll
An agent can be supervised, and signals when it has completed
public interface IAgent
- Extension Methods
Properties
Completed
A Task which is completed when the agent has completed (should never be set to Faulted, per convention)
Task Completed { get; }
Property Value
Ready
A Task which can be awaited and is completed when the agent is either ready or faulted/canceled
Task Ready { get; }
Property Value
Stopped
The token which indicates if the agent is stopped
CancellationToken Stopped { get; }
Property Value
Stopping
The token which indicates if the agent is in the process of stopping (or stopped)
CancellationToken Stopping { get; }
Property Value
Methods
Stop(StopContext)
Stop the agent, and any supervised agents under it's control. Any faults related to stopping should be returned via this method, and not propagated to the Completed Task.
Task Stop(StopContext context)
Parameters
context
StopContextThe stop context