Table of Contents

Class UpdateWrapper

Namespace
MongoDB.Driver.Wrappers
Assembly
MongoDB.Driver.Legacy.dll

Represents a wrapped object that can be used where an IMongoUpdate is expected (the wrapped object is expected to serialize properly).

[BsonSerializer(typeof(UpdateWrapper.Serializer))]
public class UpdateWrapper : BaseWrapper, IMongoUpdate
Inheritance
UpdateWrapper
Implements
Inherited Members
Extension Methods

Constructors

UpdateWrapper(Type, object)

Initializes a new instance of the UpdateWrapper class.

public UpdateWrapper(Type nominalType, object update)

Parameters

nominalType Type

The nominal type of the wrapped object.

update object

The wrapped object.

Methods

Create(Type, object)

Creates a new instance of the UpdateWrapper class.

public static UpdateWrapper Create(Type nominalType, object update)

Parameters

nominalType Type

The nominal type of the wrapped object.

update object

The wrapped object.

Returns

UpdateWrapper

A new instance of UpdateWrapper or null.

Create<T>(T)

Creates a new instance of the UpdateWrapper class (this overload is used when the update modifier is a replacement document).

public static UpdateWrapper Create<T>(T update)

Parameters

update T

The wrapped object.

Returns

UpdateWrapper

A new instance of UpdateWrapper or null.

Type Parameters

T

The nominal type of the wrapped object.