Table of Contents

Class CommandWrapper

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

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

[BsonSerializer(typeof(CommandWrapper.Serializer))]
public class CommandWrapper : QueryWrapper, IMongoCommand, IMongoQuery
Inheritance
CommandWrapper
Implements
Inherited Members
Extension Methods

Constructors

CommandWrapper(object)

Initializes a new instance of the CommandWrapper class.

public CommandWrapper(object command)

Parameters

command object

The wrapped object.

Methods

Create(object)

Creates a new instance of the CommandWrapper class.

public static CommandWrapper Create(object command)

Parameters

command object

The wrapped object.

Returns

CommandWrapper

A new instance of CommandWrapper or null.