Method AppendStage
AppendStage<TInput, TIntermediate, TOutput>(PipelineDefinition<TInput, TIntermediate>, PipelineStageDefinition<TIntermediate, TOutput>, IBsonSerializer<TOutput>)
Appends a stage to the pipeline.
public static PipelineDefinition<TInput, TOutput> AppendStage<TInput, TIntermediate, TOutput>(this PipelineDefinition<TInput, TIntermediate> pipeline, PipelineStageDefinition<TIntermediate, TOutput> stage, IBsonSerializer<TOutput> outputSerializer = null)
Parameters
pipelinePipelineDefinition<TInput, TIntermediate>The pipeline.
stagePipelineStageDefinition<TIntermediate, TOutput>The stage.
outputSerializerIBsonSerializer<TOutput>The output serializer.
Returns
- PipelineDefinition<TInput, TOutput>
A new pipeline with an additional stage.
Type Parameters
TInputThe type of the input documents.
TIntermediateThe type of the intermediate documents.
TOutputThe type of the output documents.