Click or drag to resize
Akka.NETAbstractStageTIn, TOut, TPushDirective, TPullDirective, TContext, TLifecycleContextOnPush Method (TIn, IContext)

This method is called when an element from upstream is available and there is demand from downstream, i.e. in OnPush(TIn, TContext) you are allowed to call Push(Object) to emit one element downstreams, or you can absorb the element by calling Pull. Note that you can only emit zero or one element downstream from OnPull(TContext).

To emit more than one element you have to push the remaining elements from OnPull(TContext), one-by-one. OnPush(TIn, TContext) is not called again until OnPull(TContext) has requested more elements with Pull.

Namespace: Akka.Streams.Stage
Assembly: Akka.Streams (in Akka.Streams.dll) Version: 1.1.1.25 (1.1.1.25)
Syntax
public override sealed IDirective OnPush(
	TIn element,
	IContext context
)

Parameters

element
Type: TIn

[Missing <param name="element"/> documentation for "M:Akka.Streams.Stage.AbstractStage`6.OnPush(`0,Akka.Streams.Stage.IContext)"]

context
Type: Akka.Streams.StageIContext

[Missing <param name="context"/> documentation for "M:Akka.Streams.Stage.AbstractStage`6.OnPush(`0,Akka.Streams.Stage.IContext)"]

Return Value

Type: IDirective

[Missing <returns> documentation for "M:Akka.Streams.Stage.AbstractStage`6.OnPush(`0,Akka.Streams.Stage.IContext)"]

See Also