Class MapReduceLegacyOperation
- Namespace
- MongoDB.Driver.Core.Operations
- Assembly
- MongoDB.Driver.Core.dll
Represents a map-reduce operation.
[Obsolete("Use Aggregation pipeline instead.")]
public class MapReduceLegacyOperation : MapReduceOperationBase, IReadOperation<BsonDocument>
- Inheritance
-
MapReduceLegacyOperation
- Implements
- Inherited Members
- Extension Methods
Constructors
MapReduceLegacyOperation(CollectionNamespace, BsonJavaScript, BsonJavaScript, MessageEncoderSettings)
Initializes a new instance of the MapReduceLegacyOperation class.
public MapReduceLegacyOperation(CollectionNamespace collectionNamespace, BsonJavaScript mapFunction, BsonJavaScript reduceFunction, MessageEncoderSettings messageEncoderSettings)
Parameters
collectionNamespace
CollectionNamespaceThe collection namespace.
mapFunction
BsonJavaScriptThe map function.
reduceFunction
BsonJavaScriptThe reduce function.
messageEncoderSettings
MessageEncoderSettingsThe message encoder settings.
Properties
ReadConcern
Gets or sets the read concern.
public ReadConcern ReadConcern { get; set; }
Property Value
- ReadConcern
The read concern.
Methods
CreateCommand(ICoreSessionHandle, ConnectionDescription)
Creates the command.
protected override BsonDocument CreateCommand(ICoreSessionHandle session, ConnectionDescription connectionDescription)
Parameters
session
ICoreSessionHandleThe session.
connectionDescription
ConnectionDescriptionThe connection description.
Returns
- BsonDocument
The command.
CreateOutputOptions()
Creates the output options.
protected override BsonDocument CreateOutputOptions()
Returns
- BsonDocument
The output options.
Execute(IReadBinding, CancellationToken)
Executes the operation.
public BsonDocument Execute(IReadBinding binding, CancellationToken cancellationToken)
Parameters
binding
IReadBindingThe binding.
cancellationToken
CancellationTokenThe cancellation token.
Returns
- BsonDocument
The result of the operation.
ExecuteAsync(IReadBinding, CancellationToken)
Executes the operation.
public Task<BsonDocument> ExecuteAsync(IReadBinding binding, CancellationToken cancellationToken)
Parameters
binding
IReadBindingThe binding.
cancellationToken
CancellationTokenThe cancellation token.
Returns
- Task<BsonDocument>
A Task whose result is the result of the operation.