in src/DotPulsar/Internal/Abstractions/Process.cs [52:88]
public void Handle(IEvent e)
{
switch (e)
{
case ExecutorFaulted executorFaulted:
ExecutorState = ExecutorState.Faulted;
Exception = executorFaulted.Exception;
break;
case ChannelActivated _:
ChannelState = ChannelState.Active;
break;
case ChannelClosedByServer _:
ChannelState = ChannelState.ClosedByServer;
break;
case ChannelConnected _:
ChannelState = ChannelState.Connected;
break;
case ChannelDeactivated _:
ChannelState = ChannelState.Inactive;
break;
case SendReceiptWrongOrdering _:
case ChannelDisconnected _:
ChannelState = ChannelState.Disconnected;
break;
case ChannelReachedEndOfTopic _:
ChannelState = ChannelState.ReachedEndOfTopic;
break;
case ChannelUnsubscribed _:
ChannelState = ChannelState.Unsubscribed;
break;
case ProducerWaitingForExclusive _:
ChannelState = ChannelState.WaitingForExclusive;
break;
}
CalculateState();
}