Class ReplyMessage<TDocument>
- Namespace
- MongoDB.Driver.Core.WireProtocol.Messages
- Assembly
- MongoDB.Driver.Core.dll
Represents a Reply message.
public class ReplyMessage<TDocument> : ResponseMessage, IEncodableMessage
Type Parameters
TDocumentThe type of the document.
- Inheritance
-
ReplyMessage<TDocument>
- Implements
- Inherited Members
Constructors
ReplyMessage(bool, long, bool, List<TDocument>, int, bool, BsonDocument, int, int, IBsonSerializer<TDocument>, int)
Initializes a new instance of the ReplyMessage<TDocument> class.
public ReplyMessage(bool awaitCapable, long cursorId, bool cursorNotFound, List<TDocument> documents, int numberReturned, bool queryFailure, BsonDocument queryFailureDocument, int requestId, int responseTo, IBsonSerializer<TDocument> serializer, int startingFrom)
Parameters
awaitCapableboolif set to
truethe server is await capable.cursorIdlongThe cursor identifier.
cursorNotFoundboolif set to
truethe cursor was not found.documentsList<TDocument>The documents.
numberReturnedintThe number of documents returned.
queryFailureboolif set to
truethe query failed.queryFailureDocumentBsonDocumentThe query failure document.
requestIdintThe request identifier.
responseTointThe identifier of the message this is a response to.
serializerIBsonSerializer<TDocument>The serializer.
startingFromintThe position of the first document in this batch in the overall result.
Properties
AwaitCapable
Gets a value indicating whether the server is await capable.
public bool AwaitCapable { get; }
Property Value
CursorId
Gets the cursor identifier.
public long CursorId { get; }
Property Value
CursorNotFound
Gets a value indicating whether the cursor was not found.
public bool CursorNotFound { get; }
Property Value
Documents
Gets the documents.
public List<TDocument> Documents { get; }
Property Value
- List<TDocument>
MessageType
Gets the type of the message.
public override MongoDBMessageType MessageType { get; }
Property Value
NumberReturned
Gets the number of documents returned.
public int NumberReturned { get; }
Property Value
QueryFailure
Gets a value indicating whether the query failed.
public bool QueryFailure { get; }
Property Value
QueryFailureDocument
Gets the query failure document.
public BsonDocument QueryFailureDocument { get; }
Property Value
Serializer
Gets the serializer.
public IBsonSerializer<TDocument> Serializer { get; }
Property Value
- IBsonSerializer<TDocument>
StartingFrom
Gets the position of the first document in this batch in the overall result.
public int StartingFrom { get; }
Property Value
Methods
GetEncoder(IMessageEncoderFactory)
Gets an encoder for the message from an encoder factory.
public override IMessageEncoder GetEncoder(IMessageEncoderFactory encoderFactory)
Parameters
encoderFactoryIMessageEncoderFactoryThe encoder factory.
Returns
- IMessageEncoder
A message encoder.