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
collectionNamespaceCollectionNamespaceThe collection namespace.
mapFunctionBsonJavaScriptThe map function.
reduceFunctionBsonJavaScriptThe reduce function.
messageEncoderSettingsMessageEncoderSettingsThe 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
sessionICoreSessionHandleThe session.
connectionDescriptionConnectionDescriptionThe 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
bindingIReadBindingThe binding.
cancellationTokenCancellationTokenThe cancellation token.
Returns
- BsonDocument
The result of the operation.
ExecuteAsync(IReadBinding, CancellationToken)
Executes the operation.
public Task<BsonDocument> ExecuteAsync(IReadBinding binding, CancellationToken cancellationToken)
Parameters
bindingIReadBindingThe binding.
cancellationTokenCancellationTokenThe cancellation token.
Returns
- Task<BsonDocument>
A Task whose result is the result of the operation.