Table of Contents

Method AppendStage

Namespace
MongoDB.Driver
Assembly
MongoDB.Driver.dll

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

pipeline PipelineDefinition<TInput, TIntermediate>

The pipeline.

stage PipelineStageDefinition<TIntermediate, TOutput>

The stage.

outputSerializer IBsonSerializer<TOutput>

The output serializer.

Returns

PipelineDefinition<TInput, TOutput>

A new pipeline with an additional stage.

Type Parameters

TInput

The type of the input documents.

TIntermediate

The type of the intermediate documents.

TOutput

The type of the output documents.