Table of Contents

Class ChannelSourceHandle

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

Represents a handle to a channel source.

public sealed class ChannelSourceHandle : IChannelSourceHandle, IChannelSource, IDisposable
Inheritance
ChannelSourceHandle
Implements
Inherited Members

Constructors

ChannelSourceHandle(IChannelSource)

Initializes a new instance of the ChannelSourceHandle class.

public ChannelSourceHandle(IChannelSource channelSource)

Parameters

channelSource IChannelSource

The channel source.

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()

Fork()

Returns a new handle to the underlying channel source.

public IChannelSourceHandle Fork()

Returns

IChannelSourceHandle

A handle to a channel source.

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.