Skip to content
Start free evaluation

PDComm.GemEvent

Class

Represents one transport event delivered by GemWorker.ReadEventsAsync together with its GEM processing result.

public sealed class GemEvent : IDisposable

The worker thread has already passed GemEvent.TransportEvent to GemEndpoint.HandleEvent. The event owns both GemEvent.TransportEvent and GemEvent.Result; disposing it disposes both, so do not dispose them separately while the event is in use. The reader must dispose every event it receives.

Members

Dispose

Method

Disposes GemEvent.Result and GemEvent.TransportEvent.

public void Dispose()

ProcessingStatus

Property

Gets PdcommStatus.Ok when GemEvent.Result is available, or the status that GemEndpoint.HandleEvent failed with, for example PdcommStatus.StaleToken.

public PdcommStatus ProcessingStatus { get; }

PdcommStatus.Poisoned and PdcommStatus.InternalError are not reported here; they stop the worker instead.

Result

Property

Gets the GEM result, or null when processing failed; GemEvent.ProcessingStatus then holds the reason.

public GemResult? Result { get; }

TransportEvent

Property

Gets the raw HSMS event, which stays readable after GEM processing.

public HsmsEvent TransportEvent { get; }

Pass it to GemWorker.ReplyRawAsync to answer an GemResultKind.Unhandled primary.