Class PipelineObserver
Registers a ResultFlowObserver to receive pipeline execution events
from Bind, Map, Ensure, Tap, and Match calls.
public static class PipelineObserver
- Inheritance
-
PipelineObserver
- Inherited Members
Properties
Current
Returns the currently registered observer, or null if none is registered.
public static ResultFlowObserver? Current { get; }
Property Value
Methods
BeginPipeline(string, string, string?, string[]?)
Begins a traced pipeline execution. Fires OnPipelineStart(PipelineStartContext),
sets the REslava.Result.Observers.PipelineState for the current async context (saving any outer
state for nested pipelines), and returns a scope that fires
OnPipelineEnd(PipelineEndContext) on dispose.
Call from a _Traced generated wrapper inside a try/finally.
public static PipelineScope BeginPipeline(string pipelineId, string methodName, string? inputValue, string[]? nodeIds)
Parameters
pipelineIdstringStable identifier for this pipeline (e.g. FNV-1a hash).
methodNamestringThe user's method name (e.g. "PlaceOrder").
inputValuestringOptional string representation of the input for display.
nodeIdsstring[]Ordered node identifiers matching the pipeline steps.
Returns
Register(ResultFlowObserver)
Registers the observer globally. Replaces any previously registered observer.
Call in Program.cs before the app starts processing requests.
public static void Register(ResultFlowObserver observer)
Parameters
observerResultFlowObserver
RegisterScoped(ResultFlowObserver)
Registers the observer for the duration of the returned scope. Restores the previous observer on dispose. Useful in tests.
public static IDisposable RegisterScoped(ResultFlowObserver observer)
Parameters
observerResultFlowObserver
Returns
Unregister()
Removes the currently registered observer.
public static void Unregister()