Table of Contents

Method Documents

Namespace
MongoDB.Driver
Assembly
MongoDB.Driver.dll

Documents<TDocument>(PipelineDefinition<NoPipelineInput, NoPipelineInput>, AggregateExpressionDefinition<NoPipelineInput, IEnumerable<TDocument>>, IBsonSerializer<TDocument>)

Appends a $documents stage to the pipeline.

public static PipelineDefinition<NoPipelineInput, TDocument> Documents<TDocument>(this PipelineDefinition<NoPipelineInput, NoPipelineInput> pipeline, AggregateExpressionDefinition<NoPipelineInput, IEnumerable<TDocument>> documents, IBsonSerializer<TDocument> documentSerializer = null)

Parameters

pipeline PipelineDefinition<NoPipelineInput, NoPipelineInput>

The pipeline.

documents AggregateExpressionDefinition<NoPipelineInput, IEnumerable<TDocument>>

The documents.

documentSerializer IBsonSerializer<TDocument>

The document serializer.

Returns

PipelineDefinition<NoPipelineInput, TDocument>

A new pipeline with an additional stage.

Type Parameters

TDocument

The type of the documents.

Documents<TDocument>(PipelineDefinition<NoPipelineInput, NoPipelineInput>, IEnumerable<TDocument>, IBsonSerializer<TDocument>)

Appends a $documents stage to the pipeline.

public static PipelineDefinition<NoPipelineInput, TDocument> Documents<TDocument>(this PipelineDefinition<NoPipelineInput, NoPipelineInput> pipeline, IEnumerable<TDocument> documents, IBsonSerializer<TDocument> documentSerializer = null)

Parameters

pipeline PipelineDefinition<NoPipelineInput, NoPipelineInput>

The pipeline.

documents IEnumerable<TDocument>

The documents.

documentSerializer IBsonSerializer<TDocument>

The document serializer.

Returns

PipelineDefinition<NoPipelineInput, TDocument>

A new pipeline with an additional stage.

Type Parameters

TDocument

The type of the documents.