Table of Contents

Class UpdateDefinition<TDocument>

Namespace
MongoDB.Driver
Assembly
MongoDB.Driver.dll

Base class for updates.

public abstract class UpdateDefinition<TDocument>

Type Parameters

TDocument

The type of the document.

Inheritance
UpdateDefinition<TDocument>
Derived
Inherited Members
Extension Methods

Methods

Render(IBsonSerializer<TDocument>, IBsonSerializerRegistry)

Renders the update to a BsonValue.

public virtual BsonValue Render(IBsonSerializer<TDocument> documentSerializer, IBsonSerializerRegistry serializerRegistry)

Parameters

documentSerializer IBsonSerializer<TDocument>

The document serializer.

serializerRegistry IBsonSerializerRegistry

The serializer registry.

Returns

BsonValue

A BsonValue.

Render(IBsonSerializer<TDocument>, IBsonSerializerRegistry, LinqProvider)

Renders the update to a BsonValue.

public abstract BsonValue 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

BsonValue

A BsonValue.

Operators

implicit operator UpdateDefinition<TDocument>(BsonDocument)

Performs an implicit conversion from BsonDocument to UpdateDefinition<TDocument>.

public static implicit operator UpdateDefinition<TDocument>(BsonDocument document)

Parameters

document BsonDocument

The document.

Returns

UpdateDefinition<TDocument>

The result of the conversion.

implicit operator UpdateDefinition<TDocument>(PipelineDefinition<TDocument, TDocument>)

Performs an implicit conversion from PipelineDefinition<TInput, TOutput> to UpdateDefinition<TDocument>.

public static implicit operator UpdateDefinition<TDocument>(PipelineDefinition<TDocument, TDocument> pipeline)

Parameters

pipeline PipelineDefinition<TDocument, TDocument>

The pipeline.

Returns

UpdateDefinition<TDocument>

The result of the conversion.

implicit operator UpdateDefinition<TDocument>(string)

Performs an implicit conversion from string to UpdateDefinition<TDocument>.

public static implicit operator UpdateDefinition<TDocument>(string json)

Parameters

json string

The JSON string.

Returns

UpdateDefinition<TDocument>

The result of the conversion.