Skip to main content

ResQ.Blockchain.MockNeoClient

MockNeoClient.GetEventsByIncidentAsync(string, CancellationToken) Method

Retrieves mock events by incident ID from the in-memory store.

Parameters

incidentId System.String The incident ID to query. cancellationToken System.Threading.CancellationToken Cancellation token for the operation. Implements GetEventsByIncidentAsync(string, CancellationToken)

Returns

System.Threading.Tasks.Task<System.Collections.Generic.IReadOnlyList<BlockchainEvent>>
A read-only list of events associated with the incident, or an empty list if none exist.

Example

Remarks

Events are stored when recorded via RecordEventAsync(BlockchainEvent, CancellationToken) if the payload contains an “incident” field. This method retrieves all events that were indexed under the specified incident ID.