Skip to main content
Table of Contents

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

purpose string

What the timeout was for.

Emit(object)

Appends an event to the process's stream once the step completes.

void Emit(object stateEvent)

Parameters

stateEvent object

The event; the state must have an Apply method 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

purpose string

What the timeout is for.

dueAt DateTimeOffset

When it fires.