Class MongoWriteConcernException
Represents a MongoDB write concern exception.
[Serializable]
public class MongoWriteConcernException : MongoCommandException, ISerializable
- Inheritance
-
MongoWriteConcernException
- Implements
- Derived
- Inherited Members
Constructors
MongoWriteConcernException(ConnectionId, string, WriteConcernResult)
Initializes a new instance of the MongoWriteConcernException class.
public MongoWriteConcernException(ConnectionId connectionId, string message, WriteConcernResult writeConcernResult)
Parameters
connectionIdConnectionIdThe connection identifier.
messagestringThe error message.
writeConcernResultWriteConcernResultThe command result.
MongoWriteConcernException(SerializationInfo, StreamingContext)
Initializes a new instance of the MongoWriteConcernException class.
public MongoWriteConcernException(SerializationInfo info, StreamingContext context)
Parameters
infoSerializationInfoThe SerializationInfo.
contextStreamingContextThe StreamingContext.
Properties
MappedWriteConcernResultException
Gets the mapped write concern result exception.
public Exception MappedWriteConcernResultException { get; }
Property Value
WriteConcernResult
Gets the write concern result.
public WriteConcernResult WriteConcernResult { get; }
Property Value
- WriteConcernResult
The write concern result.
Methods
GetObjectData(SerializationInfo, StreamingContext)
public override void GetObjectData(SerializationInfo info, StreamingContext context)
Parameters
infoSerializationInfocontextStreamingContext
IsWriteConcernErrorOnly()
Determines whether the exception is due to a write concern error only.
public bool IsWriteConcernErrorOnly()
Returns
- bool
trueif the exception is due to a write concern error only; otherwise,false.