Interface IServer
Represents a MongoDB server.
public interface IServer
Properties
Description
Gets the server description.
ServerDescription Description { get; }
Property Value
- ServerDescription
The server description.
EndPoint
Gets the end point.
EndPoint EndPoint { get; }
Property Value
- EndPoint
The end point.
ServerId
Gets the server identifier.
ServerId ServerId { get; }
Property Value
- ServerId
The server identifier.
Methods
GetChannel(CancellationToken)
Gets a channel to the server.
IChannelHandle GetChannel(CancellationToken cancellationToken)
Parameters
cancellationToken
CancellationTokenThe cancellation token.
Returns
- IChannelHandle
A channel.
GetChannelAsync(CancellationToken)
Gets a channel to the server.
Task<IChannelHandle> GetChannelAsync(CancellationToken cancellationToken)
Parameters
cancellationToken
CancellationTokenThe cancellation token.
Returns
- Task<IChannelHandle>
A Task whose result is a channel.
Events
DescriptionChanged
Occurs when the server description changes.
event EventHandler<ServerDescriptionChangedEventArgs> DescriptionChanged