Table of Contents

Class ObjectCommand<TResult>

Namespace
MongoDB.Driver
Assembly
MongoDB.Driver.dll

An Object based command.

public sealed class ObjectCommand<TResult> : Command<TResult>

Type Parameters

TResult

The type of the result.

Inheritance
Command<TResult>
ObjectCommand<TResult>
Inherited Members

Constructors

ObjectCommand(object, IBsonSerializer<TResult>)

Initializes a new instance of the ObjectCommand<TResult> class.

public ObjectCommand(object obj, IBsonSerializer<TResult> resultSerializer = null)

Parameters

obj object

The object.

resultSerializer IBsonSerializer<TResult>

The result serializer.

Properties

Object

Gets the object.

public object Object { get; }

Property Value

object

ResultSerializer

Gets the result serializer.

public IBsonSerializer<TResult> ResultSerializer { get; }

Property Value

IBsonSerializer<TResult>

Methods

Render(IBsonSerializerRegistry)

Renders the command to a RenderedCommand<TResult>.

public override RenderedCommand<TResult> Render(IBsonSerializerRegistry serializerRegistry)

Parameters

serializerRegistry IBsonSerializerRegistry

The serializer registry.

Returns

RenderedCommand<TResult>

A RenderedCommand<TResult>.