Table of Contents

Method Documents

Namespace
MongoDB.Driver
Assembly
MongoDB.Driver.dll

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

Creates a $documents stage.

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

Parameters

documents AggregateExpressionDefinition<NoPipelineInput, IEnumerable<TDocument>>

The documents.

documentSerializer IBsonSerializer<TDocument>

The document serializer.

Returns

PipelineStageDefinition<NoPipelineInput, TDocument>

The stage.

Type Parameters

TDocument

The type of the documents.

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

Creates a $documents stage.

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

Parameters

documents IEnumerable<TDocument>

The documents.

documentSerializer IBsonSerializer<TDocument>

The document serializer.

Returns

PipelineStageDefinition<NoPipelineInput, TDocument>

The stage.

Type Parameters

TDocument

The type of the documents.