Table of Contents

Class ProcessorBase<T, TR>

Namespace
RisingV.Shared.Processors
Assembly
RisingV.Shared.dll

Base class for processors that handle events of type T and produce results of type TR.

public abstract class ProcessorBase<T, TR> : IProcessor<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.

Inheritance
ProcessorBase<T, TR>
Implements
IProcessor<T, TR>
Derived
Inherited Members
Extension Methods

Methods

CanProcess(T, bool)

Determines whether the processor can handle the given event and whether it is a post-processing event.

public abstract bool CanProcess(T @event, bool isPost)

Parameters

event T

The event to process.

isPost bool

Indicates 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.

public virtual ProcessToken PostProcess(T @event, out TR? result)

Parameters

event T

The event to process.

result TR

An output parameter that will hold the result of the processing.

Returns

ProcessToken

A token indicating the processing result.

PreProcess(T, out TR?)

Pre-process the event before it is processed.

public virtual ProcessToken PreProcess(T @event, out TR? result)

Parameters

event T

The event to process.

result TR

The result of the processing.

Returns

ProcessToken

A token indicating whether to continue processing or not.