Interface ISagaProcessContext
- Namespace
- Stratara.Sagas.Abstractions
- Assembly
- Stratara.Sagas.dll
Collects what a process step produces: state events to append and timeouts to schedule or cancel.
public interface ISagaProcessContext
- Extension Methods
Methods
Cancel(string)
Cancels a timeout; cancelling one that does not exist is not an error.
void Cancel(string purpose)
Parameters
purposestringWhat the timeout was for.
Emit(object)
Appends an event to the process's stream once the step completes.
void Emit(object stateEvent)
Parameters
stateEventobjectThe event; the state must have an
Applymethod for it.
Schedule(string, DateTimeOffset)
Schedules a timeout, replacing one with the same purpose. Emit the event that records why in the same step.
void Schedule(string purpose, DateTimeOffset dueAt)
Parameters
purposestringWhat the timeout is for.
dueAtDateTimeOffsetWhen it fires.