Interface IProcessor<T, TR>
- Namespace
- RisingV.Shared.Processors
- Assembly
- RisingV.Shared.dll
Represents a processor that can handle events of type T and return a result of type TR.
public interface IProcessor<in T, TR> : IProcessor, IManageable<ProcessorManager>, IManageable
Type Parameters
T
The type of the event to process.
TR
The type of the result produced by the processing.
- Extension Methods
Methods
CanProcess(T, bool)
Determines whether the processor can handle the given event and whether it is a post-processing event.
bool CanProcess(T @event, bool isPost)
Parameters
event
TThe event to process.
isPost
boolIndicates whether the event is a post-processing event.
Returns
- bool
true if the processor can handle the event; otherwise, false.
PostProcess(T, out TR?)
Processes the given event and returns a token indicating the processing result.
ProcessToken PostProcess(T @event, out TR? result)
Parameters
event
TThe event to process.
result
TRAn output parameter that will hold the result of the processing.
Returns
- ProcessToken
A token indicating the processing result.