Table of Contents

Class JsonSortDefinition<TDocument>

Namespace
MongoDB.Driver
Assembly
MongoDB.Driver.dll

A JSON string based sort.

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

Type Parameters

TDocument

The type of the document.

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

Constructors

JsonSortDefinition(string)

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

public JsonSortDefinition(string json)

Parameters

json string

The json.

Properties

Json

Gets the json.

public string Json { get; }

Property Value

string

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.