Table of Contents

Class JsonSearchDefinition<TDocument>

Namespace
MongoDB.Driver.Search
Assembly
MongoDB.Driver.dll

A search definition based on a JSON string.

public sealed class JsonSearchDefinition<TDocument> : SearchDefinition<TDocument>

Type Parameters

TDocument

The type of the document.

Inheritance
SearchDefinition<TDocument>
JsonSearchDefinition<TDocument>
Inherited Members

Constructors

JsonSearchDefinition(string)

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

public JsonSearchDefinition(string json)

Parameters

json string

The JSON string specifying the search definition.

Properties

Json

Gets the JSON string.

public string Json { get; }

Property Value

string

Methods

Render(SearchDefinitionRenderContext<TDocument>)

Renders the search definition to a BsonDocument.

public override BsonDocument Render(SearchDefinitionRenderContext<TDocument> renderContext)

Parameters

renderContext SearchDefinitionRenderContext<TDocument>

The render context.

Returns

BsonDocument

A BsonDocument.