Table of Contents

Class MongoDBMessage

Namespace
MongoDB.Driver.Core.WireProtocol.Messages
Assembly
MongoDB.Driver.Core.dll

Represents a base class for messages.

public abstract class MongoDBMessage : IEncodableMessage
Inheritance
MongoDBMessage
Implements
Derived
Inherited Members

Properties

MayBeCompressed

Gets the flag whether the message may be compressed or not.

public virtual bool MayBeCompressed { get; }

Property Value

bool

MessageType

Gets the type of the message.

public abstract MongoDBMessageType MessageType { get; }

Property Value

MongoDBMessageType

Methods

GetEncoder(IMessageEncoderFactory)

Gets an encoder for the message from an encoder factory.

public abstract IMessageEncoder GetEncoder(IMessageEncoderFactory encoderFactory)

Parameters

encoderFactory IMessageEncoderFactory

The encoder factory.

Returns

IMessageEncoder

A message encoder.