Table of Contents

Class ServerChannelSource

Namespace
MongoDB.Driver.Core.Bindings
Assembly
MongoDB.Driver.Core.dll

Represents a channel source that is bound to a server.

public sealed class ServerChannelSource : IChannelSource, IDisposable
Inheritance
ServerChannelSource
Implements
Inherited Members

Constructors

ServerChannelSource(IServer, ICoreSessionHandle)

Initializes a new instance of the ServerChannelSource class.

public ServerChannelSource(IServer server, ICoreSessionHandle session)

Parameters

server IServer

The server.

session ICoreSessionHandle

The session.

Properties

Server

Gets the server.

public IServer Server { get; }

Property Value

IServer

The server.

ServerDescription

Gets the server description.

public ServerDescription ServerDescription { get; }

Property Value

ServerDescription

The server description.

Session

Gets the session.

public ICoreSessionHandle Session { get; }

Property Value

ICoreSessionHandle

The session.

Methods

Dispose()

public void Dispose()

GetChannel(CancellationToken)

Gets a channel.

public IChannelHandle GetChannel(CancellationToken cancellationToken)

Parameters

cancellationToken CancellationToken

The cancellation token.

Returns

IChannelHandle

A channel.

GetChannelAsync(CancellationToken)

Gets a channel.

public Task<IChannelHandle> GetChannelAsync(CancellationToken cancellationToken)

Parameters

cancellationToken CancellationToken

The cancellation token.

Returns

Task<IChannelHandle>

A Task whose result is a channel.