Class HookStage<TEvent, TCurrent, TContext>
Namespace: DotBoxD.Plugins.Runtime.Hooks
Assembly: DotBoxD.Plugins.dll
A re-typed stage in a hook chain after a HookPipeline<TEvent>.Select. It
carries a composed projection of the original event to the element currently flowing
(TCurrent) plus a short-circuit flag, so Where/Select compose
without re-keying the pipeline (it stays keyed by TEvent). Terminals
re-run the projection per publish and short-circuit when a Where rejected the element.
Every fluent method offers both the (element, context) and element-only lambda arities, chosen
independently per stage.
[PipelineSurface(PipelineTransport.Local)]public class HookStage<TEvent, TCurrent, TContext>Type Parameters
Section titled “Type Parameters”TEvent
TCurrent
TContext
Inheritance
Section titled “Inheritance”object ← HookStage<TEvent, TCurrent, TContext>
Inherited Members
Section titled “Inherited Members”object.Equals(object?), object.Equals(object?, object?), object.GetHashCode(), object.GetType(), object.MemberwiseClone(), object.ReferenceEquals(object?, object?), object.ToString()
Methods
Section titled “Methods”Run(Func<TCurrent, TContext, ValueTask>, IRKernel?)
Section titled “ Run(Func<TCurrent, TContext, ValueTask>, IRKernel?)”The terminal the analyzer lowers to verified IR; un-lowered it throws (never native).
public HookPipeline<TEvent, TContext> Run(Func<TCurrent, TContext, ValueTask> handler, IRKernel? irHandler = null)Parameters
Section titled “Parameters”handler Func<TCurrent, TContext, ValueTask>
irHandler IRKernel?
Returns
Section titled “Returns”HookPipeline<TEvent, TContext>
Run(Action<TCurrent, TContext>, IRKernel?)
Section titled “ Run(Action<TCurrent, TContext>, IRKernel?)”public HookPipeline<TEvent, TContext> Run(Action<TCurrent, TContext> handler, IRKernel? irHandler = null)Parameters
Section titled “Parameters”handler Action<TCurrent, TContext>
irHandler IRKernel?
Returns
Section titled “Returns”HookPipeline<TEvent, TContext>
Run(Func<TCurrent, ValueTask>, IRKernel?)
Section titled “ Run(Func<TCurrent, ValueTask>, IRKernel?)”public HookPipeline<TEvent, TContext> Run(Func<TCurrent, ValueTask> handler, IRKernel? irHandler = null)Parameters
Section titled “Parameters”handler Func<TCurrent, ValueTask>
irHandler IRKernel?
Returns
Section titled “Returns”HookPipeline<TEvent, TContext>
Run(Action<TCurrent>, IRKernel?)
Section titled “ Run(Action<TCurrent>, IRKernel?)”public HookPipeline<TEvent, TContext> Run(Action<TCurrent> handler, IRKernel? irHandler = null)Parameters
Section titled “Parameters”handler Action<TCurrent>
irHandler IRKernel?
Returns
Section titled “Returns”HookPipeline<TEvent, TContext>
RunLocal(Func<TCurrent, TContext, ValueTask>)
Section titled “ RunLocal(Func<TCurrent, TContext, ValueTask>)”Native host terminal over the projected element (NOT sandboxed).
public HookPipeline<TEvent, TContext> RunLocal(Func<TCurrent, TContext, ValueTask> handler)Parameters
Section titled “Parameters”handler Func<TCurrent, TContext, ValueTask>
Returns
Section titled “Returns”HookPipeline<TEvent, TContext>
RunLocal(Action<TCurrent, TContext>)
Section titled “ RunLocal(Action<TCurrent, TContext>)”public HookPipeline<TEvent, TContext> RunLocal(Action<TCurrent, TContext> handler)Parameters
Section titled “Parameters”handler Action<TCurrent, TContext>
Returns
Section titled “Returns”HookPipeline<TEvent, TContext>
RunLocal(Func<TCurrent, ValueTask>)
Section titled “ RunLocal(Func<TCurrent, ValueTask>)”public HookPipeline<TEvent, TContext> RunLocal(Func<TCurrent, ValueTask> handler)Parameters
Section titled “Parameters”handler Func<TCurrent, ValueTask>
Returns
Section titled “Returns”HookPipeline<TEvent, TContext>
RunLocal(Action<TCurrent>)
Section titled “ RunLocal(Action<TCurrent>)”public HookPipeline<TEvent, TContext> RunLocal(Action<TCurrent> handler)Parameters
Section titled “Parameters”handler Action<TCurrent>
Returns
Section titled “Returns”HookPipeline<TEvent, TContext>
Select<TNext>(Func<TCurrent, TContext, TNext>, IRFunc<TCurrent, TContext, TNext>?)
Section titled “ Select<TNext>(Func<TCurrent, TContext, TNext>, IRFunc<TCurrent, TContext, TNext>?)”public HookStage<TEvent, TNext, TContext> Select<TNext>(Func<TCurrent, TContext, TNext> projection, IRFunc<TCurrent, TContext, TNext>? irProjection = null)Parameters
Section titled “Parameters”projection Func<TCurrent, TContext, TNext>
irProjection IRFunc<TCurrent, TContext, TNext>?
Returns
Section titled “Returns”HookStage<TEvent, TNext, TContext>
Type Parameters
Section titled “Type Parameters”TNext
Select<TNext>(Func<TCurrent, TNext>, IRFunc<TCurrent, TNext>?)
Section titled “ Select<TNext>(Func<TCurrent, TNext>, IRFunc<TCurrent, TNext>?)”public HookStage<TEvent, TNext, TContext> Select<TNext>(Func<TCurrent, TNext> projection, IRFunc<TCurrent, TNext>? irProjection = null)Parameters
Section titled “Parameters”projection Func<TCurrent, TNext>
irProjection IRFunc<TCurrent, TNext>?
Returns
Section titled “Returns”HookStage<TEvent, TNext, TContext>
Type Parameters
Section titled “Type Parameters”TNext
UseGeneratedChain(PluginPackage)
Section titled “ UseGeneratedChain(PluginPackage)”public HookPipeline<TEvent, TContext> UseGeneratedChain(PluginPackage package)Parameters
Section titled “Parameters”package PluginPackage
Returns
Section titled “Returns”HookPipeline<TEvent, TContext>
Where(Func<TCurrent, TContext, bool>, IRFunc<TCurrent, TContext, bool>?)
Section titled “ Where(Func<TCurrent, TContext, bool>, IRFunc<TCurrent, TContext, bool>?)”public HookStage<TEvent, TCurrent, TContext> Where(Func<TCurrent, TContext, bool> filter, IRFunc<TCurrent, TContext, bool>? irFilter = null)Parameters
Section titled “Parameters”filter Func<TCurrent, TContext, bool>
irFilter IRFunc<TCurrent, TContext, bool>?
Returns
Section titled “Returns”HookStage<TEvent, TCurrent, TContext>
Where(Func<TCurrent, bool>, IRFunc<TCurrent, bool>?)
Section titled “ Where(Func<TCurrent, bool>, IRFunc<TCurrent, bool>?)”Element-only filter over the projected element — the (element, context) overload with the context discarded, so a stage need not take the context it doesn’t use.
public HookStage<TEvent, TCurrent, TContext> Where(Func<TCurrent, bool> filter, IRFunc<TCurrent, bool>? irFilter = null)Parameters
Section titled “Parameters”irFilter IRFunc<TCurrent, bool>?
Returns
Section titled “Returns”HookStage<TEvent, TCurrent, TContext>