Method As
As<TInput, TIntermediate, TOutput>(PipelineDefinition<TInput, TIntermediate>, IBsonSerializer<TOutput>)
Changes the output type of the pipeline.
public static PipelineDefinition<TInput, TOutput> As<TInput, TIntermediate, TOutput>(this PipelineDefinition<TInput, TIntermediate> pipeline, IBsonSerializer<TOutput> outputSerializer = null)
Parameters
pipeline
PipelineDefinition<TInput, TIntermediate>The pipeline.
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.