Class SignalContext<TSignal, TResponse>
- Namespace
- Prefrontal.Signaling
- Assembly
- Prefrontal.Core.dll
The first and only argument passed to signal interceptors to allow them to change the signal value before passing it on to the next processor, or stop processing by not calling Next() and finally to allow them to modify the response.
public class SignalContext<TSignal, TResponse>
Type Parameters
TSignal
The type of signal the interceptor will process.
TResponse
The type of the response that the interceptor should return.
- Inheritance
-
SignalContext<TSignal, TResponse>
- Inherited Members
- Extension Methods
Fields
Signal
The incoming signal that is being processed.
public readonly TSignal Signal
Field Value
- TSignal
Methods
Next()
Call this method to pass the signal unchanged to the next processor. The returned values are the responses from all subsequent processors and it's up to the interceptor to decide if the responses should be returned as is, modified or not returned at all.
public IAsyncEnumerable<TResponse> Next()
Returns
- IAsyncEnumerable<TResponse>
The responses from all subsequent processors.
Next(TSignal)
Call this method to pass a different signal to the next processor. The returned values are the responses from all subsequent processors and it's up to the interceptor to decide if the responses should be returned as is, modified or not returned at all.
public IAsyncEnumerable<TResponse> Next(TSignal signal)
Parameters
signal
TSignal
Returns
- IAsyncEnumerable<TResponse>