Table of Contents

Class MapReduceResult

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

Represents the result of a map-reduce command.

[Obsolete("Use Aggregation pipeline instead.")]
[BsonSerializer(typeof(CommandResultSerializer<MapReduceResult>))]
public class MapReduceResult : CommandResult
Inheritance
MapReduceResult
Inherited Members
Extension Methods

Constructors

MapReduceResult(BsonDocument)

Initializes a new instance of the MapReduceResult class.

public MapReduceResult(BsonDocument response)

Parameters

response BsonDocument

The response.

Properties

CollectionName

Gets the output collection name (null if none).

public string CollectionName { get; }

Property Value

string

DatabaseName

Gets the output database name (null if none).

public string DatabaseName { get; }

Property Value

string

Duration

Gets the duration.

[Obsolete("Duration is not available on server versions 4.4.0 and newer.")]
public TimeSpan Duration { get; }

Property Value

TimeSpan

EmitCount

Gets the emit count.

[Obsolete("EmitCount is not available on server versions 4.4.0 and newer.")]
public long EmitCount { get; }

Property Value

long

InlineResults

Gets the inline results.

public IEnumerable<BsonDocument> InlineResults { get; }

Property Value

IEnumerable<BsonDocument>

InputCount

Gets the input count.

[Obsolete("InputCount is not available on server versions 4.4.0 and newer.")]
public long InputCount { get; }

Property Value

long

OutputCount

Gets the output count.

[Obsolete("OutputCount is not available on server versions 4.4.0 and newer.")]
public long OutputCount { get; }

Property Value

long

Methods

GetInlineResultsAs(Type)

Gets the inline results as TDocuments.

public IEnumerable<object> GetInlineResultsAs(Type documentType)

Parameters

documentType Type

The type of the documents.

Returns

IEnumerable<object>

The documents.

GetInlineResultsAs<TDocument>()

Gets the inline results as TDocuments.

public IEnumerable<TDocument> GetInlineResultsAs<TDocument>()

Returns

IEnumerable<TDocument>

The documents.

Type Parameters

TDocument

The type of the documents.

GetResults()

Gets the results (either inline or fetched from the output collection).

public IEnumerable<BsonDocument> GetResults()

Returns

IEnumerable<BsonDocument>

The documents.

GetResultsAs(Type)

Gets the results as TDocuments (either inline or fetched from the output collection).

public IEnumerable<object> GetResultsAs(Type documentType)

Parameters

documentType Type

The type of the documents.

Returns

IEnumerable<object>

The documents.

GetResultsAs<TDocument>()

Gets the results as TDocuments (either inline or fetched from the output collection).

public IEnumerable<TDocument> GetResultsAs<TDocument>()

Returns

IEnumerable<TDocument>

The documents.

Type Parameters

TDocument

The type of the documents.