Class InMemorySagaStateStore
เนื้อหานี้ยังไม่ได้แปลเป็นภาษาไทย แสดงเป็นภาษาอังกฤษแทน
Namespace: Cephalon.Behaviors.Patterns.Stores
Assembly: Cephalon.Behaviors.Patterns.dll
An in-memory implementation of
public sealed class InMemorySagaStateStore : ISagaStateStoreInheritance
Section titled “Inheritance”object ← InMemorySagaStateStore
Implements
Section titled “Implements”Inherited Members
Section titled “Inherited Members”object.Equals(object?), object.Equals(object?, object?), object.GetHashCode(), object.GetType(), object.ReferenceEquals(object?, object?), object.ToString()
Methods
Section titled “Methods”DeleteAsync(string, CancellationToken)
Section titled “ DeleteAsync(string, CancellationToken)”Removes the saga state for the given saga identifier.
public Task DeleteAsync(string sagaId, CancellationToken ct = default)Parameters
Section titled “Parameters”sagaId string
The unique identifier of the saga instance to remove.
A token that cancels the operation.
Returns
Section titled “Returns”A completed task.
GetAsync<T>(string, CancellationToken)
Section titled “ GetAsync<T>(string, CancellationToken)”Retrieves and deserializes the saga state for the given saga identifier.
public Task<T?> GetAsync<T>(string sagaId, CancellationToken ct = default)Parameters
Section titled “Parameters”sagaId string
The unique identifier of the saga instance.
A token that cancels the operation.
Returns
Section titled “Returns”Task<T?>
The deserialized state, or null if not found.
Type Parameters
Section titled “Type Parameters”T
The saga state type.
SaveAsync<T>(string, T, CancellationToken)
Section titled “ SaveAsync<T>(string, T, CancellationToken)”Serializes and upserts the saga state for the given saga identifier.
public Task SaveAsync<T>(string sagaId, T state, CancellationToken ct = default)Parameters
Section titled “Parameters”sagaId string
The unique identifier of the saga instance.
state T
The state to persist.
A token that cancels the operation.
Returns
Section titled “Returns”A completed task.
Type Parameters
Section titled “Type Parameters”T
The saga state type.