Table of Contents

Class SearchPathDefinition<TDocument>

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

Base class for search paths.

public abstract class SearchPathDefinition<TDocument>

Type Parameters

TDocument

The type of the document.

Inheritance
SearchPathDefinition<TDocument>
Inherited Members

Methods

Render(SearchDefinitionRenderContext<TDocument>)

Renders the path to a BsonValue.

public abstract BsonValue Render(SearchDefinitionRenderContext<TDocument> renderContext)

Parameters

renderContext SearchDefinitionRenderContext<TDocument>

The render context.

Returns

BsonValue

A BsonValue.

RenderField(FieldDefinition<TDocument>, SearchDefinitionRenderContext<TDocument>)

Renders the field.

protected string RenderField(FieldDefinition<TDocument> fieldDefinition, SearchDefinitionRenderContext<TDocument> renderContext)

Parameters

fieldDefinition FieldDefinition<TDocument>

The field definition.

renderContext SearchDefinitionRenderContext<TDocument>

The render context.

Returns

string

The rendered field.

Operators

implicit operator SearchPathDefinition<TDocument>(FieldDefinition<TDocument>)

Performs an implicit conversion from FieldDefinition<TDocument> to SearchPathDefinition<TDocument>.

public static implicit operator SearchPathDefinition<TDocument>(FieldDefinition<TDocument> field)

Parameters

field FieldDefinition<TDocument>

The field.

Returns

SearchPathDefinition<TDocument>

The result of the conversion.

implicit operator SearchPathDefinition<TDocument>(FieldDefinition<TDocument>[])

Performs an implicit conversion from an array of FieldDefinition<TDocument> to SearchPathDefinition<TDocument>.

public static implicit operator SearchPathDefinition<TDocument>(FieldDefinition<TDocument>[] fields)

Parameters

fields FieldDefinition<TDocument>[]

The array of fields.

Returns

SearchPathDefinition<TDocument>

The result of the conversion.

implicit operator SearchPathDefinition<TDocument>(List<FieldDefinition<TDocument>>)

Performs an implicit conversion from a list of FieldDefinition<TDocument> to SearchPathDefinition<TDocument>.

public static implicit operator SearchPathDefinition<TDocument>(List<FieldDefinition<TDocument>> fields)

Parameters

fields List<FieldDefinition<TDocument>>

The list of fields.

Returns

SearchPathDefinition<TDocument>

The result of the conversion.

implicit operator SearchPathDefinition<TDocument>(List<string>)

Performs an implicit conversion from an array of field names to SearchPathDefinition<TDocument>.

public static implicit operator SearchPathDefinition<TDocument>(List<string> fieldNames)

Parameters

fieldNames List<string>

The list of field names.

Returns

SearchPathDefinition<TDocument>

The result of the conversion.

implicit operator SearchPathDefinition<TDocument>(string)

Performs an implicit conversion from a field name to SearchPathDefinition<TDocument>.

public static implicit operator SearchPathDefinition<TDocument>(string fieldName)

Parameters

fieldName string

The field name.

Returns

SearchPathDefinition<TDocument>

The result of the conversion.

implicit operator SearchPathDefinition<TDocument>(string[])

Performs an implicit conversion from an array of field names to SearchPathDefinition<TDocument>.

public static implicit operator SearchPathDefinition<TDocument>(string[] fieldNames)

Parameters

fieldNames string[]

The array of field names.

Returns

SearchPathDefinition<TDocument>

The result of the conversion.