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
connectionId
ConnectionIdThe connection identifier.
message
stringThe error message.
writeConcernResult
WriteConcernResultThe command result.
MongoWriteConcernException(SerializationInfo, StreamingContext)
Initializes a new instance of the MongoWriteConcernException class.
public MongoWriteConcernException(SerializationInfo info, StreamingContext context)
Parameters
info
SerializationInfoThe SerializationInfo.
context
StreamingContextThe 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
info
SerializationInfocontext
StreamingContext
IsWriteConcernErrorOnly()
Determines whether the exception is due to a write concern error only.
public bool IsWriteConcernErrorOnly()
Returns
- bool
true
if the exception is due to a write concern error only; otherwise,false
.