Table of Contents

Class BsonDocumentSortDefinition<TDocument>

Namespace
MongoDB.Driver
Assembly
MongoDB.Driver.dll

A BsonDocument based sort.

public sealed class BsonDocumentSortDefinition<TDocument> : SortDefinition<TDocument>

Type Parameters

TDocument

The type of the document.

Inheritance
SortDefinition<TDocument>
BsonDocumentSortDefinition<TDocument>
Inherited Members
Extension Methods

Constructors

BsonDocumentSortDefinition(BsonDocument)

Initializes a new instance of the BsonDocumentSortDefinition<TDocument> class.

public BsonDocumentSortDefinition(BsonDocument document)

Parameters

document BsonDocument

The document.

Properties

Document

Gets the document.

public BsonDocument Document { get; }

Property Value

BsonDocument

Methods

Render(IBsonSerializer<TDocument>, IBsonSerializerRegistry, LinqProvider)

Renders the sort to a BsonDocument.

public override BsonDocument Render(IBsonSerializer<TDocument> documentSerializer, IBsonSerializerRegistry serializerRegistry, LinqProvider linqProvider)

Parameters

documentSerializer IBsonSerializer<TDocument>

The document serializer.

serializerRegistry IBsonSerializerRegistry

The serializer registry.

linqProvider LinqProvider

The LINQ provider.

Returns

BsonDocument

A BsonDocument.