Click or drag to resize

WriteConcern Class

Represents a write concern.
Inheritance Hierarchy
SystemObject
  MongoDB.DriverWriteConcern

Namespace:  MongoDB.Driver
Assembly:  MongoDB.Driver.Core (in MongoDB.Driver.Core.dll) Version: 2.5.0+57.Branch.master.Sha.6a4e00a2d91090c65a9b11364b9ebfdb9c7da076
Syntax
public sealed class WriteConcern : IEquatable<WriteConcern>, 
	IConvertibleToBsonDocument

The WriteConcern type exposes the following members.

Constructors
  NameDescription
Public methodWriteConcern(Int32, OptionalNullableTimeSpan, OptionalNullableBoolean, OptionalNullableBoolean)
Initializes a new instance of the WriteConcern class.
Public methodWriteConcern(String, OptionalNullableTimeSpan, OptionalNullableBoolean, OptionalNullableBoolean)
Initializes a new instance of the WriteConcern class.
Public methodWriteConcern(OptionalWriteConcernWValue, OptionalNullableTimeSpan, OptionalNullableBoolean, OptionalNullableBoolean)
Initializes a new instance of the WriteConcern class.
Top
Properties
  NameDescription
Public propertyStatic memberAcknowledged
Gets an instance of WriteConcern that represents an acknowledged write concern.
Public propertyFSync
Gets the fsync value.
Public propertyIsAcknowledged
Gets a value indicating whether this instance is an acknowledged write concern.
Public propertyIsServerDefault
Gets a value indicating whether this write concern will use the default on the server.
Public propertyJournal
Gets the journal value.
Public propertyStatic memberUnacknowledged
Gets an instance of WriteConcern that represents an unacknowledged write concern.
Public propertyW
Gets the w value.
Public propertyStatic memberW1
Gets an instance of WriteConcern that represents a W1 write concern.
Public propertyStatic memberW2
Gets an instance of WriteConcern that represents a W2 write concern.
Public propertyStatic memberW3
Gets an instance of WriteConcern that represents a W3 write concern.
Public propertyStatic memberWMajority
Gets an instance of WriteConcern that represents a majority write concern.
Public propertyWTimeout
Gets the wtimeout value.
Top
Methods
  NameDescription
Public methodEquals(Object)
Determines whether the specified object is equal to the current object.
(Overrides ObjectEquals(Object).)
Public methodEquals(WriteConcern)
Indicates whether the current object is equal to another object of the same type.
Public methodStatic memberFromBsonDocument
Creates a write concern from a document.
Public methodGetHashCode
Serves as the default hash function.
(Overrides ObjectGetHashCode.)
Public methodGetType
Gets the Type of the current instance.
(Inherited from Object.)
Public methodToBsonDocument
Converts this write concern to a BsonDocument suitable to be sent to the server.
Public methodToString
Returns a string that represents the current object.
(Overrides ObjectToString.)
Public methodWith(Int32, OptionalNullableTimeSpan, OptionalNullableBoolean, OptionalNullableBoolean)
Returns a new instance of WriteConcern with some values changed.
Public methodWith(String, OptionalNullableTimeSpan, OptionalNullableBoolean, OptionalNullableBoolean)
Returns a new instance of WriteConcern with some values changed.
Public methodWith(OptionalWriteConcernWValue, OptionalNullableTimeSpan, OptionalNullableBoolean, OptionalNullableBoolean)
Returns a new instance of WriteConcern with some values changed.
Top
Extension Methods
  NameDescription
Public Extension MethodToBson
Serializes an object to a BSON byte array.
(Defined by BsonExtensionMethods.)
Public Extension MethodToBsonDocument
Serializes an object to a BsonDocument.
(Defined by BsonExtensionMethods.)
Public Extension MethodToJson
Serializes an object to a JSON string.
(Defined by BsonExtensionMethods.)
Top
See Also