Class BulkMixedWriteOperation
- Namespace
- MongoDB.Driver.Core.Operations
- Assembly
- MongoDB.Driver.Core.dll
Represents a mixed write bulk operation.
public class BulkMixedWriteOperation : IWriteOperation<BulkWriteOperationResult>
- Inheritance
-
BulkMixedWriteOperation
- Implements
- Inherited Members
- Extension Methods
Constructors
BulkMixedWriteOperation(CollectionNamespace, IEnumerable<WriteRequest>, MessageEncoderSettings)
Initializes a new instance of the BulkMixedWriteOperation class.
public BulkMixedWriteOperation(CollectionNamespace collectionNamespace, IEnumerable<WriteRequest> requests, MessageEncoderSettings messageEncoderSettings)
Parameters
collectionNamespace
CollectionNamespaceThe collection namespace.
requests
IEnumerable<WriteRequest>The requests.
messageEncoderSettings
MessageEncoderSettingsThe message encoder settings.
BulkMixedWriteOperation(CollectionNamespace, List<WriteRequest>, MessageEncoderSettings)
Initializes a new instance of the BulkMixedWriteOperation class.
public BulkMixedWriteOperation(CollectionNamespace collectionNamespace, List<WriteRequest> requests, MessageEncoderSettings messageEncoderSettings)
Parameters
collectionNamespace
CollectionNamespaceThe collection namespace.
requests
List<WriteRequest>The requests.
messageEncoderSettings
MessageEncoderSettingsThe message encoder settings.
Properties
BypassDocumentValidation
Gets or sets a value indicating whether to bypass document validation.
public bool? BypassDocumentValidation { get; set; }
Property Value
- bool?
A value indicating whether to bypass document validation.
CollectionNamespace
Gets the collection namespace.
public CollectionNamespace CollectionNamespace { get; }
Property Value
- CollectionNamespace
The collection namespace.
Comment
Gets or sets the comment.
public BsonValue Comment { get; set; }
Property Value
- BsonValue
The comment.
IsOrdered
Gets or sets a value indicating whether the writes must be performed in order.
public bool IsOrdered { get; set; }
Property Value
- bool
true
if the writes must be performed in order; otherwise,false
.
Let
Gets or sets the let document.
public BsonDocument Let { get; set; }
Property Value
- BsonDocument
The let document.
MaxBatchCount
Gets or sets the maximum number of documents in a batch.
public int? MaxBatchCount { get; set; }
Property Value
- int?
The maximum number of documents in a batch.
MaxBatchLength
Gets or sets the maximum length of a batch.
public int? MaxBatchLength { get; set; }
Property Value
- int?
The maximum length of a batch.
MaxDocumentSize
Gets or sets the maximum size of a document.
public int? MaxDocumentSize { get; set; }
Property Value
- int?
The maximum size of a document.
MaxWireDocumentSize
Gets or sets the maximum size of a wire document.
public int? MaxWireDocumentSize { get; set; }
Property Value
- int?
The maximum size of a wire document.
MessageEncoderSettings
Gets the message encoder settings.
public MessageEncoderSettings MessageEncoderSettings { get; }
Property Value
- MessageEncoderSettings
The message encoder settings.
Requests
Gets the requests.
public IEnumerable<WriteRequest> Requests { get; }
Property Value
- IEnumerable<WriteRequest>
The requests.
RetryRequested
Gets or sets a value indicating whether [retry requested].
public bool RetryRequested { get; set; }
Property Value
- bool
true
if [retry requested]; otherwise,false
.
WriteConcern
Gets or sets the write concern.
public WriteConcern WriteConcern { get; set; }
Property Value
- WriteConcern
The write concern.
Methods
Execute(IWriteBinding, CancellationToken)
Executes the operation.
public BulkWriteOperationResult Execute(IWriteBinding binding, CancellationToken cancellationToken)
Parameters
binding
IWriteBindingThe binding.
cancellationToken
CancellationTokenThe cancellation token.
Returns
- BulkWriteOperationResult
The result of the operation.
ExecuteAsync(IWriteBinding, CancellationToken)
Executes the operation.
public Task<BulkWriteOperationResult> ExecuteAsync(IWriteBinding binding, CancellationToken cancellationToken)
Parameters
binding
IWriteBindingThe binding.
cancellationToken
CancellationTokenThe cancellation token.
Returns
- Task<BulkWriteOperationResult>
A Task whose result is the result of the operation.