Table of Contents

Class MongoBulkWriteException<TDocument>

Namespace
MongoDB.Driver
Assembly
MongoDB.Driver.dll

Represents a bulk write exception.

[Serializable]
public sealed class MongoBulkWriteException<TDocument> : MongoBulkWriteException, ISerializable

Type Parameters

TDocument

The type of the document.

Inheritance
MongoBulkWriteException<TDocument>
Implements
Inherited Members

Constructors

MongoBulkWriteException(ConnectionId, BulkWriteResult<TDocument>, IEnumerable<BulkWriteError>, WriteConcernError, IEnumerable<WriteModel<TDocument>>)

Initializes a new instance of the MongoBulkWriteException class.

public MongoBulkWriteException(ConnectionId connectionId, BulkWriteResult<TDocument> result, IEnumerable<BulkWriteError> writeErrors, WriteConcernError writeConcernError, IEnumerable<WriteModel<TDocument>> unprocessedRequests)

Parameters

connectionId ConnectionId

The connection identifier.

result BulkWriteResult<TDocument>

The result.

writeErrors IEnumerable<BulkWriteError>

The write errors.

writeConcernError WriteConcernError

The write concern error.

unprocessedRequests IEnumerable<WriteModel<TDocument>>

The unprocessed requests.

MongoBulkWriteException(SerializationInfo, StreamingContext)

Initializes a new instance of the MongoQueryException class (this overload supports deserialization).

public MongoBulkWriteException(SerializationInfo info, StreamingContext context)

Parameters

info SerializationInfo

The SerializationInfo.

context StreamingContext

The StreamingContext.

Properties

Result

Gets the result of the bulk write operation.

public BulkWriteResult<TDocument> Result { get; }

Property Value

BulkWriteResult<TDocument>

UnprocessedRequests

Gets the unprocessed requests.

public IReadOnlyList<WriteModel<TDocument>> UnprocessedRequests { get; }

Property Value

IReadOnlyList<WriteModel<TDocument>>

Methods

GetObjectData(SerializationInfo, StreamingContext)

Gets the object data.

public override void GetObjectData(SerializationInfo info, StreamingContext context)

Parameters

info SerializationInfo

The information.

context StreamingContext

The context.